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

Deletable::run()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

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

13
        $this->/** @scrutinizer ignore-call */ 
14
               delete()
Loading history...
14 12
            ? $this->push('*', Status::DELETED)
0 ignored issues
show
Bug introduced by
It seems like push() 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
            ? $this->/** @scrutinizer ignore-call */ push('*', Status::DELETED)
Loading history...
15 12
            : $this->push('*', Status::SKIPPED);
16
17 24
        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

17
        return $this->/** @scrutinizer ignore-call */ result();
Loading history...
18
    }
19
}
20