Passed
Push — master ( 65b336...1323cd )
by Бабичев
44s
created

Resolable::resolver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 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 2
    public function resolver(): \Generator
17
    {
18 2
        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 null|Bavix\Router\Rule 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