Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 790-792 (lines=3) @@
787
     */
788
    public function registerSale($itemId, $paymentType)
789
    {
790
        if (!in_array($paymentType, [self::PAYMENT_TYPE_PAYPAL, self::PAYMENT_TYPE_TRANSFER, self::PAYMENT_TYPE_CULQI])) {
791
            return false;
792
        }
793
794
        $entityManager = Database::getManager();
795
@@ 2129-2131 (lines=3) @@
2126
     */
2127
    public function registerServiceSale($serviceId, $paymentType, $infoSelect, $trial = null)
2128
    {
2129
        if (!in_array($paymentType, [self::PAYMENT_TYPE_PAYPAL, self::PAYMENT_TYPE_TRANSFER, self::PAYMENT_TYPE_CULQI])) {
2130
            return false;
2131
        }
2132
2133
        $userId = api_get_user_id();
2134