Passed
Push — master ( 2b04c5...3174fa )
by Jesús
01:25 queued 12s
created

ConfigFactory::createPathFinder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Framework\Config;
6
7
use Gacela\Framework\Config;
8
9
final class ConfigFactory
10
{
11
    /** @deprecated */
12
    private const GACELA_JSON_CONFIG_FILENAME = 'gacela.json';
13
14
    private const GACELA_PHP_CONFIG_FILENAME = 'gacela.php';
15
16 17
    public function createGacelaConfigFileFactory(): GacelaConfigFileFactoryInterface
17
    {
18
        /** @psalm-suppress DeprecatedConstant */
19 17
        return new GacelaConfigFileFactory(
20 17
            Config::getInstance()->getApplicationRootDir(),
21 17
            self::GACELA_PHP_CONFIG_FILENAME,
22 17
            self::GACELA_JSON_CONFIG_FILENAME
0 ignored issues
show
introduced by
The constant Gacela\Framework\Config\...LA_JSON_CONFIG_FILENAME has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

22
            /** @scrutinizer ignore-deprecated */ self::GACELA_JSON_CONFIG_FILENAME
Loading history...
23
        );
24
    }
25
26 10
    public function createPathFinder(): PathFinderInterface
27
    {
28 10
        return new PathFinder();
29
    }
30
}
31