Passed
Push — main ( 545ade...3cfdef )
by Andrey
79:39 queued 77:29
created

Pathable   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 85.71%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 35
ccs 12
cts 14
cp 0.8571
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A pathTarget() 0 3 1
A pathDirectory() 0 3 1
A pathFilename() 0 3 1
A pathLocales() 0 3 1
A pathExtension() 0 3 1
A pathSource() 0 3 1
A pathTargetFull() 0 3 1
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Concerns;
4
5
use Helldar\LaravelLangPublisher\Facades\Path;
6
7
trait Pathable
8
{
9 20
    protected function pathSource(string $package, string $locale): string
10
    {
11 20
        return Path::source($package, $locale);
12
    }
13
14 20
    protected function pathTarget(string $locale, bool $is_json = false): string
15
    {
16 20
        return Path::target($locale, $is_json);
17
    }
18
19 12
    protected function pathTargetFull(string $locale, ?string $filename, bool $is_json = false): string
20
    {
21 12
        return Path::targetFull($locale, $filename, $is_json);
22
    }
23
24 16
    protected function pathLocales(string $package, string $locale = null): string
25
    {
26 16
        return Path::locales($package, $locale);
27
    }
28
29
    protected function pathDirectory(string $path): string
30
    {
31
        return Path::directory($path);
32
    }
33
34 11
    protected function pathFilename(string $path): string
35
    {
36 11
        return Path::filename($path);
37
    }
38
39 11
    protected function pathExtension(string $path): string
40
    {
41 11
        return Path::extension($path);
42
    }
43
}
44