| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function actionAuthorize(int $id = null) |
||
| 26 | { |
||
| 27 | if (null === $id) { |
||
| 28 | $id = (int)Craft::$app->getRequest()->getBodyParam('id'); |
||
| 29 | } |
||
| 30 | |||
| 31 | $action = Craft::createObject([ |
||
| 32 | 'class' => Authorize::class, |
||
| 33 | 'checkAccess' => [$this, 'checkAdminAccess'] |
||
| 34 | ], [ |
||
| 35 | 'authorize', |
||
| 36 | $this |
||
| 37 | ]); |
||
| 38 | |||
| 39 | return $action->runWithParams([ |
||
| 40 | 'id' => $id |
||
| 41 | ]); |
||
| 42 | } |
||
| 43 | |||
| 53 |