Passed
Pull Request — master (#60)
by Andrey
11:17
created

Deletable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 9 2
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Traits\Processors;
4
5
use Helldar\LaravelLangPublisher\Constants\Status;
6
7
trait Deletable
8
{
9
    public function run(): array
10
    {
11
        $this->checkExists($this->targetPath());
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

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

11
        $this->checkExists($this->/** @scrutinizer ignore-call */ targetPath());
Loading history...
12
13
        $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
            ? $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
            : $this->push('*', Status::SKIPPED);
16
17
        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