From ffcffe3749f09041a66e657c835690e163322036 Mon Sep 17 00:00:00 2001 From: kylekatarnls Date: Tue, 29 Aug 2023 11:01:42 +0200 Subject: [PATCH] Use strict in_array --- src/JsPhpize/JsPhpize.php | 4 ++-- src/JsPhpize/Nodes/Block.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/JsPhpize/JsPhpize.php b/src/JsPhpize/JsPhpize.php index 8bfe775..1345249 100644 --- a/src/JsPhpize/JsPhpize.php +++ b/src/JsPhpize/JsPhpize.php @@ -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)); diff --git a/src/JsPhpize/Nodes/Block.php b/src/JsPhpize/Nodes/Block.php index 12e639c..26ed1da 100644 --- a/src/JsPhpize/Nodes/Block.php +++ b/src/JsPhpize/Nodes/Block.php @@ -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); }); } }