/** * @param array $globals */ public static function initCLI(array $globals = array()) { $globals = !empty($globals) ? $globals : $GLOBALS; self::$context = (new CliFactory())->newContext($globals); }