Skip to content

Commit d8329f7

Browse files
authored
Merge pull request #108 from phug-php/fix/strict-in-array
Use strict in_array checks in compiler split: 0f218bb3ccd2a63a07b1f7afda6ab309dc4a06ba
1 parent 1cf3a02 commit d8329f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: Compiler/Element/BlockElement.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getName()
5151
*/
5252
public function addCompiler(CompilerInterface $compiler)
5353
{
54-
if (!in_array($compiler, $this->compilers)) {
54+
if (!in_array($compiler, $this->compilers, true)) {
5555
$blocks = &$compiler->getBlocksByName($this->name);
5656
$blocks[] = $this;
5757
$this->compilers[] = $compiler;

Diff for: Compiler/NodeCompiler/ImportNodeCompiler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected function isPugImport($path)
2727
$extensions = $compiler->getOption('extensions');
2828

2929
if ($extension === '') {
30-
return in_array('', $extensions);
30+
return in_array('', $extensions, true);
3131
}
3232

3333
if (!$compiler->getOption('allow_composite_extensions')) {
@@ -135,7 +135,7 @@ public function compileNode(NodeInterface $node, ElementInterface $parent = null
135135
'input',
136136
'meta',
137137
'hr',
138-
])) {
138+
], true)) {
139139
$yield = $yield->getParent();
140140
}
141141
if ($compiler->getImportNode()) {

0 commit comments

Comments
 (0)