Skip to content

Commit 98f079c

Browse files
committed
Merge branch 'feature/squiz-membervarspacing-phpcs-annotations' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 19a90ba + 48bdf57 commit 98f079c

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,37 @@ interface MyInterface
212212
public $var3 = 'value';
213213

214214
}//end class
215+
216+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacing 0
217+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacingBeforeFirst 0
218+
219+
class phpcsCommentTest {
220+
221+
222+
// phpcs:disable Standard.Category.Sniff
223+
224+
public $var1 = 'value';
225+
226+
227+
// phpcs:enable Standard.Category.Sniff
228+
229+
public $var1 = 'value';
230+
231+
}
232+
233+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacing 1
234+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacingBeforeFirst 1
235+
236+
class phpcsCommentTest {
237+
238+
239+
// phpcs:disable Standard.Category.Sniff
240+
241+
public $var1 = 'value';
242+
243+
244+
// phpcs:enable Standard.Category.Sniff
245+
246+
public $var1 = 'value';
247+
248+
}

src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc.fixed

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,31 @@ interface MyInterface
207207
public $var3 = 'value';
208208

209209
}//end class
210+
211+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacing 0
212+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacingBeforeFirst 0
213+
214+
class phpcsCommentTest {
215+
// phpcs:disable Standard.Category.Sniff
216+
217+
public $var1 = 'value';
218+
// phpcs:enable Standard.Category.Sniff
219+
220+
public $var1 = 'value';
221+
222+
}
223+
224+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacing 1
225+
// phpcs:set Squiz.WhiteSpace.MemberVarSpacing spacingBeforeFirst 1
226+
227+
class phpcsCommentTest {
228+
229+
// phpcs:disable Standard.Category.Sniff
230+
231+
public $var1 = 'value';
232+
233+
// phpcs:enable Standard.Category.Sniff
234+
235+
public $var1 = 'value';
236+
237+
}

src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function getErrorList()
4545
200 => 1,
4646
209 => 1,
4747
211 => 1,
48+
224 => 1,
49+
229 => 1,
50+
241 => 1,
51+
246 => 1,
4852
];
4953

5054
}//end getErrorList()

0 commit comments

Comments
 (0)