Code Duplication    Length = 13-13 lines in 3 locations

core/db_classes/EE_Payment.class.php 1 location

@@ 107-119 (lines=13) @@
104
     * @throws InvalidDataTypeException
105
     * @throws EE_Error
106
     */
107
    protected function __construct(
108
        array $fieldValues = array(),
109
        $bydb = false,
110
        $timezone = '',
111
        array $date_formats = array(),
112
        MoneyFactory $money_factory = null
113
    ) {
114
        if (! $money_factory instanceof MoneyFactory) {
115
            $money_factory = LoaderFactory::getLoader()->getShared('EventEspresso\core\services\currency\MoneyFactory');
116
        }
117
        $this->money_factory = $money_factory;
118
        parent::__construct($fieldValues, $bydb, $timezone, $date_formats);
119
    }
120
121
122
    /**

core/db_classes/EE_Price.class.php 1 location

@@ 107-119 (lines=13) @@
104
     * @throws InvalidDataTypeException
105
     * @throws EE_Error
106
     */
107
    protected function __construct(
108
        array $fieldValues = array(),
109
        $bydb = false,
110
        $timezone = '',
111
        array $date_formats = array(),
112
        MoneyFactory $money_factory = null
113
    ) {
114
        if (! $money_factory instanceof MoneyFactory) {
115
            $money_factory = LoaderFactory::getLoader()->getShared('EventEspresso\core\services\currency\MoneyFactory');
116
        }
117
        $this->money_factory = $money_factory;
118
        parent::__construct($fieldValues, $bydb, $timezone, $date_formats);
119
    }
120
121
122
    /**

core/db_classes/EE_Ticket.class.php 1 location

@@ 156-168 (lines=13) @@
153
     * @throws InvalidDataTypeException
154
     * @throws EE_Error
155
     */
156
    protected function __construct(
157
        array $fieldValues = array(),
158
        $bydb = false,
159
        $timezone = '',
160
        array $date_formats = array(),
161
        MoneyFactory $money_factory = null
162
    ) {
163
        if (! $money_factory instanceof MoneyFactory) {
164
            $money_factory = LoaderFactory::getLoader()->getShared('EventEspresso\core\services\currency\MoneyFactory');
165
        }
166
        $this->money_factory = $money_factory;
167
        parent::__construct($fieldValues, $bydb, $timezone, $date_formats);
168
    }
169
170
171
    /**