@@ -92,7 +92,7 @@ function get_module_info($row)
92
92
return $ matches [1 ];
93
93
}
94
94
95
- function create_test_manager (string $ uri = null , array $ options = [], array $ driverOptions = [])
95
+ function create_test_manager (? string $ uri = null , array $ options = [], array $ driverOptions = [])
96
96
{
97
97
if (getenv ('API_VERSION ' ) && ! isset ($ driverOptions ['serverApi ' ])) {
98
98
$ driverOptions ['serverApi ' ] = new ServerApi (getenv ('API_VERSION ' ));
@@ -628,7 +628,7 @@ function severityToString(int $severity): string {
628
628
* from a particular function. Returns the message from the raised error or
629
629
* exception, or an empty string if neither was thrown.
630
630
*/
631
- function raises (callable $ callable , int $ expectedSeverity , string $ expectedFromFunction = null ): string
631
+ function raises (callable $ callable , int $ expectedSeverity , ? string $ expectedFromFunction = null ): string
632
632
{
633
633
set_error_handler (function (int $ severity , string $ message , string $ file , int $ line ) {
634
634
throw new ErrorException ($ message , 0 , $ severity , $ file , $ line );
@@ -672,7 +672,7 @@ function raises(callable $callable, int $expectedSeverity, string $expectedFromF
672
672
* the exception to be thrown from a particular function. Returns the message
673
673
* from the thrown exception, or an empty string if one was not thrown.
674
674
*/
675
- function throws (callable $ callable , string $ expectedException , string $ expectedFromFunction = null ): string
675
+ function throws (callable $ callable , string $ expectedException , ? string $ expectedFromFunction = null ): string
676
676
{
677
677
try {
678
678
call_user_func ($ callable );
@@ -730,7 +730,7 @@ function printWriteResult(WriteResult $result, $details = true)
730
730
}
731
731
}
732
732
733
- function printWriteConcernError (WriteConcernError $ error = null , $ details )
733
+ function printWriteConcernError (? WriteConcernError $ error = null , $ details = null )
734
734
{
735
735
if ($ error ) {
736
736
/* This stuff is generated by the server, no need for us to test it */
0 commit comments