src/Environment.php
public static function is($environment = null)
    {
        $current = Configure::read('Environment.name');

        if (! $environment) {
            return $current;
        }

        return $current === $environment;
    }
public static function is($environment = null)
    {
        $current = Configure::read('Environment.name');

        if (! $environment) {
            return $current;
        }

        return $current === $environment;
    }
public static function is ( $ environment = null ) { $ current = Configure :: read ( 'Environment.name' ) ; if ( ! $ environment ) { return $ current ; } return $ current === $ environment ; }
Checks if the current environment matches the passed environment

@param string $environment Name of the environment we are checking for
@return bool
Checks if the current environment matches the passed environment