Resolable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 14
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolver() 0 3 1
1
<?php
2
3
namespace Bavix\Router;
4
5
trait Resolable
6
{
7
8
    /**
9
     * @var array
10
     */
11
    protected $resolver;
12
13
    /**
14
     * @return \Generator
15
     */
16 4
    public function resolver(): \Generator
17
    {
18 4
        return (new Loader($this->resolver, $this))->routes();
0 ignored issues
show
Bug introduced by
$this of type Bavix\Router\Resolable is incompatible with the type Bavix\Router\Rule|null expected by parameter $parent of Bavix\Router\Loader::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

18
        return (new Loader($this->resolver, /** @scrutinizer ignore-type */ $this))->routes();
Loading history...
19
    }
20
21
}
22