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

Publishable::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Traits\Processors;
4
5
trait Publishable
6
{
7 54
    public function run(): array
8
    {
9 54
        $this->checkExists($this->sourcePath());
0 ignored issues
show
Bug introduced by
It seems like checkExists() 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

9
        $this->/** @scrutinizer ignore-call */ 
10
               checkExists($this->sourcePath());
Loading history...
Bug introduced by
It seems like sourcePath() 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

9
        $this->checkExists($this->/** @scrutinizer ignore-call */ sourcePath());
Loading history...
10 30
        $this->publish();
0 ignored issues
show
Bug introduced by
It seems like publish() 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

10
        $this->/** @scrutinizer ignore-call */ 
11
               publish();
Loading history...
11
12 30
        return $this->result();
0 ignored issues
show
Bug introduced by
It seems like result() 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

12
        return $this->/** @scrutinizer ignore-call */ result();
Loading history...
13
    }
14
}
15