1 | <?php |
||
10 | class CleanTrash |
||
11 | { |
||
12 | /** |
||
13 | * @type CleanTrash |
||
14 | */ |
||
15 | private static $instance; |
||
16 | |||
17 | /** |
||
18 | * @type int |
||
19 | */ |
||
20 | private $countFileDeleted=0; |
||
21 | |||
22 | final private function __construct (){ } |
||
23 | |||
24 | /** |
||
25 | * @return \Classes\CleanTrash |
||
26 | */ |
||
27 | public static function getInstance () |
||
36 | |||
37 | private function scanDir ( $directory ) |
||
52 | |||
53 | /** |
||
54 | * @param string $path |
||
55 | * @param \Classes\AdaptersDriver\AbsractAdapter $driver |
||
56 | * @param int $schema |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | private function diffFiles ( $path , $driver , $schema = 0 ) |
||
69 | |||
70 | /** |
||
71 | * @param string $path |
||
72 | * @param \Classes\AdaptersDriver\AbsractAdapter $driver |
||
73 | * @param int $schema |
||
74 | * |
||
75 | * @return int |
||
76 | */ |
||
77 | public function run ( $path , $driver , $schema = 0 ) |
||
92 | |||
93 | /** |
||
94 | * @return int |
||
95 | */ |
||
96 | public function getNumFilesDeleted () |
||
100 | |||
101 | } |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.