Passed
Push — master ( f5390f...ff2936 )
by Alexander
02:09
created

Envs::paramsRequired()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Composer\Config\Config;
6
7
use Yiisoft\Composer\Config\Util\Helper;
8
9
/**
10
 * DotEnv class represents output configuration file with ENV values.
11
 */
12
class Envs extends Config
13
{
14 1
    protected function writeFile(string $path, array $data): void
15
    {
16 1
        $envs = Helper::exportVar($data);
17
18
        $content = <<<PHP
19 1
<?php
20 1
return {$envs};
21
PHP;
22
23 1
        $this->contentWriter->write($path, $content . PHP_EOL);
24 1
    }
25
26
    protected function envsRequired(): bool
27
    {
28
        return false;
29
    }
30
31
    protected function constantsRequired(): bool
32
    {
33
        return false;
34
    }
35
36
    protected function paramsRequired(): bool
37
    {
38
        return false;
39
    }
40
}
41