diff --git a/src/API/Type/ArrayOfFoldersType.php b/src/API/Type/ArrayOfFoldersType.php index 8ab70fde..3aeef6a8 100644 --- a/src/API/Type/ArrayOfFoldersType.php +++ b/src/API/Type/ArrayOfFoldersType.php @@ -86,23 +86,23 @@ public function getAllFolders() return $this->allFolders; } - public function count() + public function count(): int { return count($this->getAllFolders()); } - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->getAllFolders()[$offset]); } - public function offsetGet($offset) + public function offsetGet($offset): mixed { $this->getAllFolders(); return isset($this->allFolders[$offset]) ? $this->allFolders[$offset] : null; } - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { $this->getAllFolders(); @@ -113,13 +113,13 @@ public function offsetSet($offset, $value) } } - public function offsetUnset($offset) + public function offsetUnset($offset): void { $this->getAllFolders(); unset($this->allFolders[$offset]); } - public function getIterator() + public function getIterator(): \Traversable { $this->getAllFolders(); return new \ArrayIterator($this->allFolders); diff --git a/src/API/Type/ArrayOfRealItemsType.php b/src/API/Type/ArrayOfRealItemsType.php index a9d18e2a..70e410d2 100644 --- a/src/API/Type/ArrayOfRealItemsType.php +++ b/src/API/Type/ArrayOfRealItemsType.php @@ -117,23 +117,23 @@ public function getItems() return $this->itemsArray; } - public function count() + public function count(): int { return count($this->getItems()); } - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->getItems()[$offset]); } - public function offsetGet($offset) + public function offsetGet($offset): mixed { $this->getItems(); return isset($this->itemsArray[$offset]) ? $this->itemsArray[$offset] : null; } - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { $this->getItems(); @@ -144,13 +144,13 @@ public function offsetSet($offset, $value) } } - public function offsetUnset($offset) + public function offsetUnset($offset): void { $this->getItems(); unset($this->itemsArray[$offset]); } - public function getIterator() + public function getIterator(): \Traversable { $this->getItems(); return new \ArrayIterator($this->itemsArray); diff --git a/src/API/Type/FindFolderParentType.php b/src/API/Type/FindFolderParentType.php index 1fe10fe5..bf6dbdab 100644 --- a/src/API/Type/FindFolderParentType.php +++ b/src/API/Type/FindFolderParentType.php @@ -53,22 +53,22 @@ class FindFolderParentType extends Type implements Countable, ArrayAccess, Itera */ protected $folders = null; - public function count() + public function count(): int { return count($this->folders); } - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->folders[$offset]); } - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->folders[$offset]) ? $this->folders[$offset] : null; } - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { array_push($this->folders, $value); @@ -77,12 +77,12 @@ public function offsetSet($offset, $value) } } - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->folders[$offset]); } - public function getIterator() + public function getIterator(): \Traversable { return new \ArrayIterator($this->folders->getIterator()); } diff --git a/src/API/Type/FindItemParentType.php b/src/API/Type/FindItemParentType.php index c3e84147..eacf9973 100644 --- a/src/API/Type/FindItemParentType.php +++ b/src/API/Type/FindItemParentType.php @@ -58,24 +58,24 @@ class FindItemParentType extends Type implements Countable, ArrayAccess, Iterato */ protected $lastRequest = null; - public function count() + public function count(): int { return count($this->items); } - public function offsetExists($offset) + public function offsetExists($offset): bool { $arrayAccessName = ($this->items != null ? 'items' : 'groups'); return isset($this->{$arrayAccessName}[$offset]); } - public function offsetGet($offset) + public function offsetGet($offset): mixed { $arrayAccessName = ($this->items != null ? 'items' : 'groups'); return isset($this->{$arrayAccessName}[$offset]) ? $this->{$arrayAccessName}[$offset] : null; } - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { $arrayAccessName = ($this->items != null ? 'items' : 'groups'); @@ -86,13 +86,13 @@ public function offsetSet($offset, $value) } } - public function offsetUnset($offset) + public function offsetUnset($offset): void { $arrayAccessName = ($this->items != null ? 'items' : 'groups'); unset($this->{$arrayAccessName}[$offset]); } - public function getIterator() + public function getIterator(): \Traversable { $arrayAccessName = ($this->items != null ? 'items' : 'groups'); return new \ArrayIterator($this->{$arrayAccessName}->getIterator()); diff --git a/src/API/Type/GroupedItemsType.php b/src/API/Type/GroupedItemsType.php index 389e0ca6..ecb7da0f 100644 --- a/src/API/Type/GroupedItemsType.php +++ b/src/API/Type/GroupedItemsType.php @@ -31,22 +31,22 @@ class GroupedItemsType extends Type implements Countable, ArrayAccess, IteratorA */ protected $groupSummary = null; - public function count() + public function count(): int { return count($this->items); } - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->items[$offset]); } - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->items[$offset]) ? $this->items[$offset] : null; } - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->items[] = $value; @@ -55,12 +55,12 @@ public function offsetSet($offset, $value) } } - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->items[$offset]); } - public function getIterator() + public function getIterator(): \Traversable { return new \ArrayIterator($this->items->getIterator()); }