Passed
Push — main ( 55f929...127e84 )
by Andrey
161:41 queued 158:10
created

Install   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 87.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 16
ccs 7
cts 8
cp 0.875
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 14 3
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Services\Processors;
4
5
use Helldar\LaravelLangPublisher\Constants\Status;
6
7
final class Install extends Processor
8
{
9 9
    public function run(): string
10
    {
11 9
        if (! $this->force && $this->exists()) {
12
            return Status::SKIPPED;
13
        }
14
15 9
        $source = $this->load($this->source_path);
16 9
        $target = $this->load($this->target_path);
17
18 9
        $result = $this->compare($source, $target);
19
20 9
        $this->store($this->target_path, $result);
21
22 9
        return Status::COPIED;
23
    }
24
}
25