Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.0218 |
Changes | 0 |
1 | <?php |
||
48 | 2 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
49 | { |
||
50 | 2 | if ($this->supportsAbove('5.4')) { |
|
51 | 1 | $ini_value = ini_get('date.timezone'); |
|
52 | 1 | if (is_string($ini_value) === false || $ini_value === '') { |
|
53 | 1 | $phpcsFile->addError( |
|
54 | 1 | 'Default timezone is required since PHP 5.4', |
|
55 | $stackPtr, |
||
56 | 1 | 'Missing' |
|
57 | ); |
||
58 | } |
||
59 | } |
||
60 | |||
61 | 2 | }//end process() |
|
62 | |||
65 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.