Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
47 | { |
||
48 | if ($this->supportsAbove('5.4')) { |
||
49 | $ini_value = ini_get('date.timezone'); |
||
50 | if (is_string($ini_value) === false || $ini_value === '') { |
||
51 | $phpcsFile->addError( |
||
52 | 'Default timezone is required since PHP 5.4', |
||
53 | $stackPtr, |
||
54 | 'Missing' |
||
55 | ); |
||
56 | } |
||
57 | } |
||
58 | |||
59 | }//end process() |
||
60 | |||
63 |
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.