Skip to content

Commit 48ecd65

Browse files
committed
Replaced null coalescing operator with isset check
1 parent c12b246 commit 48ecd65

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Functional/Memoize.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ public function __invoke(...$args)
6161
return $ret;
6262
}
6363

64-
$result = $GLOBALS[$key] ?? null;
65-
66-
if ($result) {
67-
return $result;
64+
if (isset($GLOBALS[$key])) {
65+
return $GLOBALS[$key];
6866
}
6967

7068
$GLOBALS[$key] = ($this->function)(...$args);

0 commit comments

Comments
 (0)