1 | <?php |
||
22 | class AnnotationTestBase extends TestCase |
||
23 | { |
||
24 | const GET_METHOD = 'GET'; |
||
25 | const POST_METHOD = 'POST'; |
||
26 | const PUT_METHOD = 'PUT'; |
||
27 | const DELETE_METHOD = 'DELETE'; |
||
28 | |||
29 | const STATUS_OK = 200; |
||
30 | const STATUS_REDIRECT = 301; |
||
31 | const STATUS_UNAUTHORIZED = 401; |
||
32 | const STATUS_NOT_FOUND = 404; |
||
33 | const STATUS_ERROR = 500; |
||
34 | |||
35 | protected static $CONTROLLER_DIR; |
||
36 | |||
37 | /** @var Application */ |
||
38 | protected $app; |
||
39 | |||
40 | /** @var Client */ |
||
41 | protected $client; |
||
42 | |||
43 | protected $clientOptions = array(); |
||
44 | protected $requestOptions = array(); |
||
45 | |||
46 | public function setup() |
||
52 | |||
53 | /** |
||
54 | * @param array $options |
||
55 | * @return AnnotationService |
||
56 | */ |
||
57 | protected function registerProviders($options = []): AnnotationService |
||
68 | |||
69 | protected function getClient($annotationOptions = array()) |
||
76 | |||
77 | /** |
||
78 | * @param $method |
||
79 | * @param $uri |
||
80 | * @param $status |
||
81 | * @param array $annotationOptions |
||
82 | */ |
||
83 | protected function assertEndPointStatus($method, $uri, $status, $annotationOptions = array()) |
||
87 | |||
88 | /** |
||
89 | * @param $method |
||
90 | * @param $uri |
||
91 | * @param array $annotationOptions |
||
92 | * @return null|Response |
||
93 | */ |
||
94 | protected function makeRequest($method, $uri, $annotationOptions = array()): ?Response |
||
102 | |||
103 | /** |
||
104 | * @param Response $response |
||
105 | * @param $status |
||
106 | */ |
||
107 | protected function assertStatus(Response $response, $status) |
||
111 | |||
112 | /** |
||
113 | * @param $controllers |
||
114 | * @return string[] |
||
115 | */ |
||
116 | protected function flattenControllerArray($controllers): array |
||
122 | } |
||
123 | |||
127 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: