private function getNestedTypeInArray(PropertyMetadata $item)
    {
        if (isset($item->type['name']) && in_array($item->type['name'], array('array', 'ArrayCollection'))) {
            if (isset($item->type['params'][1]['name'])) {
                // E.g. array<string, MyNamespaceMyObject>
                return $item->type['params'][1]['name'];
            }
            if (isset($item->type['params'][0]['name'])) {
                // E.g. array<MyNamespaceMyObject>
                return $item->type['params'][0]['name'];
            }
        }

        return null;
    }
private function getNestedTypeInArray(PropertyMetadata $item)
    {
        if (isset($item->type['name']) && in_array($item->type['name'], array('array', 'ArrayCollection'))) {
            if (isset($item->type['params'][1]['name'])) {
                // E.g. array<string, MyNamespaceMyObject>
                return $item->type['params'][1]['name'];
            }
            if (isset($item->type['params'][0]['name'])) {
                // E.g. array<MyNamespaceMyObject>
                return $item->type['params'][0]['name'];
            }
        }

        return null;
    }
private function getNestedTypeInArray ( PropertyMetadata $ item ) { if ( isset ( $ item -> type [ 'name' ] ) && in_array ( $ item -> type [ 'name' ] , array ( 'array' , 'ArrayCollection' ) ) ) { if ( isset ( $ item -> type [ 'params' ] [ 1 ] [ 'name' ] ) ) { // E.g. array<string, MyNamespaceMyObject> return $ item -> type [ 'params' ] [ 1 ] [ 'name' ] ; } if ( isset ( $ item -> type [ 'params' ] [ 0 ] [ 'name' ] ) ) { // E.g. array<MyNamespaceMyObject> return $ item -> type [ 'params' ] [ 0 ] [ 'name' ] ; } } return null ; }
Check the various ways JMS describes values in arrays, and
get the value type in the array

@param  PropertyMetadata $item
@return string|null
Check the various ways JMS describes values in arrays and get the value type in the array