src/Server/Server.php
private function isValidDirective($directive, $message1, $message2)
    {
        if (!$this->checker->setString($directive)->getString()) {
            throw ServerException::forInvalidMatcher(
                $directive,
                $message1
            );
        }

        if (!$this->checker->hasKeyAndValueSubPattern()) {
            throw ServerException::forInvalidMatcher(
                $directive,
                $message2
            );
        }

        return true;
    }
private function isValidDirective($directive, $message1, $message2)
    {
        if (!$this->checker->setString($directive)->getString()) {
            throw ServerException::forInvalidMatcher(
                $directive,
                $message1
            );
        }

        if (!$this->checker->hasKeyAndValueSubPattern()) {
            throw ServerException::forInvalidMatcher(
                $directive,
                $message2
            );
        }

        return true;
    }
private function isValidDirective ( $ directive , $ message1 , $ message2 ) { if ( ! $ this -> checker -> setString ( $ directive ) -> getString ( ) ) { throw ServerException :: forInvalidMatcher ( $ directive , $ message1 ) ; } if ( ! $ this -> checker -> hasKeyAndValueSubPattern ( ) ) { throw ServerException :: forInvalidMatcher ( $ directive , $ message2 ) ; } return true ; }
Confirms if a directive matcher is a valid regex.

@param string $directive the directive matcher to check
@param string $message1  message exception if the matcher is not a string
@param string $message2  message exception if the matcher is not a valid regex

@throws ServerException if the directive matcher is invalid

@return bool true if the directive matcher is valid
Confirms if a directive matcher is a valid regex .