EnvExtension::getGlobals()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Twig\Extension;
6
7
use Symfony\Component\HttpKernel\Kernel;
8
use Twig\Extension\AbstractExtension;
9
use Twig\Extension\GlobalsInterface;
10
11
/**
12
 * Env related stuff.
13
 */
14
final class EnvExtension extends AbstractExtension implements GlobalsInterface
15
{
16
    /**
17
     * @return array<string,string>
18
     */
19 10
    public function getGlobals(): array
20
    {
21 10
        return [
22 10
            'sf_version' => Kernel::VERSION,
23 10
            'php_version' => \PHP_VERSION,
24 10
            'php_sapi' => \PHP_SAPI,
25 10
        ];
26
    }
27
}
28