Conditions | 4 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
39 | 3 | protected function scanDir() |
|
40 | { |
||
41 | 3 | if ($resource = opendir($this->dir)){ |
|
42 | 3 | while (($filename = readdir($resource)) !== false){ |
|
43 | 3 | if ($this->filter($filename)) { |
|
44 | 2 | $this->harvestExternalLinks(file_get_contents($this->dir.'/'.$filename)); |
|
45 | } |
||
46 | } |
||
47 | 3 | closedir($resource); |
|
48 | } |
||
69 |
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.