MethodDeliveryPaymentRepository   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 33
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 8 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
}