Skip to content

Commit

Permalink
Use strict in_array
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Aug 29, 2023
1 parent 70fd86f commit ffcffe3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/JsPhpize/JsPhpize.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ public function render($input, $filename = null, array $variables = [])
$variables = $filename;
$filename = null;
}
if (!in_array($this->stream, $this->streamsRegistered)) {
if (!in_array($this->stream, $this->streamsRegistered, true)) {
$this->streamsRegistered[] = $this->stream;
if (in_array($this->stream, stream_get_wrappers())) {
if (in_array($this->stream, stream_get_wrappers(), true)) {
stream_wrapper_unregister($this->stream);
}
$classParts = explode('\\', get_class($this));
Expand Down
2 changes: 1 addition & 1 deletion src/JsPhpize/Nodes/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function getReadVariables()
return $node instanceof Variable ? $node->name : null;
}, $nodes);
$variables = array_filter($variables, function ($variable) use ($nodes) {
return !in_array($variable, $nodes);
return !in_array($variable, $nodes, true);
});
}
}
Expand Down

0 comments on commit ffcffe3

Please sign in to comment.