Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
29 | public function readTotals(Request $request) |
||
30 | { |
||
31 | $post = $request->request->all(); |
||
32 | |||
33 | $this->getLogDriver()->addDebug(json_encode($post)); |
||
34 | |||
35 | $return = $this->loader->readTotals($post); |
||
|
|||
36 | |||
37 | if (empty($return)) { |
||
38 | return new Response\NoContent(); |
||
39 | } |
||
40 | |||
41 | return new Response\Ok($return); |
||
42 | } |
||
43 | |||
62 |
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: