Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
54 | private function fileShouldBeIgnored(SplFileInfo $file): bool |
||
55 | { |
||
56 | foreach ($this->config->getFilesToIgnore() as $fileToIgnore) { |
||
57 | $fileToIgnore = str_replace('/', '\/', $fileToIgnore); |
||
58 | if (preg_match("/{$fileToIgnore}/", $file->getPathName())) { |
||
59 | return true; |
||
60 | } |
||
61 | } |
||
62 | |||
63 | return false; |
||
64 | } |
||
65 | } |
||
66 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: