| 1 | <?php |
||
| 10 | class AlertStatisticsEndpoint extends EndpointBaseController |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Construct |
||
| 14 | * |
||
| 15 | * @param \Ps2alerts\Api\Loader\Statistics\AlertStatisticsLoader $loader |
||
| 16 | */ |
||
| 17 | public function __construct(AlertStatisticsLoader $loader) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Gets total alerts based on provided parameters |
||
| 24 | * |
||
| 25 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
| 26 | * |
||
| 27 | * @return \League\Route\Http\JsonResponse |
||
| 28 | */ |
||
| 29 | public function readTotals(Request $request) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Retrieves the zones totals |
||
| 46 | * |
||
| 47 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
| 48 | * |
||
| 49 | * @return \League\Route\Http\JsonResponse |
||
| 50 | */ |
||
| 51 | public function readZoneTotals(Request $request) |
||
| 61 | } |
||
| 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: