Skip to content

Commit

Permalink
Revert single quote escape
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Jun 17, 2024
1 parent c751b81 commit 0ca6392
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ final class Config extends PhpCsFixerConfig
'single_line_throw' => false,
'space_after_semicolon' => true,
'static_lambda' => false,
'string_implicit_backslashes' => ['single_quoted' => 'escape'],
'unary_operator_spaces' => false,
'use_arrow_functions' => false,
];
Expand Down
4 changes: 2 additions & 2 deletions lib/FinalInternalClassFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

final class FinalInternalClassFixer extends AbstractFixer
{
private const REGEX = '(?:final|\\\\Doctrine\\\\ORM\\\\Mapping\\\\Entity|ORM\\\\Mapping\\\\Entity|ORM\\\\Entity|Entity)';
private const REGEX = '(?:final|\\\Doctrine\\\ORM\\\Mapping\\\Entity|ORM\\\Mapping\\\Entity|ORM\\\Entity|Entity)';

public function getDefinition(): FixerDefinitionInterface
{
Expand Down Expand Up @@ -83,7 +83,7 @@ private static function isDoctrineEntity(Tokens $tokens, int $classIndex): bool
for ($index = $attributeOpenIndex; $index < $classIndex; ++$index) {
$content .= $tokens[$index]->getContent();
}
if (1 === \preg_match(\sprintf('/^#\\[%s/', self::REGEX), $content)) {
if (1 === \preg_match(\sprintf('/^#\[%s/', self::REGEX), $content)) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractFixerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function setUp(): void
final protected function createFixer()
{
$fixerClass = static::class;
$fixerClass = \str_replace('\\Tests\\', '\\', $fixerClass);
$fixerClass = \str_replace('\Tests\\', '\\', $fixerClass);
$fixerClass = \preg_replace('/Test$/', '', $fixerClass);

return new $fixerClass();
Expand Down
2 changes: 1 addition & 1 deletion tests/FunctionReferenceSpaceFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function provideCases(): array
$use = \str_replace(' = array()', '', $use);
$use = \str_replace('$array', '$secondArray', $use);

$invariant = \PHP_EOL . \preg_replace('/\\s+/', ' ', '
$invariant = \PHP_EOL . \preg_replace('/\s+/', ' ', '
$var =& $var;
$var =& $var;
$var =&$var;
Expand Down

0 comments on commit 0ca6392

Please sign in to comment.