private function assertValidClientID($value, $fromPacket)
    {

        if (strlen($value) > 23) {
            $this->throwException(
                sprintf(
                    'Expected client id shorter than 24 bytes but got "%s".',
                    $value
                ),
                $fromPacket
            );
        }

        if ($value !== '' && !ctype_alnum($value)) {
            $this->throwException(
                sprintf(
                    'Expected a client id containing characters 0-9, a-z or A-Z but got "%s".',
                    $value
                ),
                $fromPacket
            );
        }
    }
private function assertValidClientID($value, $fromPacket)
    {

        if (strlen($value) > 23) {
            $this->throwException(
                sprintf(
                    'Expected client id shorter than 24 bytes but got "%s".',
                    $value
                ),
                $fromPacket
            );
        }

        if ($value !== '' && !ctype_alnum($value)) {
            $this->throwException(
                sprintf(
                    'Expected a client id containing characters 0-9, a-z or A-Z but got "%s".',
                    $value
                ),
                $fromPacket
            );
        }
    }
private function assertValidClientID ( $ value , $ fromPacket ) { if ( strlen ( $ value ) > 23 ) { $ this -> throwException ( sprintf ( 'Expected client id shorter than 24 bytes but got "%s".' , $ value ) , $ fromPacket ) ; } if ( $ value !== '' && ! ctype_alnum ( $ value ) ) { $ this -> throwException ( sprintf ( 'Expected a client id containing characters 0-9, a-z or A-Z but got "%s".' , $ value ) , $ fromPacket ) ; } }
Asserts that a client id is shorter than 24 bytes and only contains characters 0-9, a-z or A-Z.

@param string $value
@param bool   $fromPacket

@throws MalformedPacketException
@throws \InvalidArgumentException
Asserts that a client id is shorter than 24 bytes and only contains characters 0 - 9 a - z or A - Z .