Passed
Push — orm-dm ( fe3818...c3badf )
by Nikolaos
22:30 queued 19:58
created

Json   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 13
ccs 4
cts 5
cp 0.8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
/**
4
 * This file is part of the Phalcon Framework.
5
 *
6
 * (c) Phalcon Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Phalcon\Config\Adapter;
15
16
use Phalcon\Config;
17
use Phalcon\Helper\Json as JsonHelper;
18
19
class Json extends Config
20
{
21
    /**
22
     * Json constructor.
23
     *
24
     * @param string $filePath
25
     */
26 28
    public function __construct(string $filePath)
27
    {
28 28
        parent::__construct(
29
            JsonHelper::decode(
30 28
                file_get_contents($filePath),
31 28
                true
32
            )
33
        );
34 28
    }
35
}
36