Skip to content

Commit 0e8e536

Browse files
authored
Merge pull request #40 from pug-php/feature/strict-in-array
Use strict in_array
2 parents 44f665c + ffcffe3 commit 0e8e536

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/JsPhpize/JsPhpize.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ public function render($input, $filename = null, array $variables = [])
145145
$variables = $filename;
146146
$filename = null;
147147
}
148-
if (!in_array($this->stream, $this->streamsRegistered)) {
148+
if (!in_array($this->stream, $this->streamsRegistered, true)) {
149149
$this->streamsRegistered[] = $this->stream;
150-
if (in_array($this->stream, stream_get_wrappers())) {
150+
if (in_array($this->stream, stream_get_wrappers(), true)) {
151151
stream_wrapper_unregister($this->stream);
152152
}
153153
$classParts = explode('\\', get_class($this));

src/JsPhpize/Nodes/Block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function getReadVariables()
151151
return $node instanceof Variable ? $node->name : null;
152152
}, $nodes);
153153
$variables = array_filter($variables, function ($variable) use ($nodes) {
154-
return !in_array($variable, $nodes);
154+
return !in_array($variable, $nodes, true);
155155
});
156156
}
157157
}

0 commit comments

Comments
 (0)