protected function validate()
    {
        $numberSymbols = $this->findSubtypes(Number::class);
        if (sizeof($numberSymbols) != 1) {
            throw new NotFoundException(
                'Error: Expected to contain one number class but found '.sizeof($numberSymbols)
            );
        }

        foreach ($this->symbols as $symbol) {
            if (sizeof($symbol->getIdentifiers()) == 0 and ! is_a($symbol, Number::class)) {
                throw new \LengthException('Error: AbstractSymbol does not have any identifiers');
            }
        }
    }
protected function validate()
    {
        $numberSymbols = $this->findSubtypes(Number::class);
        if (sizeof($numberSymbols) != 1) {
            throw new NotFoundException(
                'Error: Expected to contain one number class but found '.sizeof($numberSymbols)
            );
        }

        foreach ($this->symbols as $symbol) {
            if (sizeof($symbol->getIdentifiers()) == 0 and ! is_a($symbol, Number::class)) {
                throw new \LengthException('Error: AbstractSymbol does not have any identifiers');
            }
        }
    }
protected function validate ( ) { $ numberSymbols = $ this -> findSubtypes ( Number :: class ) ; if ( sizeof ( $ numberSymbols ) != 1 ) { throw new NotFoundException ( 'Error: Expected to contain one number class but found ' . sizeof ( $ numberSymbols ) ) ; } foreach ( $ this -> symbols as $ symbol ) { if ( sizeof ( $ symbol -> getIdentifiers ( ) ) == 0 and ! is_a ( $ symbol , Number :: class ) ) { throw new \ LengthException ( 'Error: AbstractSymbol does not have any identifiers' ) ; } } }
Validates the symbol array. This is only a high-level validation.
Even if this validation passes, the symbols still might be corrupt.
Will throw an exception if validation fails.

@return void
@throws StringCalcException
Validates the symbol array . This is only a high - level validation . Even if this validation passes the symbols still might be corrupt . Will throw an exception if validation fails .