| Total Complexity | 8 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class CidReqHelper |
||
| 20 | { |
||
| 21 | public function __construct( |
||
| 22 | private readonly RequestStack $requestStack, |
||
| 23 | ) {} |
||
| 24 | |||
| 25 | private function getRequest(): ?Request |
||
| 26 | { |
||
| 27 | return $this->requestStack->getCurrentRequest(); |
||
| 28 | } |
||
| 29 | |||
| 30 | private function getSessionHandler(): SessionInterface |
||
| 31 | { |
||
| 32 | return $this->getRequest()->getSession(); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getSessionId(): ?int |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getSessionEntity(): ?Session |
||
| 41 | { |
||
| 42 | return $this->getSessionHandler()->get('session'); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getCourseId() |
||
| 46 | { |
||
| 47 | return $this->getSessionHandler()->get('cid'); |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getCourseEntity(): ?Course |
||
| 53 | } |
||
| 54 | |||
| 55 | public function getGroupId(): ?int |
||
| 56 | { |
||
| 58 | } |
||
| 59 | } |
||
| 60 |