Passed
Push — master ( 68f9e3...36b0af )
by Andrey
02:57 queued 39s
created

Processable::getProcessor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Traits\Containers;
4
5
use Helldar\LaravelLangPublisher\Contracts\Processor;
6
7
trait Processable
8
{
9
    /** @var string */
10
    protected $processor;
11
12 78
    protected function getProcessor(): Processor
13
    {
14 78
        $path = $this->getPath();
0 ignored issues
show
Bug introduced by
It seems like getPath() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

14
        /** @scrutinizer ignore-call */ 
15
        $path = $this->getPath();
Loading history...
15
16 78
        return $this->container($this->processor, compact('path'));
0 ignored issues
show
Bug introduced by
It seems like container() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

16
        return $this->/** @scrutinizer ignore-call */ container($this->processor, compact('path'));
Loading history...
17
    }
18
}
19