Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | public function actionList( |
||
56 | $pageUrl = '', |
||
57 | string $start = '', |
||
58 | string $end = '', |
||
59 | $siteId = 0 |
||
60 | ): Response { |
||
61 | PermissionHelper::controllerPermissionCheck('webperf:recommendations'); |
||
62 | $data = []; |
||
63 | $stats = Webperf::$plugin->recommendations->data($pageUrl, $start, $end, $siteId); |
||
64 | if (!empty($stats)) { |
||
65 | $recSample = new RecommendationDataSample($stats); |
||
66 | $data = Webperf::$plugin->recommendations->list($recSample); |
||
67 | } |
||
68 | |||
69 | return $this->asJson($data); |
||
70 | } |
||
75 |