Test Failed
Branch feature__set_up_scrutinizer (ea6624)
by Robin
06:04 queued 02:46
created

Image::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace App\Support\Images;
4
5
class Image
6
{
7
    /** @var string */
8
    protected $name;
9
10
    /** @var string|null */
11
    protected $localPath;
12
13 2
    public function __construct($name, $localPath = null)
14
    {
15 2
        $this->name = $name;
16 2
        $this->localPath = $localPath;
17 2
    }
18
19 2
    public function __get($name)
20
    {
21 2
        return $this->{$name} ?? null;
22
    }
23
}
24