| 1 | <?php |
||
| 14 | final class IsSafeHttpRouteTest extends \PHPUnit_Framework_TestCase |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @dataProvider routesProvider |
||
| 18 | * |
||
| 19 | * @param array $routes |
||
| 20 | * @param string $path |
||
| 21 | * @param bool $expectedResult |
||
| 22 | */ |
||
| 23 | public function testSafeRoutes(array $routes, string $path, bool $expectedResult) |
||
| 37 | |||
| 38 | public function routesProvider() : array |
||
| 63 | } |
||
| 64 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: