Completed
Push — master ( 5dab40...ca534d )
by Maxime
120:18 queued 114:35
created

Language   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 22
ccs 0
cts 4
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A scopeWithTranslationElement() 0 4 1
A scopeWithoutCurrentLanguage() 0 4 1
1
<?php namespace Distilleries\Expendable\Models;
2
3
class Language extends BaseModel {
4
5
    use \Distilleries\Expendable\Models\StatusTrait;
6
7
    protected $fillable = [
8
        'libelle',
9
        'iso',
10
        'not_visible',
11
        'is_default',
12
        'status',
13
    ];
14
15
    public function scopeWithoutCurrentLanguage($query)
16
    {
17
        return $query->where($this->getTable().'.iso','<>',app()->getLocale());
18
    }
19
20
    public function scopeWithTranslationElement($query)
21
    {
22
        return $query->where($this->getTable().'.iso','<>',app()->getLocale());
23
    }
24
}