cdn77 / Tracy-Blue-Screen-Bundle

@@ -15,6 +15,8 @@
Loading
15 15
16 16
use function assert;
17 17
use function dirname;
18 +
use function is_bool;
19 +
use function is_string;
18 20
19 21
//phpcs:disable SlevomatCodingStandard.Files.LineLength.LineTooLong
20 22
final class TracyBlueScreenExtension extends ConfigurableExtension implements PrependExtensionInterface
@@ -71,7 +73,9 @@
Loading
71 73
        $loader->load('services.yml');
72 74
73 75
        $environment = $container->getParameter('kernel.environment');
76 +
        assert(is_string($environment));
74 77
        $debug = $container->getParameter('kernel.debug');
78 +
        assert(is_bool($debug));
75 79
76 80
        if (
77 81
            $this->isEnabled(
@@ -99,11 +103,18 @@
Loading
99 103
    /** @param mixed[] $config */
100 104
    public function getConfiguration(array $config, ContainerBuilder $container) : Configuration
101 105
    {
106 +
        $kernelProjectDir = $container->getParameter('kernel.project_dir');
107 +
        $kernelLogsDir = $container->getParameter('kernel.logs_dir');
108 +
        $kernelCacheDir = $container->getParameter('kernel.cache_dir');
109 +
        assert(is_string($kernelProjectDir));
110 +
        assert(is_string($kernelLogsDir));
111 +
        assert(is_string($kernelCacheDir));
112 +
102 113
        return new Configuration(
103 114
            $this->getAlias(),
104 -
            $container->getParameter('kernel.project_dir'),
105 -
            $container->getParameter('kernel.logs_dir'),
106 -
            $container->getParameter('kernel.cache_dir')
115 +
            $kernelProjectDir,
116 +
            $kernelLogsDir,
117 +
            $kernelCacheDir
107 118
        );
108 119
    }
109 120

@@ -30,7 +30,7 @@
Loading
30 30
    private $alias;
31 31
32 32
    /** @var string */
33 -
    private $kernelRootDir;
33 +
    private $kernelProjectDir;
34 34
35 35
    /** @var string */
36 36
    private $kernelLogsDir;
@@ -38,10 +38,10 @@
Loading
38 38
    /** @var string */
39 39
    private $kernelCacheDir;
40 40
41 -
    public function __construct(string $alias, string $kernelRootDir, string $kernelLogsDir, string $kernelCacheDir)
41 +
    public function __construct(string $alias, string $kernelProjectDir, string $kernelLogsDir, string $kernelCacheDir)
42 42
    {
43 43
        $this->alias = $alias;
44 -
        $this->kernelRootDir = $kernelRootDir;
44 +
        $this->kernelProjectDir = $kernelProjectDir;
45 45
        $this->kernelLogsDir = $kernelLogsDir;
46 46
        $this->kernelCacheDir = $kernelCacheDir;
47 47
    }
@@ -108,7 +108,7 @@
Loading
108 108
                            ->prototype('scalar')
109 109
                                ->end()
110 110
                            ->defaultValue([
111 -
                                $this->kernelRootDir . '/bootstrap.php.cache',
111 +
                                $this->kernelProjectDir . '/bootstrap.php.cache',
112 112
                                $this->kernelCacheDir,
113 113
                            ])
114 114
                            ->end()
Files Coverage
src 92.53%
Project Totals (6 files) 92.53%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading