Skip to content

Commit d49b390

Browse files
author
Lars Roettig
committed
#21 Review Fixes
1 parent 373fe13 commit d49b390

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

Magento2/Sniffs/Exceptions/TryProcessSystemResourcesSniff.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright © Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
76
namespace Magento2\Sniffs\Exceptions;
87

98
use function array_slice;
@@ -20,7 +19,7 @@ class TryProcessSystemResourcesSniff implements Sniff
2019
*
2120
* @var string
2221
*/
23-
protected $warningMessage = 'All resources SHOULD be properly released.';
22+
protected $warningMessage = 'The code MUST be wrapped with a try block if the method uses system resources .';
2423

2524
/**
2625
* Warning violation code.

Magento2/Tests/Exceptions/TryProcessSystemResourcesUnitTest.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Exception;
66

77
class StreamHandler
88
{
9-
public function handleExpection()
9+
public function handleException()
1010
{
1111
try {
1212
$strChar = stream_get_contents(STDIN, 1);
@@ -15,7 +15,7 @@ class StreamHandler
1515
}
1616
}
1717

18-
public function exetcute()
18+
public function execute()
1919
{
2020
// Rule find: Try block detected when processing system resources
2121
$strChar = stream_get_contents(STDIN, 1);

output.txt

-4
This file was deleted.

0 commit comments

Comments
 (0)