mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-16 14:48:32 +01:00
Run with updated php-cs-fixer
This commit is contained in:
parent
eabae1f7fa
commit
acfccd9d74
@ -21,11 +21,6 @@ return $config->setRiskyAllowed(true)
|
||||
'declare_strict_types' => true,
|
||||
// Keep argument formatting for now.
|
||||
'method_argument_space' => ['on_multiline' => 'ignore'],
|
||||
'binary_operator_spaces' => [
|
||||
'default' => 'at_least_single_space',
|
||||
// Work around https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7303.
|
||||
'operators' => ['=' => null],
|
||||
],
|
||||
'phpdoc_align' => ['align' => 'left'],
|
||||
'phpdoc_trim' => true,
|
||||
'no_empty_phpdoc' => true,
|
||||
|
@ -34,7 +34,7 @@ class NodeTraverser implements NodeTraverserInterface {
|
||||
*
|
||||
* @param NodeVisitor ...$visitors Node visitors
|
||||
*/
|
||||
public function __construct(NodeVisitor... $visitors) {
|
||||
public function __construct(NodeVisitor ...$visitors) {
|
||||
$this->visitors = $visitors;
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,7 @@ abstract class ParserAbstract implements Parser {
|
||||
} else {
|
||||
// For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts
|
||||
$resultStmts = [];
|
||||
$targetStmts =& $resultStmts;
|
||||
$targetStmts = &$resultStmts;
|
||||
$lastNs = null;
|
||||
foreach ($stmts as $stmt) {
|
||||
if ($stmt instanceof Node\Stmt\Namespace_) {
|
||||
@ -590,12 +590,12 @@ abstract class ParserAbstract implements Parser {
|
||||
}
|
||||
if ($stmt->stmts === null) {
|
||||
$stmt->stmts = [];
|
||||
$targetStmts =& $stmt->stmts;
|
||||
$targetStmts = &$stmt->stmts;
|
||||
$resultStmts[] = $stmt;
|
||||
} else {
|
||||
// This handles the invalid case of mixed style namespaces
|
||||
$resultStmts[] = $stmt;
|
||||
$targetStmts =& $resultStmts;
|
||||
$targetStmts = &$resultStmts;
|
||||
}
|
||||
$lastNs = $stmt;
|
||||
} elseif ($stmt instanceof Node\Stmt\HaltCompiler) {
|
||||
|
@ -125,7 +125,7 @@ class NodeAbstractTest extends \PHPUnit\Framework\TestCase {
|
||||
$this->assertSame('newValue', $node->subNode1);
|
||||
|
||||
// indirect modification
|
||||
$subNode =& $node->subNode1;
|
||||
$subNode = &$node->subNode1;
|
||||
$subNode = 'newNewValue';
|
||||
$this->assertSame('newNewValue', $node->subNode1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user