Skip to content

Commit

Permalink
Fix strict comparsion for in_array
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil committed Dec 16, 2024
1 parent 36a4b56 commit 611a64c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Support/ReflectionClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ public function getCode()
break;
case 'id_name':
switch ($token[0]) {
case $token[0] === ':' && !in_array($context, ['instanceof', 'new']):
case $token[0] === ':' && !in_array($context, ['instanceof', 'new'], true):
if ($lastState === 'closure' && $context === 'root') {
$state = 'closure';
$code .= $id_start.$token;
Expand Down

0 comments on commit 611a64c

Please sign in to comment.