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

Pathable::pathLocales()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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