Passed
Pull Request — main (#96)
by Andrey
50:33 queued 35:34
created

Pathable   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 35
rs 10
c 1
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A pathTarget() 0 3 1
A pathSource() 0 3 1
A pathTargetFull() 0 3 1
A pathDirectory() 0 3 1
A pathFilename() 0 3 1
A pathLocales() 0 3 1
A pathExtension() 0 3 1
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