Code Duplication    Length = 7-12 lines in 3 locations

core/db_classes/EE_Checkin.class.php 1 location

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

core/db_classes/EE_Datetime.class.php 1 location

@@ 65-76 (lines=12) @@
62
     * @throws InvalidDataTypeException
63
     * @throws EE_Error
64
     */
65
    public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array())
66
    {
67
        $has_object = parent::_check_for_object(
68
            $props_n_values,
69
            __CLASS__,
70
            $timezone,
71
            $date_formats
72
        );
73
        return $has_object
74
            ? $has_object
75
            : new self($props_n_values, false, $timezone, $date_formats);
76
    }
77
78
79
    /**

core/db_classes/EE_Line_Item.class.php 1 location

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