Issues (59)

after_install.php (7 issues)

1
<?php
2
3
use const Qero\QERO_DIR;
0 ignored issues
show
The constant Qero\QERO_DIR was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
4
5
use function Qero\{
6
    dir_delete,
0 ignored issues
show
The type Qero\dir_delete was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
    color
0 ignored issues
show
The type Qero\color was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
};
9
10
global $index_package;
11
12
echo color ('   Configuring [yellow]VoidFramework[reset]...') . PHP_EOL;
0 ignored issues
show
The function color was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

12
echo /** @scrutinizer ignore-call */ color ('   Configuring [yellow]VoidFramework[reset]...') . PHP_EOL;
Loading history...
13
14
function dir_copy (string $from, string $to): bool
15
{
16
    if (!is_dir ($from))
17
        return false;
18
19
    if (!is_dir ($to))
20
        mkdir ($to);
21
22
    foreach (array_slice (scandir ($from), 2) as $file)
0 ignored issues
show
It seems like scandir($from) can also be of type false; however, parameter $array of array_slice() does only seem to accept array, 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

22
    foreach (array_slice (/** @scrutinizer ignore-type */ scandir ($from), 2) as $file)
Loading history...
23
        if (is_dir ($f = $from .'/'. $file))
24
            dir_copy ($f, $to .'/'. $file);
25
26
        else copy ($f, $to .'/'. $file);
27
28
    return true;
29
}
30
31
$index_package->scripts['start'] = '"qero-packages/winforms-php/VoidFramework/core/VoidCore.exe" "app/start.php"';
32
33
file_put_contents (QERO_DIR .'/start.bat', '@echo off
0 ignored issues
show
The constant Qero\QERO_DIR was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
34
'. $index_package->scripts['start']);
35
36
if (!file_exists (QERO_DIR .'/app'))
37
{
38
    echo '   Configuring application...'. PHP_EOL;
39
40
    mkdir (QERO_DIR .'/app');
41
    dir_copy (__DIR__ .'/app_bundle', QERO_DIR .'/app');
42
}
43
44
dir_delete (__DIR__ .'/app_bundle');
0 ignored issues
show
The function dir_delete was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

44
/** @scrutinizer ignore-call */ 
45
dir_delete (__DIR__ .'/app_bundle');
Loading history...
45
unlink (__FILE__);
46
47
echo PHP_EOL . color ('   [green]Configuration completed[reset]'. PHP_EOL .
48
                      '   Thank for installing [yellow]winforms-php/VoidFramework[reset]!') . PHP_EOL . PHP_EOL;
49