@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | /** |
68 | 68 | * Use the each() method to set the position property in the item. |
69 | 69 | */ |
70 | -$itemsEx->each(function(Item $item, $key){ |
|
70 | +$itemsEx->each(function(Item $item, $key) { |
|
71 | 71 | $item->position = $key; |
72 | 72 | }); |
73 | 73 | |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | * Use the each() method to make further changes to the position property of |
81 | 81 | * the cloned collection. |
82 | 82 | */ |
83 | -$itemsEx2->each(function(Item $item, $key){ |
|
83 | +$itemsEx2->each(function(Item $item, $key) { |
|
84 | 84 | $item->position += $key; |
85 | 85 | }); |
86 | 86 | |
87 | 87 | /** |
88 | 88 | * Make a new simple collection using the same items as the cloned collection. |
89 | 89 | */ |
90 | -$items2 = new ItemCollection( $itemsEx2); |
|
90 | +$items2 = new ItemCollection($itemsEx2); |
|
91 | 91 | |
92 | 92 | /** |
93 | 93 | * Show the results of all of this work. |