@@ -109,14 +109,16 @@ discard block |
||
| 109 | 109 | public function getEmailForPasswordReset() |
| 110 | 110 | { |
| 111 | 111 | list(, $caller) = debug_backtrace(false); |
| 112 | - if(isset($caller['class'])) |
|
| 113 | - $caller = explode('\\', $caller['class']); |
|
| 114 | - else |
|
| 115 | - $caller = ''; |
|
| 112 | + if(isset($caller['class'])) { |
|
| 113 | + $caller = explode('\\', $caller['class']); |
|
| 114 | + } else { |
|
| 115 | + $caller = ''; |
|
| 116 | + } |
|
| 116 | 117 | |
| 117 | 118 | //check if this function is called by email sender |
| 118 | - if ((count($caller) && $caller[count($caller) - 1] == 'PasswordBroker') || (defined('HHVM_VERSION') && $caller == '')) |
|
| 119 | - return $this->email; |
|
| 119 | + if ((count($caller) && $caller[count($caller) - 1] == 'PasswordBroker') || (defined('HHVM_VERSION') && $caller == '')) { |
|
| 120 | + return $this->email; |
|
| 121 | + } |
|
| 120 | 122 | //return unique identify for token repository |
| 121 | 123 | return $this->email . $this->company->id; |
| 122 | 124 | } |
@@ -128,8 +130,9 @@ discard block |
||
| 128 | 130 | public function belongsToGroup(Group $group) |
| 129 | 131 | { |
| 130 | 132 | $group = $this->groups()->where('id', $group->id)->first(); |
| 131 | - if(is_object($group) && $group->exists) |
|
| 132 | - return true; |
|
| 133 | + if(is_object($group) && $group->exists) { |
|
| 134 | + return true; |
|
| 135 | + } |
|
| 133 | 136 | return false; |
| 134 | 137 | } |
| 135 | 138 | |