Path   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPath() 0 3 1
A __construct() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Redislabs\Module\ReJSON;
5
6
final class Path
7
{
8
    private $path;
9
10
    public function __construct(?string $path = '.')
11
    {
12
        $this->path = $path;
13
    }
14
15
    public function getPath() : string
16
    {
17
        return $this->path;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->path could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
18
    }
19
}
20