private function validateDocument(): void
    {
        if (!$this->is_binary_data) {
            return;
        }

        $res = base64_decode($this->document, true);
        if (false === $res || $this->document !== base64_encode($res)) {
            throw new SyntaxError(sprintf('invalid document, `%s`', $this->document));
        }
    }
private function validateDocument(): void
    {
        if (!$this->is_binary_data) {
            return;
        }

        $res = base64_decode($this->document, true);
        if (false === $res || $this->document !== base64_encode($res)) {
            throw new SyntaxError(sprintf('invalid document, `%s`', $this->document));
        }
    }
private function validateDocument ( ) : void { if ( ! $ this -> is_binary_data ) { return ; } $ res = base64_decode ( $ this -> document , true ) ; if ( false === $ res || $ this -> document !== base64_encode ( $ res ) ) { throw new SyntaxError ( sprintf ( 'invalid document, `%s`' , $ this -> document ) ) ; } }
Validate the path document string representation.

@throws SyntaxError If the data is invalid
Validate the path document string representation .