Completed
Push — master ( 595e4b...944328 )
by Changwan
07:08
created

LoaderAbstract   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
namespace Wandu\Config\Loader;
3
4
use InvalidArgumentException;
5
use Wandu\Config\Contracts\Loader;
6
7
abstract class LoaderAbstract implements Loader
8
{
9
    /** @var string */
10
    protected $fileName;
11
12
    public function __construct(string $fileName)
13
    {
14
        if (!file_exists($fileName)) {
15
            throw new InvalidArgumentException("\"{$fileName}\" is not file name.");
16
        }
17
        $this->fileName = $fileName;
18
    }
19
}
20