Skip to content

Commit b1acce4

Browse files
authored
Update NestableCollection.php
1 parent f98feb3 commit b1acce4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/NestableCollection.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
namespace TypiCMS;
1111

12-
use App;
1312
use Illuminate\Database\Eloquent\Collection;
1413
use Illuminate\Support\Arr;
1514
use Illuminate\Support\Collection as BaseCollection;
@@ -78,7 +77,7 @@ public function nest()
7877
}
7978

8079
// Add items to children collection.
81-
foreach ($collection->items as $key => $item) {
80+
foreach ($collection->items as $item) {
8281
if ($item->{$parentColumn} && isset($collection[$item->{$parentColumn}])) {
8382
$collection[$item->{$parentColumn}]->{$this->childrenName}->push($item);
8483
$keysToDelete[] = $item->id;
@@ -95,11 +94,11 @@ public function nest()
9594
* Recursive function that flatten a nested Collection
9695
* with characters (default is four spaces).
9796
*
98-
* @param string $column
99-
* @param int $level
100-
* @param array &$flattened
101-
* @param string|null $indentChars
102-
* @param string|boolen|null $parent_string
97+
* @param string $column
98+
* @param int $level
99+
* @param array &$flattened
100+
* @param null|string $indentChars
101+
* @param null|bool|string $parent_string
103102
*
104103
* @return array
105104
*/
@@ -214,6 +213,7 @@ public function getTotal()
214213
public function setParents()
215214
{
216215
$this->setParentsRecursive($this);
216+
217217
return $this;
218218
}
219219

0 commit comments

Comments
 (0)