Skip to content

Commit 626efec

Browse files
committed
Test for $this->{$nub.'_nub'}()
1 parent 8ba663f commit 626efec

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/Tests/Tests/epv_test_validate_php_functions.php

+20-20
Original file line numberDiff line numberDiff line change
@@ -360,16 +360,16 @@ private function validateFunctionNames(PHPParser_Node $node)
360360
// If function name is a variable.
361361
$name = (string)$node->name->name;
362362
}
363-
else if ($node->name instanceof PHPParser_Node_Expr_Concat)
364-
{
365-
// Only test if both are a string
366-
// This mean that if a user works around this test he can do so, but otherwise we will
367-
// need to parse variables and stuff.
368-
if ($node->left instanceof PHPParser_Node_Scalar_String && $node->right instanceof PHPParser_Node_Scalar_String)
369-
{
370-
$name = $node->left->value . $node->right->value;
371-
}
372-
}
363+
else if ($node->name instanceof PHPParser_Node_Expr_Concat)
364+
{
365+
// Only test if both are a string
366+
// This mean that if a user works around this test he can do so, but otherwise we will
367+
// need to parse variables and stuff.
368+
if ($node->left instanceof PHPParser_Node_Scalar_String && $node->right instanceof PHPParser_Node_Scalar_String)
369+
{
370+
$name = $node->left->value . $node->right->value;
371+
}
372+
}
373373
else
374374
{
375375
$name = (string)$node->name;
@@ -402,18 +402,18 @@ private function validateMethodCalls(PHPParser_Node $node) {
402402
$name = (string)$node->name->name;
403403
}
404404
else if ($node->name instanceof PHPParser_Node_Expr_Concat)
405-
{
406-
// Only test if both are a string
407-
// This mean that if a user works around this test he can do so, but otherwise we will
408-
// need to parse variables and stuff.
409-
if ($node->left instanceof PHPParser_Node_Scalar_String && $node->right instanceof PHPParser_Node_Scalar_String)
410-
{
411-
$name = $node->left->value . $node->right->value;
412-
}
413-
}
405+
{
406+
// Only test if both are a string
407+
// This mean that if a user works around this test he can do so, but otherwise we will
408+
// need to parse variables and stuff.
409+
if ($node->left instanceof PHPParser_Node_Scalar_String && $node->right instanceof PHPParser_Node_Scalar_String)
410+
{
411+
$name = $node->left->value . $node->right->value;
412+
}
413+
}
414414
else
415415
{
416-
$name = (string)$node->name;
416+
$name = (string)$node->name;
417417
}
418418
}
419419
else if (isset($node->expr) && $node->expr instanceof PHPParser_Node_Expr_MethodCall)

0 commit comments

Comments
 (0)