FaqRepository   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getModel() 0 4 1
A getTranslatableModel() 0 4 1
A getPublic() 0 7 1
1
<?php
2
3
namespace App\Repositories;
4
5
use App\Faq;
6
use App\FaqTranslations;
7
8
class FaqRepository extends Repository
9
{
10
    /**
11
     * @return Faq
12
     */
13
    public function getModel()
14
    {
15
        return new Faq();
16
    }
17
18
    /**
19
     * @return FaqTranslations
20
     */
21
    public function getTranslatableModel()
22
    {
23
        return new FaqTranslations();
24
    }
25
26
    /**
27
     * Get public faq.
28
     *
29
     * @return mixed
30
     */
31
    public function getPublic()
32
    {
33
        return self::getModel()
0 ignored issues
show
Bug introduced by
The method active() does not exist on App\Faq. Did you maybe mean scopeActive()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
34
            ->active()
35
            ->ranked()
36
            ->get();
37
    }
38
}