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

DeleteJson::delete()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 2
nc 2
nop 0
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