| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | static function register_in_cs() { |
||
| 17 | $installed_paths = self::get_installed_path(); |
||
| 18 | $target_path = dirname(__DIR__); |
||
| 19 | if (in_array($target_path, $installed_paths, true)) { |
||
| 20 | echo "Our path is already registered in PHP CodeSniffer\n"; |
||
| 21 | } else { |
||
| 22 | array_push($installed_paths, $target_path); |
||
| 23 | self::set_installed_path($installed_paths); |
||
| 24 | echo "Registered our path in PHP CodeSniffer\n"; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 46 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.