Skip to content

Commit

Permalink
Revert "[5.5] Make Optional@__call really macroable (laravel#20898)"
Browse files Browse the repository at this point in the history
This reverts commit 979d693.
  • Loading branch information
Ellrion committed Sep 1, 2017
1 parent 9e96e46 commit 6004cc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Support/Optional.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ public function __get($key)
*/
public function __call($method, $parameters)
{
if (static::hasMacro($method)) {
return $this->macroCall($method, $parameters);
}

if (is_object($this->value)) {
return $this->value->{$method}(...$parameters);
}

if (static::hasMacro($method)) {
return $this->macroCall($method, $parameters);
}
}
}

0 comments on commit 6004cc1

Please sign in to comment.