Skip to content

Commit 5f8ca0e

Browse files
author
Lars Roettig
committed
#21 Requested code review chnages
1 parent b18cd92 commit 5f8ca0e

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

Magento2/Sniffs/Exceptions/TryProcessSystemResourcesSniff.php

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class TryProcessSystemResourcesSniff implements Sniff
3636
protected $functions = [
3737
'stream_',
3838
'socket_',
39-
'curl_'
4039
];
4140

4241
/**

Magento2/Tests/Exceptions/TryProcessSystemResourcesUnitTest.inc

-16
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,6 @@ class StreamHandler
1414

1515
}
1616
}
17-
18-
public function execute()
19-
{
20-
// Rule find: Try block detected when processing system resources
21-
$strChar = stream_get_contents(STDIN, 1);
22-
23-
try {
24-
$ch = curl_init();
25-
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
26-
curl_setopt($ch, CURLOPT_HEADER, 0);
27-
curl_exec($ch);
28-
curl_close($ch);
29-
} catch (Exception $exception) {
30-
31-
}
32-
}
3317
}
3418

3519
function executeStream()

Magento2/Tests/Exceptions/TryProcessSystemResourcesUnitTest.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ protected function getErrorList()
2626
protected function getWarningList()
2727
{
2828
return [
29-
21 => 1,
30-
38 => 1,
31-
40 => 1,
32-
42 => 1,
33-
44 => 1
29+
22 => 1,
30+
24 => 1,
31+
26 => 1,
32+
28 => 1
3433
];
3534
}
3635
}

0 commit comments

Comments
 (0)