| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function getLeads($request, $response, $args) |
||
| 28 | { |
||
| 29 | $this->validateLoggedIn($request); |
||
| 30 | $dataTable = DataSetFactory::getDataTableByNames('profiles', 'position'); |
||
| 31 | $odata = $request->getAttribute('odata', new \ODataParams(array())); |
||
| 32 | $leads = $dataTable->read(new \Data\Filter("area eq '".$args['name']."'"), $odata->select, $odata->top, |
||
| 33 | $odata->skip, $odata->orderby); |
||
| 34 | if(empty($leads)) |
||
| 35 | { |
||
| 36 | return $response->withStatus(404); |
||
| 37 | } |
||
| 38 | return $response->withJson($leads); |
||
| 39 | } |
||
| 40 | } |
||
| 42 |
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: