Skip to content

Commit 0461cf6

Browse files
committed
Added operator and string concat spacing checks from Squiz standard to PHPCS standard
1 parent 6375440 commit 0461cf6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CodeSniffer/Reports/Notifysend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function __construct()
9898
$this->version = str_replace(
9999
'notify-send ',
100100
'',
101-
exec($this->path . ' --version')
101+
exec($this->path.' --version')
102102
);
103103

104104
}//end __construct()

CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
5555
// Check if this is a call to includeSystem, includeAsset or includeWidget.
5656
$methodName = strtolower($tokens[($stackPtr + 1)]['content']);
5757
if ($methodName === 'includesystem'
58-
|| $methodName === 'includeasset'
58+
|| $methodName === 'includeasset'
5959
|| $methodName === 'includewidget'
6060
) {
6161
$systemName = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 3), null, true);

CodeSniffer/Standards/PHPCS/ruleset.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
<rule ref="Squiz.Formatting.OperatorBracket" />
2121
<rule ref="Squiz.Operators.ComparisonOperatorUsage" />
2222
<rule ref="Squiz.PHP.DisallowInlineIf" />
23+
<rule ref="Squiz.Strings.ConcatenationSpacing" />
2324
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing" />
2425
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace" />
2526
<rule ref="Squiz.WhiteSpace.FunctionSpacing" />
27+
<rule ref="Squiz.WhiteSpace.OperatorSpacing" />
2628
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
2729
<rule ref="Generic.Commenting.Todo"/>
2830
<rule ref="Generic.ControlStructures.InlineControlStructure"/>

0 commit comments

Comments
 (0)