Lukasoppermann\Httpstatus\Httpstatus::hasStatusCode PHP Method

hasStatusCode() public method

Check if the code exists in a collection.
public hasStatusCode ( integer $statusCode ) : boolean
$statusCode integer http status code
return boolean true|false
    public function hasStatusCode($statusCode)
    {
        try {
            $statusCode = $this->filterStatusCode($statusCode);
        } catch (InvalidArgumentException $e) {
            return false;
        }
        return isset($this->httpStatus[$statusCode]);
    }