for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Equip\Command;
use RuntimeException;
class CommandException extends RuntimeException
{
const MISSING_OPTION = 2000;
/*
* @param array $names
*
* @return static
* @since 1.2.0
*/
public static function missingOptions(array $names)
return new static(
sprintf('Required options not defined: `%s`', implode('`, `', $names)),
static::MISSING_OPTION
);
}
/**
* @param string $name
* @deprecated 1.2.0
public static function missingOption($name)
sprintf('Required option `%s` is not defined', $name),
* Get the HTTP status for the exception.
* @return integer
public function getHttpStatus()
if ($this->getCode() === static::MISSING_OPTION) {
return 400;
return 500;