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

DeleteJson   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 delete() 0 5 2
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Services\Processors;
4
5
use Helldar\LaravelLangPublisher\Traits\Processors\Deletable;
6
use Illuminate\Support\Facades\File as IlluminateFile;
7
8
final class DeleteJson extends BaseProcessor
9
{
10
    use Deletable;
11
12
    protected $extension = 'json';
13
14
    protected function delete(): bool
15
    {
16
        return ! $this->isProtected()
17
            ? IlluminateFile::delete($this->targetPath())
18
            : false;
19
    }
20
}
21