MethodDeliveryPaymentRepository::getPublic()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
3
namespace App\Repositories;
4
5
use App\MethodDeliveryPayment;
6
use App\MethodDeliveryPaymentTranslation;
7
8
class MethodDeliveryPaymentRepository extends Repository
9
{
10
    /**
11
     * @return MethodDeliveryPayment
12
     */
13
    public function getModel()
14
    {
15
        return new MethodDeliveryPayment();
16
    }
17
18
    /**
19
     * @return MethodDeliveryPaymentTranslation
20
     */
21
    public function getTranslatableModel()
22
    {
23
        return new MethodDeliveryPaymentTranslation();
24
    }
25
26
    /**
27
     * Get public posts.
28
     *
29
     * @param $perPage
30
     * @return \Illuminate\Database\Eloquent\Collection
31
     */
32
    public function getPublic($type)
33
    {
34
        return self::getModel()
0 ignored issues
show
Bug introduced by
The method active() does not exist on App\MethodDeliveryPayment. 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...
35
            ->active()
36
            ->whereType($type)
37
            ->orderBy('id', self::ASC)
38
            ->get();
39
    }
40
}