GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 18-22 lines in 2 locations

application/modules/shop/helpers/PriceHandlers.php 2 locations

@@ 97-118 (lines=22) @@
94
     * @param $price
95
     * @return float
96
     */
97
    static public function getDiscountPriceOrder(
98
        Order $order,
99
        SpecialPriceList $specialPrice,
100
        $price
101
    ) {
102
103
        $discountPrice = 0;
104
105
        $discountObjects = SpecialPriceObject::findAll(
106
            [
107
                'special_price_list_id' => $specialPrice->id,
108
                'object_model_id' => $order->id
109
            ]
110
        );
111
112
        foreach ($discountObjects as $object) {
113
            $discountPrice += $object->price;
114
        }
115
116
117
        return $price + $discountPrice;
118
    }
119
120
    /**
121
     * @param Order $order
@@ 126-143 (lines=18) @@
123
     * @param $price
124
     * @return float
125
     */
126
    static public function getDeliveryPriceOrder(
127
        Order $order,
128
        SpecialPriceList $specialPrice,
129
        $price
130
    ) {
131
        $deliveryPrice = 0;
132
133
        $deliveryObjects = SpecialPriceObject::findAll([
134
            'special_price_list_id' => $specialPrice->id,
135
            'object_model_id' => $order->id
136
        ]);
137
138
        foreach ($deliveryObjects as $object) {
139
            $deliveryPrice += $object->price;
140
        }
141
142
        return $price + $deliveryPrice;
143
    }
144
145
    /**
146
     * @param array $types