Code Duplication    Length = 10-10 lines in 3 locations

command/AbstractBillCommandHandler.php 1 location

@@ 52-61 (lines=10) @@
49
    /**
50
     * @return Product
51
     */
52
    protected function getProduct()
53
    {
54
        $flightProduct = new Product($this->db);
55
56
        if ($flightProduct->fetch($this->conf->BBC_FLIGHT_TYPE_CUSTOMER) <= 0) {
57
            throw new \InvalidArgumentException('Default product not configured');
58
        }
59
60
        return $flightProduct;
61
    }
62
63
    /**
64
     * @param int|null $receiverId

command/CreateFlightBillCommandHandler.php 1 location

@@ 93-102 (lines=10) @@
90
    /**
91
     * @return Product
92
     */
93
    private function getProduct()
94
    {
95
        $flightProduct = new Product($this->db);
96
97
        if ($flightProduct->fetch($this->conf->BBC_FLIGHT_TYPE_CUSTOMER) <= 0) {
98
            throw new \InvalidArgumentException('Default product not configured');
99
        }
100
101
        return $flightProduct;
102
    }
103
104
    /**
105
     * @param Bbcvols $flight

command/CreateOrderCommandHandler.php 1 location

@@ 101-110 (lines=10) @@
98
    /**
99
     * @return Product
100
     */
101
    private function getProduct()
102
    {
103
        $flightProduct = new Product($this->db);
104
105
        if ($flightProduct->fetch($this->conf->BBC_FLIGHT_TYPE_CUSTOMER) <= 0) {
106
            throw new \InvalidArgumentException('Default product not configured');
107
        }
108
109
        return $flightProduct;
110
    }
111
112
    /**
113
     * @param Product   $flightProduct