Passed
Pull Request — master (#1306)
by Curtis
06:06
created

LanguageTable::templatePath()   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
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Tables\Builders\enso\Localisation;
4
5
use Illuminate\Database\Eloquent\Builder;
6
use App\Models\enso\Localisation\Language;
7
use LaravelEnso\Tables\Contracts\Table;
8
9
class LanguageTable implements Table
10
{
11
    protected const TemplatePath = __DIR__.'/../../../Templates/enso/localisation/languages.json';
12
13
    public function query(): Builder
14
    {
15
        return Language::selectRaw('
0 ignored issues
show
Bug Best Practice introduced by
The expression return App\Models\enso\L...s.created_at ') could return the type Illuminate\Database\Query\Builder which is incompatible with the type-hinted return Illuminate\Database\Eloquent\Builder. Consider adding an additional type-check to rule them out.
Loading history...
16
            languages.id, languages.display_name, languages.name,
17
            languages.flag, is_rtl, is_active, languages.created_at
18
        ');
19
    }
20
21
    public function templatePath(): string
22
    {
23
        return static::TemplatePath;
24
    }
25
}
26