Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | static function raise( $message, $code = null ) { |
||
14 | if ( empty( self::$errors ) ) { |
||
15 | add_action( 'admin_notices', array( __NAMESPACE__ . '\\Incorrect_Syntax_Exception', 'print_errors' ) ); |
||
16 | } |
||
17 | |||
18 | $exception = new self( $message, $code ); |
||
19 | |||
20 | if ( self::$throw_errors ) { |
||
21 | throw $exception; |
||
22 | } else { |
||
23 | self::$errors[] = $exception; |
||
24 | } |
||
25 | } |
||
26 | |||
41 | } |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.