Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Daun <[email protected]>
  • Loading branch information
daun committed Dec 5, 2024
1 parent 79ef08a commit deeb0cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Traits/MemoizationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ private function memoize(callable $compute): callable
{
$namespace = serialize($compute);

return function() use ($namespace, $compute) {
$args = func_get_args();
return function () use ($namespace, $compute) {
$args = \func_get_args();
$key = $namespace . ':' . implode(':', $args);
if (!array_key_exists($key, $this->memo)) {
$this->memo[$key] = call_user_func_array($compute, $args);
if (!\array_key_exists($key, $this->memo)) {
$this->memo[$key] = \call_user_func_array($compute, $args);
}
return $this->memo[$key];
};
Expand Down

0 comments on commit deeb0cc

Please sign in to comment.