ExampleIntegration::packageEnvRootPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
use SolumDeSignum\PackageEnvLoader\Contracts\PackageEnvLoaderContract;
6
use SolumDeSignum\PackageEnvLoader\Traits\PackageEnvLoader;
7
8
class ExampleIntegration implements PackageEnvLoaderContract
9
{
10
    use PackageEnvLoader;
11
12
    /**
13
     * @var array|null[]|string|string[]
14
     */
15
    private $packageEnv;
16
17
    /**
18
     * ExampleIntegration constructor.
19
     */
20
    public function __construct()
21
    {
22
        $this->packageEnv = $this->createPackageDotenv('.env.dev');
23
    }
24
25
    /**
26
     * Example of configuration.
27
     *
28
     * @param string $path
29
     *
30
     * @return string
31
     */
32
    final public function packageEnvRootPath(string $path = '/..'): string
33
    {
34
        return __DIR__.$path;
35
    }
36
}
37