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

LoaderAbstract::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
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