Passed
Push — master ( 247a52...f18ab4 )
by Melech
07:21 queued 03:19
created

Config::setPropertiesAfterSettingFromEnv()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 11
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Cli\Routing;
15
16
use Valkyrja\Cli\Routing\Config\Cache;
17
use Valkyrja\Cli\Routing\Constant\ConfigName;
0 ignored issues
show
Bug introduced by
The type Valkyrja\Cli\Routing\Constant\ConfigName 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...
18
use Valkyrja\Cli\Routing\Constant\EnvName;
0 ignored issues
show
Bug introduced by
The type Valkyrja\Cli\Routing\Constant\EnvName 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...
19
use Valkyrja\Config\Config as ParentConfig;
20
21
/**
22
 * Class Config.
23
 *
24
 * @author Melech Mizrachi
25
 */
26
class Config extends ParentConfig
27
{
28
    /**
29
     * @inheritDoc
30
     *
31
     * @var array<string, string>
32
     */
33
    protected static array $envNames = [
34
        ConfigName::CONTROLLERS => EnvName::CONTROLLERS,
35
    ];
36
37
    /**
38
     * @param class-string[] $controllers The attributed controller classes
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string[] at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string[].
Loading history...
39
     */
40
    public function __construct(
41
        public array $controllers = [],
42
        public Cache|null $cache = null,
43
    ) {
44
    }
45
}
46