Code Duplication    Length = 12-12 lines in 2 locations

core/db_models/EEM_Event.model.php 1 location

@@ 66-77 (lines=12) @@
63
     * @return EEM_Event
64
     * @throws \EE_Error
65
     */
66
    public static function instance($timezone = null)
67
    {
68
        // check if instance of EEM_Event already exists
69
        if (! self::$_instance instanceof EEM_Event) {
70
            // instantiate Espresso_model
71
            self::$_instance = new self($timezone);
72
        }
73
        //we might have a timezone set, let set_timezone decide what to do with it
74
        self::$_instance->set_timezone($timezone);
75
        // EEM_Event object
76
        return self::$_instance;
77
    }
78
79
80

core/db_models/EEM_Base.model.php 1 location

@@ 682-693 (lines=12) @@
679
     *                         timezone in the 'timezone_string' wp option)
680
     * @return static (as in the concrete child class)
681
     */
682
    public static function instance($timezone = null)
683
    {
684
        // check if instance of Espresso_model already exists
685
        if (! static::$_instance instanceof static) {
686
            // instantiate Espresso_model
687
            static::$_instance = new static($timezone, self::getLoader());
688
        }
689
        //we might have a timezone set, let set_timezone decide what to do with it
690
        static::$_instance->set_timezone($timezone);
691
        // Espresso_model object
692
        return static::$_instance;
693
    }
694
695
696