Skip to content
Prev Previous commit
Next Next commit
fix style
  • Loading branch information
mokhosh committed Jan 10, 2021
commit b84aaecb413b35ad1990c4210e2498df494a3895
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ public function reduceWithKeys(callable $callback, $initial = null)
{
$result = $initial;

foreach($this->items as $key => $value) {
foreach ($this->items as $key => $value) {
$result = $callback($result, $value, $key);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/LazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ public function reduceWithKeys(callable $callback, $initial = null)
{
$result = $initial;

foreach($this as $key => $value) {
foreach ($this as $key => $value) {
$result = $callback($result, $value, $key);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Support/SupportCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3602,7 +3602,7 @@ public function testReduceWithKeys($collection)
'baz' => 'qux',
]);
$this->assertEquals('foobarbazqux', $data->reduceWithKeys(function ($carry, $element, $key) {
return $carry .= $key . $element;
return $carry .= $key.$element;
}));
}

Expand Down