Returns an array

@return int Length of array
773334
@SuppressWarnings({ "unchecked", "rawtypes" })
    @Override
    public Object readArray(Type target) {
        int count = readInteger();
        log.debug("Count: {} and {} ref {}", new Object[] { count, (count & 1), (count >> 1) });
        if ((count & 1) == 0) {
            //Reference
            Object ref = getReference(count >> 1);
            if (ref != null) {
                return ref;
            }
        }
        count = (count >> 1);
        String key = readString();
        amf3_mode += 1;
        Object result;
        if (key.equals("")) {
            Class<?> nested = Object.class;
            Class<?> collection = Collection.class;
            Collection resultCollection;
            if (target instanceof ParameterizedType) {
                ParameterizedType t = (ParameterizedType) target;
                Type[] actualTypeArguments = t.getActualTypeArguments();
                if (actualTypeArguments.length == 1) {
                    nested = (Class<?>) actualTypeArguments[0];
                }
                target = t.getRawType();
            }
            if (target instanceof Class) {
                collection = (Class) target;
            }
            if (collection.isArray()) {
                nested = ArrayUtils.getGenericType(collection.getComponentType());
                result = Array.newInstance(nested, count);
                storeReference(result);
                for (int i = 0; i < count; i++) {
                    final Object value = Deserializer.deserialize(this, nested);
                    Array.set(result, i, value);
                }
            } else {
                if (SortedSet.class.isAssignableFrom(collection)) {
                    resultCollection = new TreeSet();
                } else if (Set.class.isAssignableFrom(collection)) {
                    resultCollection = new HashSet(count);
                } else {
                    resultCollection = new ArrayList(count);
                }
                result = resultCollection;
                storeReference(result);
                for (int i = 0; i < count; i++) {
                    final Object value = Deserializer.deserialize(this, nested);
                    resultCollection.add(value);
                }
            }
        } else {
            Class<?> v = Object.class;
            Class<?> collection = Collection.class;
            if (target instanceof ParameterizedType) {
                ParameterizedType t = (ParameterizedType) target;
                Type[] actualTypeArguments = t.getActualTypeArguments();
                if (actualTypeArguments.length == 2) {
                    //k = (Class<?>) actualTypeArguments[0];
                    v = (Class<?>) actualTypeArguments[1];
                }
                target = t.getRawType();
            }
            if (target instanceof Class) {
                collection = (Class) target;
            }
            if (SortedMap.class.isAssignableFrom(collection)) {
                collection = TreeMap.class;
            } else {
                collection = HashMap.class;
            }
            Map resultMap;
            try {
                resultMap = (Map) collection.newInstance();
            } catch (Exception e) {
                resultMap = new HashMap(count);
            }
            // associative array
            storeReference(resultMap);
            while (!key.equals("")) {
                final Object value = Deserializer.deserialize(this, v);
                resultMap.put(key, value);
                key = readString();
            }
            for (int i = 0; i < count; i++) {
                final Object value = Deserializer.deserialize(this, v);
                resultMap.put(i, value);
            }
            result = resultMap;
        }
        amf3_mode -= 1;
        return result;
    }
779916
public function getLength()
    {
        $length = $this->length64;

        if ($length == 0) {
            $length = $this->length16;
        }

        if ($length == 0) {
            $length = $this->length;
        }

        return $length;
    }
1277647
public function toArray()
    {
        
        $result = $this->array;
        
        foreach ($result as $key => $val) {
            
            /**
             * @var self $val
             */
            if (is_a($val, self::class)) {
                $result[$key] = $val->toArray();
            } else {
                $result[$key] = $val;
            }
        }
        
        return $result;
    }
439102
public function toArray()
    {
        $type = $this->getType();
        $array = array(
            'type' => $type,
        );
        if ('function' == $type) {
            $array['function'] = $this->getFunction();
        } else {
            $array['class']  = $this->getClass();
            $array['method'] = $this->getMethod();
        }
        return $array;
    }
1278315
public function toArray()
    {
        $ary = [];

        foreach ($this as $key => $value) {
            $ary[$key] = $value;
        }

        return $ary;
    }
1370092
public function toArray()
    {
        return [
            'fileId' => $this->file->getId(),
            'fileVersion' => $this->file->getVersion(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
1290446
public function toArray()
	{
		$error = array(
			'code'    => $this->getCode(),
			'message' => $this->getMessage(),
		);

		if ($this->getData()) {
			$error['data'] = $this->getData();
		}

		return $error;
	}
1013719
public function asArray()
    {
        $array = [];

        foreach ($this as $key => $val) {
            if ($val instanceof self) {
                $val = $val->asArray();
            }
            $array[$key] = $val;
        }

        return $array;
    }
1091612
public function toArray()
    {
        return [
            'name'     => $this->getName(),
            'label'    => $this->getLabel(),
            'width'    => $this->getWidth(),
            'fixed'    => $this->isFixed(),
            'minWidth' => $this->getMinWidth(),
            'sortable' => $this->getSortable(),
            'type'     => $this->getType(),
        ];
    }
1336505
public function toArray()
    {
        return array(
            'name'           => $this->getName(),
            'type'           => $this->getType()->getName(),
            'length'         => $this->getLength(),
            'precision'      => $this->getPrecision(),
            'scale'          => $this->getScale(),
            'unsigned'       => $this->isUnsigned(),
            'fixed'          => $this->isFixed(),
            'not_null'       => $this->isNotNull(),
            'default'        => $this->getDefault(),
            'auto_increment' => $this->isAutoIncrement(),
            'comment'        => $this->getComment(),
        );
    }
982075
public function toArray()
    {
        $arr = [];
        foreach ($this as $k => $v) {
            if ($v instanceof Enumerable) {
                $arr[] = $v->toArray();
            } else {
                $arr[] = $v;
            }
        }

        return $arr;
    }
389779
public function toArray() {
        $data = array_map(function ($value) {
            if ($value instanceof ArrayAble) {
                return $value->toArray();
            }
            return $value;
        }, $this->getPage());
        return [
            'paging' => [
                'limit' => $this->getPageSize(),
                'offset' => $this->getIndex(),
                'total' => $this->getTotal(),
                'more' => $this->hasMore()
            ],
            'data' => $data
        ];
    }
255257
public function toArray()
    {
        $arrayResult = array(
            'id' => $this->id,
            'string' => $this->sql,
            'command' => $this->getCommand(),
            'executed' => $this->executed,
            'isDDL' => $this->isDDL(),
            'isDML' => $this->isDML(),
            'isDCL' => $this->isDCL(),
            'isTCL' => $this->isTCL(),
            'isAnon' => $this->isAnon(),
            'isRead' => $this->isRead(),
            'isWrite' => $this->isWrite(),
            'result' => $this->result->toarray(),
        );

        return $arrayResult;
    }
155060
public function toArray()
	{
		return array(
			'width' => $this->width,
			'height' => $this->height,
			'type' => $this->type,
			'bits' => $this->bits,
			'channels' => $this->channels,
			'mime' => $this->mime,
			'path' => $this->path,
			'size' => $this->size,
			'name' => $this->name,
			'directory' => $this->directory,
			'extension' => $this->extension,
		);
	}
568150
public function toArray() {
        $return = array();
        $this->links->setIteratorMode(\SplDoublyLinkedList::IT_MODE_FIFO);
        for($this->links->rewind(); $this->links->valid(); $this->links->next()) {
            $return[] = $this->links->current();
        }
        return $return;
    }
1203387
public function toArray()
    {
        $result = parent::toArray();

        $result['mediaId']      = $this->mediaId;
        $result['thumbMediaId'] = $this->thumbMediaId;

        return $result;
    }
1258003
public function toArray()
    {
        $url = $this->url;

        $return = [];
        foreach (array_keys($url) as $key) {
            $getter = 'get' . ucfirst($key);
            $val = $this->$getter();

            if ($val !== null) {
                $return[$key] = $val;
            }
        }

        return $return;
    }