protected function isReturncodeValid(int $code): bool {
    	try {
        	$reflection = new \ReflectionClass('\\' . __NAMESPACE__ . '\\interfaces\\NagiosCodes');
        	return in_array($code, $reflection->getConstants());
		} catch (\ReflectionException $exception) {
    		return false;
		}
    }
protected function isReturncodeValid(int $code): bool {
    	try {
        	$reflection = new \ReflectionClass('\\' . __NAMESPACE__ . '\\interfaces\\NagiosCodes');
        	return in_array($code, $reflection->getConstants());
		} catch (\ReflectionException $exception) {
    		return false;
		}
    }
protected function isReturncodeValid ( int $ code ) : bool { try { $ reflection = new \ ReflectionClass ( '\\' . __NAMESPACE__ . '\\interfaces\\NagiosCodes' ) ; return in_array ( $ code , $ reflection -> getConstants ( ) ) ; } catch ( \ ReflectionException $ exception ) { return false ; } }
Determines if given returncode is a valid code that nagios understands

@param int $code
@return bool
Determines if given returncode is a valid code that nagios understands