Reporter::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php declare(strict_types=1);
2
/**
3
 * Created by Vitaly Iegorov <[email protected]>.
4
 * on 22.09.16 at 17:45
5
 */
6
namespace samsonframework\bitbucket;
7
8
/**
9
 * Class Reporter
10
 *
11
 * @author Vitaly Egorov <[email protected]>
12
 */
13
abstract class Reporter
14
{
15
    /** @var string Reporter source path */
16
    protected $path;
17
18
    /**
19
     * Reporter constructor.
20
     *
21
     * @param string $path Reporter source path
22
     */
23
    public function __construct(string $path)
24
    {
25
        // Validate file
26
        if (!is_file($path)) {
27
            throw new \InvalidArgumentException($path.' - does not exists or not a file');
28
        }
29
30
        $this->path = $path;
31
    }
32
}
33