Skip to content

Commit 3bb68af

Browse files
committed
Comparing types as equalities is broken.
It doesn't capture "final private" which is admittedly a weird modifier. PHP Parser returns types as a bit set.
1 parent b5c48b5 commit 3bb68af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Naneau/Obfuscator/Node/Visitor/ScramblePrivateMethod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private function scanMethodDefinitions(array $nodes)
124124
{
125125
foreach ($nodes as $node) {
126126
// Scramble the private method definitions
127-
if ($node instanceof ClassMethod && $node->type === ClassNode::MODIFIER_PRIVATE) {
127+
if ($node instanceof ClassMethod && ($node->type & ClassNode::MODIFIER_PRIVATE)) {
128128

129129
// Record original name and scramble it
130130
$originalName = $node->name;

0 commit comments

Comments
 (0)