@@ -117,8 +117,9 @@ discard block |
||
| 117 | 117 | $this->executeOrFail($ps, [':user_id' => $id]); |
| 118 | 118 | |
| 119 | 119 | $resultSet = $ps->fetch(PDO::FETCH_ASSOC); |
| 120 | - if( $resultSet === false ) |
|
| 121 | - throw new \InvalidArgumentException("User with id = $id not found"); |
|
| 120 | + if( $resultSet === false ) { |
|
| 121 | + throw new \InvalidArgumentException("User with id = $id not found"); |
|
| 122 | + } |
|
| 122 | 123 | |
| 123 | 124 | $ref = new \ReflectionClass(User::class); |
| 124 | 125 | $user = $this->castUser($ref->newInstanceWithoutConstructor()); |
@@ -282,8 +283,9 @@ discard block |
||
| 282 | 283 | $this->executeOrFail($ps, [':group_id' => $id]); |
| 283 | 284 | |
| 284 | 285 | $resultSet = $ps->fetch(PDO::FETCH_ASSOC); |
| 285 | - if( $resultSet === false ) |
|
| 286 | - throw new \InvalidArgumentException("Group with id = $id not found"); |
|
| 286 | + if( $resultSet === false ) { |
|
| 287 | + throw new \InvalidArgumentException("Group with id = $id not found"); |
|
| 288 | + } |
|
| 287 | 289 | |
| 288 | 290 | $ref = new \ReflectionClass(Group::class); |
| 289 | 291 | $group = $this->castGroup($ref->newInstanceWithoutConstructor()); |
@@ -425,8 +427,9 @@ discard block |
||
| 425 | 427 | $this->executeOrFail($ps, [':role_id' => $id]); |
| 426 | 428 | |
| 427 | 429 | $resultSet = $ps->fetch(PDO::FETCH_ASSOC); |
| 428 | - if( $resultSet === false ) |
|
| 429 | - throw new \InvalidArgumentException("Role with id = $id not found"); |
|
| 430 | + if( $resultSet === false ) { |
|
| 431 | + throw new \InvalidArgumentException("Role with id = $id not found"); |
|
| 432 | + } |
|
| 430 | 433 | |
| 431 | 434 | $ref = new \ReflectionClass(Role::class); |
| 432 | 435 | $role = $this->castRole($ref->newInstanceWithoutConstructor()); |
@@ -755,8 +758,9 @@ discard block |
||
| 755 | 758 | ]); |
| 756 | 759 | |
| 757 | 760 | $resultSet = $ps->fetch(PDO::FETCH_ASSOC); |
| 758 | - if( $resultSet === false ) |
|
| 759 | - throw new \InvalidArgumentException("Module with id = $id not found"); |
|
| 761 | + if( $resultSet === false ) { |
|
| 762 | + throw new \InvalidArgumentException("Module with id = $id not found"); |
|
| 763 | + } |
|
| 760 | 764 | |
| 761 | 765 | $ref = new \ReflectionClass(Module::class); |
| 762 | 766 | $module = $this->castModule($ref->newInstanceWithoutConstructor()); |