getExitStatus() public method

Returns the error status that should be used to exit after parsing, otherwise it returns null.
public getExitStatus ( ) : mixed
return mixed An integer error status, or null
Example #1
0
File: pho.php Project: gsouf/pho
    Runner::getInstance()->afterEach($closure);
}
/**
 * Creates and returns a new Expectation for the supplied value.
 *
 * @param mixed $actual The value to test
 */
function expect($actual)
{
    return new Expectation($actual);
}
// Create a new Console and parse arguments
$console = new Console(array_slice($argv, 1), 'php://stdout');
$console->parseArguments();
// Disable color output if necessary
if ($console->options['no-color']) {
    $console->formatter->disableANSI();
}
// Exit if necessary
if ($console->getExitStatus() !== null) {
    exit($console->getExitStatus());
}
// Load global namespaced functions if required
if (!$console->options['namespace']) {
    $path = dirname(__FILE__) . '/globalPho.php';
    require_once $path;
}
// Start the runner
Runner::$console = $console;
Runner::getInstance()->run();
exit($console->getExitStatus());