src/Parser/FieldParser.php
private function validateParamBundleList(array $paramBundleList, $serverField)
    {
        foreach ($paramBundleList as $paramBundle) {
            try {
                $this->validateParamBundle($paramBundle);
            } catch (InvalidVariantException $e) {
                // Rethrow exception only if the field was provided by the server
                if ($serverField) {
                    throw $e;
                }
            }
        }
    }
private function validateParamBundleList(array $paramBundleList, $serverField)
    {
        foreach ($paramBundleList as $paramBundle) {
            try {
                $this->validateParamBundle($paramBundle);
            } catch (InvalidVariantException $e) {
                // Rethrow exception only if the field was provided by the server
                if ($serverField) {
                    throw $e;
                }
            }
        }
    }
private function validateParamBundleList ( array $ paramBundleList , $ serverField ) { foreach ( $ paramBundleList as $ paramBundle ) { try { $ this -> validateParamBundle ( $ paramBundle ) ; } catch ( InvalidVariantException $ e ) { // Rethrow exception only if the field was provided by the server if ( $ serverField ) { throw $ e ; } } } }
Checks to see if the parameters are correctly formed, if an anomaly is detected then an exception is thrown.

@throws InvalidVariantException

@param array<array<string>> $paramBundleList
@param bool $serverField     If true the field came from the server & we error on malformed data otherwise
we suppress errors for client preferences.
Checks to see if the parameters are correctly formed if an anomaly is detected then an exception is thrown .