Skip to content

Commit fee72cf

Browse files
committed
Convert all existing double quotes to single for raw strings
1 parent f870749 commit fee72cf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/NodeVisitor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function enterNode(Node $node)
166166
} elseif (
167167
$node instanceof Expression &&
168168
$node->expr instanceof FuncCall &&
169-
$node->expr->name->parts[0] === "define"
169+
$node->expr->name->parts[0] === 'define'
170170
) {
171171
$this->isInDeclaration = true;
172172
} elseif ($node instanceof If_) {
@@ -200,7 +200,7 @@ public function leaveNode(Node $node, bool $preserveStack = false)
200200
|| (
201201
$node instanceof Expression &&
202202
$node->expr instanceof FuncCall &&
203-
$node->expr->name->parts[0] === "define"
203+
$node->expr->name->parts[0] === 'define'
204204
)
205205
) {
206206
// We're leaving one of these.
@@ -373,7 +373,7 @@ function (\PhpParser\Node\Const_ $const) {
373373
if (
374374
$node instanceof Expression &&
375375
$node->expr instanceof FuncCall &&
376-
$node->expr->name->parts[0] === "define"
376+
$node->expr->name->parts[0] === 'define'
377377
) {
378378
$fullyQualifiedName = $node->expr->args[0]->value->value;
379379

test/NodeVisitorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function normalize(string $string): string
102102
// Really should be testing AST output, this is just easier...
103103
$string = trim(
104104
// https://stackoverflow.com/questions/709669/how-do-i-remove-blank-lines-from-text-in-php
105-
preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $string)
105+
preg_replace('/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/', '\n', $string)
106106
);
107107
$string = str_replace([
108108
'abstract public',

0 commit comments

Comments
 (0)