mirror of
https://github.com/danog/PHP-Parser.git
synced 2025-01-22 05:41:23 +01:00
Make code more explicit
This commit is contained in:
parent
65de924493
commit
75880fbe2d
@ -653,13 +653,14 @@ abstract class PrettyPrinterAbstract
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
$arrItem = $nodes[$i];
|
||||
$origArrItem = $origNodes[$i];
|
||||
if ($arrItem === $origArrItem) {
|
||||
// Unchanged, can reuse old code
|
||||
continue;
|
||||
}
|
||||
|
||||
// We can only handle arrays of nodes meaningfully
|
||||
if (!$arrItem instanceof Node || !$origArrItem instanceof Node) {
|
||||
// We can only handle arrays of nodes meaningfully
|
||||
// Destructing can also contain null elements. If they occur symmetrically, this is
|
||||
// fine as well
|
||||
if ($arrItem === null && $origArrItem === null) {
|
||||
continue;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user