protected function getEnvironmentArgument(array $args): ?string
    {
        $callback = static function ($v) {
            return self::startsWith($v, '--env');
        };

        foreach ($args as $key => $value) {
            if ($callback($value)) {
                return $value;
            }
        }

        return null;
    }
protected function getEnvironmentArgument(array $args): ?string
    {
        $callback = static function ($v) {
            return self::startsWith($v, '--env');
        };

        foreach ($args as $key => $value) {
            if ($callback($value)) {
                return $value;
            }
        }

        return null;
    }
protected function getEnvironmentArgument ( array $ args ) : ? string { $ callback = static function ( $ v ) { return self :: startsWith ( $ v , '--env' ) ; } ; foreach ( $ args as $ key => $ value ) { if ( $ callback ( $ value ) ) { return $ value ; } } return null ; }
Get the environment argument from the console.

@param array $args

@return null|string
Get the environment argument from the console .