Skip to content

Commit

Permalink
added test for mixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidanio committed Aug 27, 2024
1 parent 5c6192b commit 464138a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/tests/checkers/not_explicit_nullable_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,14 @@ class MyClass2 {

test.RunAndMatch()
}

func TestMixedParam(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(`<?php
function mixedParam(mixed $a = null) {
return 0;
}
`)

test.RunAndMatch()
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ function multipleArgsExample(string $a, int $b = null, bool $c = null) {
function nullableOrString(null|string $a = null) {
return 0;
}

function mixedParam(mixed $a = null) {
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ function multipleArgsExample(string $a, ?int $b = null, ?bool $c = null) {
function nullableOrString(null|string $a = null) {
return 0;
}

function mixedParam(mixed $a = null) {
return 0;
}

0 comments on commit 464138a

Please sign in to comment.