private function scanNextType($string)
    {
        foreach ($this->patterns as $type => $pattern) {
            if (preg_match('/^(' . $pattern . ')/sS', $string, $matches) === 1) {
                return [
                    'type'   => $type,
                    'match'  => $matches[1],
                    'length' => strlen($matches[1]),
                ];
            }
        }

        return null;
    }
private function scanNextType($string)
    {
        foreach ($this->patterns as $type => $pattern) {
            if (preg_match('/^(' . $pattern . ')/sS', $string, $matches) === 1) {
                return [
                    'type'   => $type,
                    'match'  => $matches[1],
                    'length' => strlen($matches[1]),
                ];
            }
        }

        return null;
    }
private function scanNextType ( $ string ) { foreach ( $ this -> patterns as $ type => $ pattern ) { if ( preg_match ( '/^(' . $ pattern . ')/sS' , $ string , $ matches ) === 1 ) { return [ 'type' => $ type , 'match' => $ matches [ 1 ] , 'length' => strlen ( $ matches [ 1 ] ) , ] ; } } return null ; }
Determines the next type of the given string

@param string $string

@return array|null
Determines the next type of the given string