Passed
Push — 9.x ( c610c7...55b0ab )
by Andrey
11:17
created

Pathable   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A pathTarget() 0 3 1
A pathDirectory() 0 3 1
A pathFilename() 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
    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 pathDirectory(string $path): string
25
    {
26
        return Path::directory($path);
27
    }
28
29
    protected function pathFilename(string $path): string
30
    {
31
        return Path::filename($path);
32
    }
33
34
    protected function pathExtension(string $path): string
35
    {
36
        return Path::extension($path);
37
    }
38
}
39