Skip to content

Commit c234e70

Browse files
committed
php 8.4 compatibility
1 parent be847a6 commit c234e70

File tree

17 files changed

+23
-24
lines changed

17 files changed

+23
-24
lines changed

PHPUnit/Extensions/PhptTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function count()
119119
* @param array $options
120120
* @return PHPUnit_Framework_TestResult
121121
*/
122-
public function run(PHPUnit_Framework_TestResult $result = NULL, array $options = array())
122+
public function run(?PHPUnit_Framework_TestResult $result = NULL, array $options = array())
123123
{
124124
if (!class_exists('PEAR_RunTest', FALSE)) {
125125
throw new PHPUnit_Framework_Exception('Class PEAR_RunTest not found.');

PHPUnit/Extensions/RepeatedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function count()
129129
* @return PHPUnit_Framework_TestResult
130130
* @throws PHPUnit_Framework_Exception
131131
*/
132-
public function run(PHPUnit_Framework_TestResult $result = NULL)
132+
public function run(?PHPUnit_Framework_TestResult $result = NULL)
133133
{
134134
if ($result === NULL) {
135135
$result = $this->createResult();

PHPUnit/Extensions/TestDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getTest()
137137
* @param PHPUnit_Framework_TestResult $result
138138
* @return PHPUnit_Framework_TestResult
139139
*/
140-
public function run(PHPUnit_Framework_TestResult $result = NULL)
140+
public function run(?PHPUnit_Framework_TestResult $result = NULL)
141141
{
142142
if ($result === NULL) {
143143
$result = $this->createResult();

PHPUnit/Framework/Constraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function count()
126126
* @param PHPUnit_Framework_ComparisonFailure $comparisonFailure
127127
* @throws PHPUnit_Framework_ExpectationFailedException
128128
*/
129-
protected function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
129+
protected function fail($other, $description, ?PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
130130
{
131131
$failureDescription = sprintf(
132132
'Failed asserting that %s.',

PHPUnit/Framework/Error.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class PHPUnit_Framework_Error extends Exception
6565
* @param integer $line
6666
* @param Exception $previous
6767
*/
68-
public function __construct($message, $code, $file, $line, Exception $previous = NULL)
68+
public function __construct($message, $code, $file, $line, ?Exception $previous = NULL)
6969
{
7070
parent::__construct($message, $code, $previous);
7171

PHPUnit/Framework/ExpectationFailedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class PHPUnit_Framework_ExpectationFailedException extends PHPUnit_Framework_Ass
6565
*/
6666
protected $comparisonFailure;
6767

68-
public function __construct($message, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL, Exception $previous = NULL)
68+
public function __construct($message, ?PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL, ?Exception $previous = NULL)
6969
{
7070
$this->comparisonFailure = $comparisonFailure;
7171

PHPUnit/Framework/Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ interface PHPUnit_Framework_Test extends Countable
6262
* @param PHPUnit_Framework_TestResult $result
6363
* @return PHPUnit_Framework_TestResult
6464
*/
65-
public function run(PHPUnit_Framework_TestResult $result = NULL);
65+
public function run(?PHPUnit_Framework_TestResult $result = NULL);
6666
}

PHPUnit/Framework/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ public function hasFailed()
676676
* @return PHPUnit_Framework_TestResult
677677
* @throws PHPUnit_Framework_Exception
678678
*/
679-
public function run(PHPUnit_Framework_TestResult $result = NULL)
679+
public function run(?PHPUnit_Framework_TestResult $result = NULL)
680680
{
681681
if ($result === NULL) {
682682
$result = $this->createResult();

PHPUnit/Framework/TestResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ public function run(PHPUnit_Framework_Test $test)
582582
if ($this->convertErrorsToExceptions) {
583583
$oldErrorHandler = set_error_handler(
584584
array('PHPUnit_Util_ErrorHandler', 'handleError'),
585-
E_ALL | E_STRICT
585+
E_ALL
586586
);
587587

588588
if ($oldErrorHandler === NULL) {

PHPUnit/Framework/TestSuite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public function getGroups()
625625
* @return PHPUnit_Framework_TestResult
626626
* @throws PHPUnit_Framework_Exception
627627
*/
628-
public function run(PHPUnit_Framework_TestResult $result = NULL, $filter = FALSE, array $groups = array(), array $excludeGroups = array(), $processIsolation = FALSE)
628+
public function run(?PHPUnit_Framework_TestResult $result = NULL, $filter = FALSE, array $groups = array(), array $excludeGroups = array(), $processIsolation = FALSE)
629629
{
630630
if ($result === NULL) {
631631
$result = $this->createResult();

0 commit comments

Comments
 (0)