init(); } return static::$instance; } /** * Runs only once, at the first instantiation of the Singleton. * * @since 2.0.0 * @return void */ public function init(): void { $this->has_parents() && method_exists(get_parent_class($this), 'init') && parent::init(); } /** * Check if the current class has parents. * * @since 2.0.11 * @return boolean */ public function has_parents(): bool { return (bool) class_parents($this); } }