Skip to content

Commit 644b531

Browse files
Merge pull request #18 from VincentLanglet/staging
✨ Do not require space for concatenation
2 parents cbe1637 + f97e531 commit 644b531

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

Symfony3Custom/Sniffs/Commenting/DocCommentGroupSameTypeSniff.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
9999
if ($previousType === $currentType) {
100100
$fix = $phpcsFile->addFixableError(
101101
'Expected no empty lines '
102-
. 'between annotations of the same type',
102+
.'between annotations of the same type',
103103
$commentTag,
104104
'SameType'
105105
);
106106
} else {
107107
$fix = $phpcsFile->addFixableError(
108108
'Expected no empty lines '
109-
. 'between custom annotations',
109+
.'between custom annotations',
110110
$commentTag,
111111
'CustomType'
112112
);
@@ -127,7 +127,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
127127
if ($previousLine !== $commentTagLine - 2) {
128128
$fix = $phpcsFile->addFixableError(
129129
'Expected exactly one empty line '
130-
. 'between annotations of different types',
130+
.'between annotations of different types',
131131
$commentTag,
132132
'DifferentType'
133133
);
@@ -151,7 +151,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
151151
);
152152
$phpcsFile->fixer->addContentBefore(
153153
$firstOnLine,
154-
$content . $phpcsFile->eolChar
154+
$content.$phpcsFile->eolChar
155155
);
156156
} else {
157157
$this->removeLines(

Symfony3Custom/Sniffs/Functions/ScopeOrderSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
7676
$current = $current[0];
7777

7878
$error = 'Declare public methods first,'
79-
. 'then protected ones and finally private ones';
79+
.'then protected ones and finally private ones';
8080

8181
if (isset($previous) && $current < $previous) {
8282
$phpcsFile->addError(

Symfony3Custom/ruleset.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
<!-- From endouble repo -->
5151
<rule ref="Squiz.Strings.ConcatenationSpacing">
5252
<properties>
53-
<property name="spacing" value="1"/>
5453
<property name="ignoreNewlines" value="true" />
5554
</properties>
5655
</rule>

docs/standards.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ We imported the [PSR2 Standard](./psr2.md) with this override:
2525

2626
We mainly respect the [Symfony Standard](./symfony.md) but
2727

28-
- We do not respect these rules:
28+
- We do not respect this rule:
2929

30-
- Add no space around the concatenation (`.`) operator
3130
- Declare all the arguments on the same line as the method/function name, no matter how many arguments there are
3231

3332
- We do not currently check these rules:

docs/standards/symfony.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,12 @@ From [symfony standard](http://symfony.com/doc/current/contributing/code/standar
99
```
1010

1111
- Add a single space around binary operators (`==`, `&&`, `...`)
12+
with the exception of the concatenation (`.`) operator
1213

1314
```
1415
<rule ref="Squiz.WhiteSpace.OperatorSpacing" />
15-
```
16-
17-
We do not respect the exception of the concatenation (`.`) operator
18-
```
1916
<rule ref="Squiz.Strings.ConcatenationSpacing">
2017
<properties>
21-
<property name="spacing" value="1"/>
2218
<property name="ignoreNewlines" value="true" />
2319
</properties>
2420
</rule>

0 commit comments

Comments
 (0)