Code Duplication    Length = 10-10 lines in 2 locations

plugin/buycourses/src/buy_course_plugin.class.php 2 locations

@@ 1705-1714 (lines=10) @@
1702
     * @param int $status The status to set (-1 to cancel, 0 to pending, 1 to completed)
1703
     * @return array
1704
     */
1705
    public function setStatusPayouts($payoutId, $status)
1706
    {
1707
        $payoutsTable = Database::get_main_table(self::TABLE_PAYPAL_PAYOUTS);
1708
1709
        Database::update(
1710
            $payoutsTable,
1711
            ['status' => intval($status)],
1712
            ['id = ?' => intval($payoutId)]
1713
        );
1714
    }
1715
1716
    /**
1717
     * Gets the stored platform commission params
@@ 2163-2172 (lines=10) @@
2160
     * @param int $newStatus The new status
2161
     * @return boolean
2162
     */
2163
    private function updateServiceSaleStatus($serviceSaleId, $newStatus = self::SERVICE_STATUS_PENDING)
2164
    {
2165
        $serviceSaleTable = Database::get_main_table(self::TABLE_SERVICES_SALE);
2166
2167
        return Database::update(
2168
            $serviceSaleTable,
2169
            ['status' => intval($newStatus)],
2170
            ['id = ?' => intval($serviceSaleId)]
2171
        );
2172
    }
2173
2174
    /**
2175
     * Register a Service sale