@@ -87,7 +87,7 @@ |
||
87 | 87 | * Set the current user |
88 | 88 | * |
89 | 89 | * @param User $user |
90 | - * @return boolean |
|
90 | + * @return null|User |
|
91 | 91 | */ |
92 | 92 | public function setUser(User $user) |
93 | 93 | { |
@@ -52,7 +52,9 @@ |
||
52 | 52 | public function getLevel($name) |
53 | 53 | { |
54 | 54 | $levels = $this->getLevels(); |
55 | - if (!isset($levels[$name])) throw new \DomainException("Authorization level '$name' isn't defined."); |
|
55 | + if (!isset($levels[$name])) { |
|
56 | + throw new \DomainException("Authorization level '$name' isn't defined."); |
|
57 | + } |
|
56 | 58 | |
57 | 59 | return $levels[$name]; |
58 | 60 | } |
@@ -61,7 +61,9 @@ |
||
61 | 61 | */ |
62 | 62 | public static function expandGroup($groups) |
63 | 63 | { |
64 | - if (!is_array($groups)) $groups = (array)$groups; |
|
64 | + if (!is_array($groups)) { |
|
65 | + $groups = (array)$groups; |
|
66 | + } |
|
65 | 67 | |
66 | 68 | $expanded = $groups; |
67 | 69 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | protected function generateConfirmHash($id) |
52 | 52 | { |
53 | - $confirmHash = hash('sha256', $id . $this->getConfirmationSecret()); |
|
53 | + $confirmHash = hash('sha256', $id.$this->getConfirmationSecret()); |
|
54 | 54 | |
55 | 55 | return sprintf('%012s', substr(base_convert($confirmHash, 16, 36), -12)); |
56 | 56 | } |