src/Codec/OrderedTimeCodec.php
public function decodeBytes($bytes)
    {
        if (strlen($bytes) !== 16) {
            throw new InvalidArgumentException('$bytes string should contain 16 characters.');
        }

        $hex = unpack('H*', $bytes)[1];

        // Rearrange the fields to their original order
        $hex = substr($hex, 8, 4) . substr($hex, 12, 4) . substr($hex, 4, 4) . substr($hex, 0, 4) . substr($hex, 16);

        return $this->decode($hex);
    }
public function decodeBytes($bytes)
    {
        if (strlen($bytes) !== 16) {
            throw new InvalidArgumentException('$bytes string should contain 16 characters.');
        }

        $hex = unpack('H*', $bytes)[1];

        // Rearrange the fields to their original order
        $hex = substr($hex, 8, 4) . substr($hex, 12, 4) . substr($hex, 4, 4) . substr($hex, 0, 4) . substr($hex, 16);

        return $this->decode($hex);
    }
public function decodeBytes ( $ bytes ) { if ( strlen ( $ bytes ) !== 16 ) { throw new InvalidArgumentException ( '$bytes string should contain 16 characters.' ) ; } $ hex = unpack ( 'H*' , $ bytes ) [ 1 ] ; // Rearrange the fields to their original order $ hex = substr ( $ hex , 8 , 4 ) . substr ( $ hex , 12 , 4 ) . substr ( $ hex , 4 , 4 ) . substr ( $ hex , 0 , 4 ) . substr ( $ hex , 16 ) ; return $ this -> decode ( $ hex ) ; }
Decodes an optimized binary representation of a UUID into a UuidInterface object instance

@param string $bytes
@return UuidInterface
@throws \InvalidArgumentException if string has not 16 characters
Decodes an optimized binary representation of a UUID into a UuidInterface object instance