Skip to content

Commit 9a2f67d

Browse files
rodrigoprimojrfnl
andcommitted
Apply suggestions from code review
Co-authored-by: Juliette <[email protected]>
1 parent d19a939 commit 9a2f67d

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ public function process(File $phpcsFile, $stackPtr)
7272

7373

7474
/**
75-
* Returns the command used to lint PHP code. Uses a different command when the content is
76-
* provided via STDIN.
75+
* Returns the command used to lint PHP code.
76+
*
77+
* Uses a different command when the content is provided via STDIN.
7778
*
7879
* @param \PHP_CodeSniffer\Files\File $phpcsFile The File object.
7980
*

src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ public function getWarningList()
6464

6565

6666
/**
67-
* Test the sniff checks syntax when file contents are passed via STDIN. Doesn't run on Windows
68-
* as PHPCS currently doesn't support STDIN on this OS.
67+
* Test the sniff checks syntax when file contents are passed via STDIN.
68+
*
69+
* Note: this test doesn't run on Windows as PHPCS currently doesn't support STDIN on this OS.
6970
*
7071
* @param string $content The content to test.
7172
* @param int $errorCount The expected number of errors.
@@ -121,12 +122,12 @@ public function dataStdIn()
121122
}
122123

123124
return [
124-
'No syntax errors' => [
125+
'No syntax errors' => [
125126
'<?php $array = [1, 2, 3];',
126127
0,
127128
[],
128129
],
129-
'One syntax error' => [
130+
'One syntax error' => [
130131
'<?php $array = [1, 2, 3; // Missing closing bracket.',
131132
1,
132133
[
@@ -143,7 +144,7 @@ public function dataStdIn()
143144
],
144145
],
145146
],
146-
'Single error reported even when there is more than syntax error in the file' => [
147+
'Single error reported even when there is more than one syntax error in the file' => [
147148
'<?php $array = [1, 2, 3; // Missing closing bracket.
148149
$anotherArray = [4, 5, 6; // Another missing closing bracket.',
149150
1,

0 commit comments

Comments
 (0)