Passed
Pull Request — main (#123)
by Andrey
58:10 queued 43:14
created

Has   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A hasJson() 0 5 1
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Concerns;
4
5
use Helldar\LaravelLangPublisher\Facades\Path;
6
use Helldar\Support\Facades\Helpers\Str;
7
8
trait Has
9
{
10
    protected function hasJson(string $filename): bool
11
    {
12
        $extension = Path::extension($filename);
13
14
        return Str::lower($extension) === 'json';
15
    }
16
}
17