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) |
||
41 | |||
42 | /** |
||
43 | * Retrieves the zones totals |
||
44 | * |
||
45 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
46 | * |
||
47 | * @return \League\Route\Http\JsonResponse |
||
48 | */ |
||
49 | public function readZoneTotals(Request $request) |
||
59 | |||
60 | /** |
||
61 | * Retrieves the victory summary (daily or monthly) |
||
62 | * |
||
63 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
64 | * |
||
65 | * @return \League\Route\Http\JsonResponse |
||
66 | */ |
||
67 | public function readHistorySummary(Request $request) |
||
79 | |||
80 | /** |
||
81 | * Retrives a list of alerts based off filters |
||
82 | * |
||
83 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
84 | * |
||
85 | * @return \League\Route\Http\JsonResponse |
||
86 | */ |
||
87 | public function readAlertHistory(Request $request) |
||
99 | } |
||
100 |
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: