Skip to content

Commit 8368a1f

Browse files
gsherwoodjrfnl
andcommitted
CS: don't use double quotes where not needed
Co-authored-by: jrfnl <[email protected]>
1 parent dfbf452 commit 8368a1f

File tree

8 files changed

+12
-11
lines changed

8 files changed

+12
-11
lines changed

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<rule ref="Squiz.PHP.DisallowInlineIf"/>
5959
<rule ref="Squiz.Scope.MethodScope"/>
6060
<rule ref="Squiz.Strings.ConcatenationSpacing"/>
61+
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
6162
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
6263
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace"/>
6364
<rule ref="Squiz.WhiteSpace.FunctionSpacing"/>

src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ public static function getExecutablePath(string $name)
15921592
return $data;
15931593
}
15941594

1595-
if ($name === "php") {
1595+
if ($name === 'php') {
15961596
// For php, we know the executable path. There's no need to look it up.
15971597
return PHP_BINARY;
15981598
}

src/Reports/Json.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function generateFileReport(array $report, File $phpcsFile, bool $showSou
5757
$messagesObject->column = $column;
5858
$messagesObject->fixable = $fixable;
5959

60-
$messages .= json_encode($messagesObject).",";
60+
$messages .= json_encode($messagesObject).',';
6161
}
6262
}
6363
}//end foreach
@@ -99,7 +99,7 @@ public function generate(
9999
) {
100100
echo '{"totals":{"errors":'.$totalErrors.',"warnings":'.$totalWarnings.',"fixable":'.$totalFixable.'},"files":{';
101101
echo rtrim($cachedData, ',');
102-
echo "}}".PHP_EOL;
102+
echo '}}'.PHP_EOL;
103103

104104
}//end generate()
105105

tests/Core/Ruleset/ExplainTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function testExplainCustomRuleset()
179179
public function testExplainWithDeprecatedSniffs()
180180
{
181181
// Set up the ruleset.
182-
$standard = __DIR__."/ShowSniffDeprecationsTest.xml";
182+
$standard = __DIR__.'/ShowSniffDeprecationsTest.xml';
183183
$config = new ConfigDouble(["--standard=$standard", '-e']);
184184
$ruleset = new Ruleset($config);
185185

tests/Core/Ruleset/GetIgnorePatternsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class GetIgnorePatternsTest extends TestCase
3737
public static function setUpBeforeClass(): void
3838
{
3939
// Set up the ruleset.
40-
$standard = __DIR__."/GetIgnorePatternsTest.xml";
40+
$standard = __DIR__.'/GetIgnorePatternsTest.xml';
4141
$config = new ConfigDouble(["--standard=$standard"]);
4242
self::$ruleset = new Ruleset($config);
4343

tests/Core/Ruleset/GetIncludePatternsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class GetIncludePatternsTest extends TestCase
3737
public static function setUpBeforeClass(): void
3838
{
3939
// Set up the ruleset.
40-
$standard = __DIR__."/GetIncludePatternsTest.xml";
40+
$standard = __DIR__.'/GetIncludePatternsTest.xml';
4141
$config = new ConfigDouble(["--standard=$standard"]);
4242
self::$ruleset = new Ruleset($config);
4343

tests/Core/Tokenizers/PHP/AttributesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ public static function dataAttributeOnTextLookingLikeCloseTag()
540540
],
541541
[
542542
'T_WHITESPACE',
543-
" ",
543+
' ',
544544
],
545545
[
546546
'T_CONSTANT_ENCAPSED_STRING',

tests/Core/Util/Common/PrepareForOutputTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ public static function dataPrepareForOutput()
7979
'expectedWin' => "\\r\\n\\t",
8080
],
8181
'Spaces are replaced with a unique mark' => [
82-
'content' => " ",
82+
'content' => ' ',
8383
'exclude' => [],
8484
'expected' => "\033[30;1m·\033[0m\033[30;1m·\033[0m\033[30;1m·\033[0m\033[30;1m·\033[0m",
85-
'expectedWin' => " ",
85+
'expectedWin' => ' ',
8686
],
8787
'Other characters are unaffected' => [
88-
'content' => "{echo 1;}",
88+
'content' => '{echo 1;}',
8989
'exclude' => [],
9090
'expected' => "{echo\033[30;1m·\033[0m1;}",
91-
'expectedWin' => "{echo 1;}",
91+
'expectedWin' => '{echo 1;}',
9292
],
9393
'No replacements' => [
9494
'content' => 'nothing-should-be-replaced',

0 commit comments

Comments
 (0)