Skip to content

Commit

Permalink
Avoid string literals with double quotes (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
MidnightDesign authored Aug 1, 2024
1 parent 4d103db commit 388b069
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Eventjet/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
</rule>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>

<!-- Avoid double quotes -->
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>

<!-- Forbid spaces in type casts -->
<rule ref="Squiz.WhiteSpace.CastSpacing"/>

Expand Down
1 change: 1 addition & 0 deletions php-cs-fixer-rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
],
'phpdoc_trim' => true,
'php_unit_data_provider_static' => true,
'single_quote' => true,
'single_space_around_construct' => true,
'strict_comparison' => true,
'trailing_comma_in_multiline' => [
Expand Down
5 changes: 5 additions & 0 deletions tests/fixtures/invalid/double-quotes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

echo "double quotes";
5 changes: 5 additions & 0 deletions tests/fixtures/valid/single-quotes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

echo 'single quotes';

0 comments on commit 388b069

Please sign in to comment.