Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/__tests__/xhpast/double-quote.lint-test
<?php | <?php | ||||
'foobar'; | 'foobar'; | ||||
"foo\"bar"; | "foo\"bar"; | ||||
"foobar\n"; | "foobar\n"; | ||||
"'foobar'"; | "'foobar'"; | ||||
"foo{$bar}"; | "foo{$bar}"; | ||||
'foo"bar"'; | 'foo"bar"'; | ||||
pht( | pht( | ||||
"This string requires \x12\x34 double quotes, but ". | "This string requires \x12\x34 double quotes, but ". | ||||
"this string does not. Here, they are used for consistency."); | "this string does not. Here, they are used for consistency."); | ||||
pht( | pht( | ||||
"This string also requires \123\345 double quotes, but ". | "This string also requires \123\345 double quotes, but ". | ||||
"this string does not. Here, they are used for consistency."); | "this string does not. Here, they are used for consistency."); | ||||
~~~~~~~~~~ | ~~~~~~~~~~ | ||||
advice:3:1 | advice:4:1 | ||||
~~~~~~~~~~ | ~~~~~~~~~~ | ||||
<?php | <?php | ||||
'foobar'; | 'foobar'; | ||||
'foo"bar'; | 'foo"bar'; | ||||
"foobar\n"; | "foobar\n"; | ||||
"'foobar'"; | "'foobar'"; | ||||
"foo{$bar}"; | "foo{$bar}"; | ||||
'foo"bar"'; | 'foo"bar"'; | ||||
pht( | pht( | ||||
"This string requires \x12\x34 double quotes, but ". | "This string requires \x12\x34 double quotes, but ". | ||||
"this string does not. Here, they are used for consistency."); | "this string does not. Here, they are used for consistency."); | ||||
pht( | pht( | ||||
"This string also requires \123\345 double quotes, but ". | "This string also requires \123\345 double quotes, but ". | ||||
"this string does not. Here, they are used for consistency."); | "this string does not. Here, they are used for consistency."); |