| Conditions | 2 |
| Paths | 2 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function actionIndex(): Response |
||
| 35 | { |
||
| 36 | $variables = []; |
||
| 37 | $this->baseVariables($variables); |
||
| 38 | |||
| 39 | if (null !== ($connection = $this->findActiveConnection())) { |
||
| 40 | $criteria = new HubCriteria([ |
||
| 41 | 'connection' => $connection->getConnection() |
||
| 42 | ]); |
||
| 43 | |||
| 44 | $model = call_user_func_array( |
||
| 45 | new DynamicModelResponse(), |
||
| 46 | [ |
||
| 47 | $criteria->dailyLimit() |
||
| 48 | ] |
||
| 49 | ); |
||
| 50 | } |
||
| 51 | |||
| 52 | $variables['limits'] = $model ?? $this->invalidConnectionModel(); |
||
| 53 | |||
| 54 | return $this->renderTemplate( |
||
| 55 | static::TEMPLATE_INDEX, |
||
| 56 | $variables |
||
| 57 | ); |
||
| 58 | } |
||
| 59 | |||
| 80 |