Code Duplication    Length = 7-22 lines in 5 locations

core/db_classes/EE_Checkin.class.php 1 location

@@ 49-55 (lines=7) @@
46
     * @return EE_Checkin
47
     * @throws EE_Error
48
     */
49
    public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array())
50
    {
51
        $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
52
        return $has_object
53
            ? $has_object
54
            : new self($props_n_values, false, $timezone, $date_formats);
55
    }
56
57
58

core/db_classes/EE_Line_Item.class.php 1 location

@@ 47-53 (lines=7) @@
44
     * @return EE_Line_Item
45
     * @throws EE_Error
46
     */
47
    public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array())
48
    {
49
        $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
50
        return $has_object
51
            ? $has_object
52
            : new self($props_n_values, false, $timezone);
53
    }
54
55
56

core/db_classes/EE_Payment.class.php 1 location

@@ 37-58 (lines=22) @@
34
     * @throws InvalidDataTypeException
35
     * @throws EE_Error
36
     */
37
    public static function new_instance(
38
        $props_n_values = array(),
39
        $timezone = null,
40
        $date_formats = array(),
41
        MoneyFactory $money_factory = null
42
    ) {
43
        $has_object = parent::_check_for_object(
44
            $props_n_values,
45
            __CLASS__,
46
            $timezone,
47
            $date_formats
48
        );
49
        return $has_object
50
            ? $has_object
51
            : new self(
52
                $props_n_values,
53
                false,
54
                $timezone,
55
                $date_formats,
56
                $money_factory
57
            );
58
    }
59
60
61
    /**

core/db_classes/EE_Price.class.php 1 location

@@ 37-58 (lines=22) @@
34
     * @throws InvalidDataTypeException
35
     * @throws EE_Error
36
     */
37
    public static function new_instance(
38
        $props_n_values = array(),
39
        $timezone = null,
40
        $date_formats = array(),
41
        MoneyFactory $money_factory = null
42
    ) {
43
        $has_object = parent::_check_for_object(
44
            $props_n_values,
45
            __CLASS__,
46
            $timezone,
47
            $date_formats
48
        );
49
        return $has_object
50
            ? $has_object
51
            : new self(
52
                $props_n_values,
53
                false,
54
                $timezone,
55
                $date_formats,
56
                $money_factory
57
            );
58
    }
59
60
61
    /**

core/db_classes/EE_Ticket.class.php 1 location

@@ 86-107 (lines=22) @@
83
     * @throws InvalidDataTypeException
84
     * @throws EE_Error
85
     */
86
    public static function new_instance(
87
        $props_n_values = array(),
88
        $timezone = null,
89
        $date_formats = array(),
90
        MoneyFactory $money_factory = null
91
    ) {
92
        $has_object = parent::_check_for_object(
93
            $props_n_values,
94
            __CLASS__,
95
            $timezone,
96
            $date_formats
97
        );
98
        return $has_object
99
            ? $has_object
100
            : new self(
101
                $props_n_values,
102
                false,
103
                $timezone,
104
                $date_formats,
105
                $money_factory
106
            );
107
    }
108
109
110
    /**