Skip to content

Commit 797679a

Browse files
authored
Merge pull request #168 from rodrigoprimo/get-error-list-remove-default-value
Replace the default value of the first parameter of getErrorList() and getWarningList() with an empty string
2 parents 8b61482 + e3d3100 commit 797679a

File tree

40 files changed

+45
-57
lines changed

40 files changed

+45
-57
lines changed

src/Standards/Generic/Tests/Commenting/FixmeUnitTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ class FixmeUnitTest extends AbstractSniffUnitTest
2727
* The key of the array should represent the line number and the value
2828
* should represent the number of errors that should occur on that line.
2929
*
30-
* @param string $testFile The name of the file being tested.
31-
*
3230
* @return array<int, int>
3331
*/
34-
public function getErrorList($testFile='FixmeUnitTest.inc')
32+
public function getErrorList()
3533
{
3634
return [
3735
3 => 1,
@@ -53,11 +51,9 @@ public function getErrorList($testFile='FixmeUnitTest.inc')
5351
* The key of the array should represent the line number and the value
5452
* should represent the number of warnings that should occur on that line.
5553
*
56-
* @param string $testFile The name of the file being tested.
57-
*
5854
* @return array<int, int>
5955
*/
60-
public function getWarningList($testFile='FixmeUnitTest.inc')
56+
public function getWarningList()
6157
{
6258
return [];
6359

src/Standards/Generic/Tests/Commenting/TodoUnitTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ class TodoUnitTest extends AbstractSniffUnitTest
2626
* The key of the array should represent the line number and the value
2727
* should represent the number of errors that should occur on that line.
2828
*
29-
* @param string $testFile The name of the file being tested.
30-
*
3129
* @return array<int, int>
3230
*/
33-
public function getErrorList($testFile='TodoUnitTest.inc')
31+
public function getErrorList()
3432
{
3533
return [];
3634

@@ -43,11 +41,9 @@ public function getErrorList($testFile='TodoUnitTest.inc')
4341
* The key of the array should represent the line number and the value
4442
* should represent the number of warnings that should occur on that line.
4543
*
46-
* @param string $testFile The name of the file being tested.
47-
*
4844
* @return array<int, int>
4945
*/
50-
public function getWarningList($testFile='TodoUnitTest.inc')
46+
public function getWarningList()
5147
{
5248
return [
5349
3 => 1,

src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class InlineControlStructureUnitTest extends AbstractSniffUnitTest
3030
*
3131
* @return array<int, int>
3232
*/
33-
public function getErrorList($testFile='InlineControlStructureUnitTest.1.inc')
33+
public function getErrorList($testFile='')
3434
{
3535
switch ($testFile) {
3636
case 'InlineControlStructureUnitTest.1.inc':

src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getErrorList()
4545
*
4646
* @return array<int, int>
4747
*/
48-
public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc')
48+
public function getWarningList($testFile='')
4949
{
5050
switch ($testFile) {
5151
case 'MultipleStatementAlignmentUnitTest.inc':

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LowerCaseConstantUnitTest extends AbstractSniffUnitTest
3030
*
3131
* @return array<int, int>
3232
*/
33-
public function getErrorList($testFile='LowerCaseConstantUnitTest.inc')
33+
public function getErrorList($testFile='')
3434
{
3535
switch ($testFile) {
3636
case 'LowerCaseConstantUnitTest.inc':

src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class UnnecessaryStringConcatUnitTest extends AbstractSniffUnitTest
3030
*
3131
* @return array<int, int>
3232
*/
33-
public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc')
33+
public function getErrorList($testFile='')
3434
{
3535
switch ($testFile) {
3636
case 'UnnecessaryStringConcatUnitTest.inc':

src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class GitMergeConflictUnitTest extends AbstractSniffUnitTest
3030
*
3131
* @return array<int, int>
3232
*/
33-
public function getErrorList($testFile='GitMergeConflictUnitTest.1.inc')
33+
public function getErrorList($testFile='')
3434
{
3535
switch ($testFile) {
3636
case 'GitMergeConflictUnitTest.1.inc':

src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function setCliValues($testFile, $config)
4949
*
5050
* @return array<int, int>
5151
*/
52-
public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc')
52+
public function getErrorList($testFile='')
5353
{
5454
switch ($testFile) {
5555
case 'DisallowSpaceIndentUnitTest.1.inc':

src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class IncrementDecrementSpacingUnitTest extends AbstractSniffUnitTest
3030
*
3131
* @return array<int, int>
3232
*/
33-
public function getErrorList($testFile='IncrementDecrementSpacingUnitTest.inc')
33+
public function getErrorList($testFile='')
3434
{
3535
$errors = [
3636
5 => 1,

src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function setCliValues($testFile, $config)
5050
*
5151
* @return array<int, int>
5252
*/
53-
public function getErrorList($testFile='ScopeIndentUnitTest.inc')
53+
public function getErrorList($testFile='')
5454
{
5555
if ($testFile === 'ScopeIndentUnitTest.1.js') {
5656
return [

0 commit comments

Comments
 (0)