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

Processable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 10
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getProcessor() 0 5 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