Issues (35)

phoponent/commands/initialize.php (1 issue)

Labels
Severity
1
<?php
2
3
/**
4
 * © 2018 - Phoponent
5
 * Author: Nicolas Choquet
6
 * Email: [email protected]
7
 * LICENSE GPL ( GNU General Public License )
8
 */
9
10
namespace phoponent\framework\command;
11
12
13
use phoponent\framework\traits\command;
14
15
class initialize {
16
    use command;
17
18
    public function dependencies() {
19
        $dir = opendir("phoponent/external_libs");
20
        while (($directory = readdir($dir)) !== false) {
0 ignored issues
show
It seems like $dir can also be of type false; however, parameter $dir_handle of readdir() does only seem to accept resource, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

20
        while (($directory = readdir(/** @scrutinizer ignore-type */ $dir)) !== false) {
Loading history...
21
            if($directory !== '..' && $directory !== '.') {
22
                exec("cd phoponent/external_libs/{$directory} && composer install");
23
            }
24
        }
25
    }
26
}