| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function get($groupId=-1) |
||
| 16 | { |
||
| 17 | if( $groupId==-1 ) { |
||
| 18 | $groupId = session('groupID'); |
||
| 19 | } |
||
| 20 | else { |
||
| 21 | $this->validateID($groupId); |
||
| 22 | } |
||
| 23 | |||
| 24 | try { |
||
| 25 | $group = $this->model->findOrFail($groupId); |
||
| 26 | } |
||
| 27 | catch(Exception $e) { |
||
| 28 | throw new RepositoryException('Could not find group with ID '.$groupId, RepositoryException::DATABASE_ERROR); |
||
| 29 | } |
||
| 30 | |||
| 31 | return $group; |
||
| 32 | } |
||
| 33 | |||
| 34 | } |