src/PHPStubs/TypeRefiner.php
private function inferArrayElementTypeFromDesc($desc)
    {
        if (preg_match_all('#array\s+of\s+``([^`]+)``#', $desc, $matches)) {
            $types = array();
            foreach ($matches[1] as $m) {
                $types[] = $m.'[]';
            }

            return implode('|', $types);
        }

        return null;
    }
private function inferArrayElementTypeFromDesc($desc)
    {
        if (preg_match_all('#array\s+of\s+``([^`]+)``#', $desc, $matches)) {
            $types = array();
            foreach ($matches[1] as $m) {
                $types[] = $m.'[]';
            }

            return implode('|', $types);
        }

        return null;
    }
private function inferArrayElementTypeFromDesc ( $ desc ) { if ( preg_match_all ( '#array\s+of\s+``([^`]+)``#' , $ desc , $ matches ) ) { $ types = array ( ) ; foreach ( $ matches [ 1 ] as $ m ) { $ types [ ] = $ m . '[]' ; } return implode ( '|' , $ types ) ; } return null ; }
Infers the element type of an array from the description.

@param string $desc

@return string|null
Infers the element type of an array from the description .