diff --git a/tests/Drupal/bad/BadUnitTest.php b/tests/Drupal/bad/BadUnitTest.php index 090430c6..59811f28 100644 --- a/tests/Drupal/bad/BadUnitTest.php +++ b/tests/Drupal/bad/BadUnitTest.php @@ -383,7 +383,8 @@ protected function getErrorList(string $testFile): array 838 => 1, 849 => 2, 860 => 2, - 864 => 2, + 867 => 1, + 871 => 2, ]; }//end switch diff --git a/tests/Drupal/bad/bad.php b/tests/Drupal/bad/bad.php index 58428d01..cf249d9c 100644 --- a/tests/Drupal/bad/bad.php +++ b/tests/Drupal/bad/bad.php @@ -861,4 +861,11 @@ function test29( echo "Hello"; } +/** + * Nullable types should be annotated. + */ +function test30(TestType $a = NULL) { + echo "Hello"; +} + ?> \ No newline at end of file diff --git a/tests/Drupal/bad/bad.php.fixed b/tests/Drupal/bad/bad.php.fixed index 26abaa2e..f5fd6185 100644 --- a/tests/Drupal/bad/bad.php.fixed +++ b/tests/Drupal/bad/bad.php.fixed @@ -915,3 +915,10 @@ function test29( ) { echo "Hello"; } + +/** + * Nullable types should be annotated. + */ +function test30(?TestType $a = NULL) { + echo "Hello"; +}