Skip to content

Commit

Permalink
Use instanceof instead. (But still keeping the php 5.6+ requirement.)
Browse files Browse the repository at this point in the history
  • Loading branch information
robocoder committed May 9, 2019
1 parent 1b168bf commit 6c8e5fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ protected function compileChildren($stms, OutputBlock $out)
protected function compileChildrenNoReturn($stms, OutputBlock $out, $selfParent = null)
{
foreach ($stms as $stm) {
if ($selfParent && isset($stm[1]) && is_object($stm[1]) && get_class($stm[1]) === Block::class) {
if ($selfParent && isset($stm[1]) && is_object($stm[1]) && $stm[1] instanceof Block) {
$stm[1]->selfParent = $selfParent;
$ret = $this->compileChild($stm, $out);
$stm[1]->selfParent = null;
Expand Down Expand Up @@ -2138,7 +2138,7 @@ protected function compileChild($child, OutputBlock $out)
$parent->selectors = $parentSelectors;

foreach ($mixin->children as $k => $child) {
if (isset($child[1]) && is_object($child[1]) && get_class($child[1]) === Block::class) {
if (isset($child[1]) && is_object($child[1]) && $child[1] instanceof Block) {
$mixin->children[$k][1]->parent = $parent;
}
}
Expand Down

0 comments on commit 6c8e5fe

Please sign in to comment.