Skip to content

Commit 7c29f48

Browse files
rodrigoprimojrfnl
authored andcommitted
Replace default value of first parameter in getWarningList() with ''
Replacing the default value with an empty string. Per Juliette's comment (#163 (comment)) there are three reasons why we want to do that: - The default value has no value in practice. It is an optional argument which is not enforced via the abstract functions, but is passed in all cases, so the default is never used in practice. - Setting the default value as file 1 also has an assumption implied, while IMO assumptions have no place in a test suite. - Maintainability - one less thing to have to keep in sync and to guard against typos
1 parent b2f4bf5 commit 7c29f48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getErrorList($testFile='FileCommentUnitTest.inc')
7474
*
7575
* @return array<int, int>
7676
*/
77-
public function getWarningList($testFile='FileCommentUnitTest.inc')
77+
public function getWarningList($testFile='')
7878
{
7979
switch ($testFile) {
8080
case 'FileCommentUnitTest.1.inc':

0 commit comments

Comments
 (0)