| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | protected function getSiteFromRequest(ServerRequestInterface $request): SiteInterface |
||
| 21 | { |
||
| 22 | $site = $request->getAttribute('site'); |
||
| 23 | if (!($site instanceof SiteInterface)) { |
||
| 24 | throw new \Exception('Found no valid site object in request', 1_637_813_123); |
||
|
|
|||
| 25 | } |
||
| 26 | |||
| 27 | return $site; |
||
| 28 | } |
||
| 30 |