FaqRepository::getTranslatableModel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
}