Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
31 | 4 | public static function convertErrorsToExceptions(int $level = null) |
|
32 | { |
||
33 | 4 | static::$isHandledLocal = true; |
|
34 | 4 | if (is_null($level)) { |
|
35 | 4 | $level = E_ALL; |
|
36 | } |
||
37 | 4 | set_error_handler(function ($errorNumber, $errorMessage, $errorFile, $errorLine, $errorContext) { |
|
38 | 1 | throw new IOException($errorMessage, $errorNumber); |
|
39 | 4 | }, $level); |
|
40 | 4 | } |
|
41 | |||
52 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.