Passed
Pull Request — main (#96)
by Andrey
79:05 queued 64:02
created

Pathable::pathTarget()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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