src/Core/Application.php
public function detectEnvironment(Closure $callback)
    {
        $args = $_SERVER['argv'] ?? null;

        return $this['env'] = (new EnvironmentDetector())->detect($callback, $args);
    }
public function detectEnvironment(Closure $callback)
    {
        $args = $_SERVER['argv'] ?? null;

        return $this['env'] = (new EnvironmentDetector())->detect($callback, $args);
    }
public function detectEnvironment ( Closure $ callback ) { $ args = $ _SERVER [ 'argv' ] ?? null ; return $ this [ 'env' ] = ( new EnvironmentDetector ( ) ) -> detect ( $ callback , $ args ) ; }
Detech application's current environment.

@param Closure $callback

@return string
Detech application s current environment .