Skip to content

Commit 82c5bd7

Browse files
committed
Add missing rule.
1 parent 95ea8dc commit 82c5bd7

File tree

8 files changed

+5
-18
lines changed

8 files changed

+5
-18
lines changed

PSR2R/Sniffs/Classes/PropertyDeclarationSniff.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
1515
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
1616
*
17-
* @version Release: @package_version@
18-
*
1917
* @link http://pear.php.net/package/PHP_CodeSniffer
2018
*/
2119
class PropertyDeclarationSniff extends AbstractVariableSniff {

PSR2R/Sniffs/Commenting/DocCommentSniff.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
*
2020
* @author Greg Sherwood <[email protected]>
2121
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
22-
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
23-
* @version Release: @package_version@
24-
* @link http://pear.php.net/package/PHP_CodeSniffer
22+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence @link http://pear.php.net/package/PHP_CodeSniffer
2523
*/
2624
class DocCommentSniff extends AbstractSniff {
2725

PSR2R/Sniffs/ControlStructures/ControlStructureSpacingSniff.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
2424
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
2525
*
26-
* @version Release: @package_version@
27-
*
2826
* @link http://pear.php.net/package/PHP_CodeSniffer
2927
*/
3028
class ControlStructureSpacingSniff implements Sniff {

PSR2R/Sniffs/ControlStructures/ElseIfDeclarationSniff.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
2424
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
2525
*
26-
* @version Release: @package_version@
27-
*
2826
* @link http://pear.php.net/package/PHP_CodeSniffer
2927
*/
3028
class ElseIfDeclarationSniff implements Sniff {

PSR2R/Sniffs/Files/ClosingTagSniff.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
2424
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
2525
*
26-
* @version Release: @package_version@
27-
*
2826
* @link http://pear.php.net/package/PHP_CodeSniffer
2927
*/
3028
class ClosingTagSniff implements Sniff {

PSR2R/Sniffs/Files/EndFileNewlineSniff.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
2424
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
2525
*
26-
* @version Release: @package_version@
27-
*
2826
* @link http://pear.php.net/package/PHP_CodeSniffer
2927
*/
3028
class EndFileNewlineSniff implements Sniff {
@@ -50,7 +48,7 @@ public function process(File $phpcsFile, int $stackPtr): void {
5048

5149
// Hard-coding the expected \n in this sniff as it is PSR-2 specific and
5250
// PSR-2 enforces the use of unix style newlines.
53-
if (substr($tokens[$lastToken]['content'], -1) !== "\n") {
51+
if (!str_ends_with($tokens[$lastToken]['content'], "\n")) {
5452
$error = 'Expected 1 newline at end of file; 0 found';
5553
$fix = $phpcsFile->addFixableError($error, $lastToken, 'NoneFound');
5654
if ($fix === true) {

PSR2R/Sniffs/Methods/MethodDeclarationSniff.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
*
2323
* @author Greg Sherwood <[email protected]>
2424
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
25-
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
26-
* @version Release: @package_version@
27-
* @link http://pear.php.net/package/PHP_CodeSniffer
25+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence @link http://pear.php.net/package/PHP_CodeSniffer
2826
*/
2927
class MethodDeclarationSniff extends AbstractScopeSniff {
3028

PSR2R/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@
277277

278278
<rule ref="Generic.WhiteSpace.ScopeIndent">
279279
<properties>
280-
<property name="tabIndent" value="true" />
280+
<property name="tabIndent" value="true"/>
281+
<property name="exact" value="true"/>
281282
</properties>
282283
</rule>
283284

0 commit comments

Comments
 (0)