@@ -33,12 +33,12 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | protected function getParameterName($parameters, Validator $validator) |
| 35 | 35 | { |
| 36 | - if(isset($parameters[0])) return $parameters[0]; |
|
| 36 | + if (isset($parameters[ 0 ])) return $parameters[ 0 ]; |
|
| 37 | 37 | |
| 38 | - $possibles = ['email', 'email_address']; |
|
| 38 | + $possibles = [ 'email', 'email_address' ]; |
|
| 39 | 39 | |
| 40 | 40 | foreach ($possibles as $possible) { |
| 41 | - if(isset($validator->getData()[$possible])) return $possible; |
|
| 41 | + if (isset($validator->getData()[ $possible ])) return $possible; |
|
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $field = $this->getParameterName($parameters, $validator); |
| 48 | 48 | |
| 49 | - if($field) { |
|
| 50 | - return $validator->getData()[$field]; |
|
| 49 | + if ($field) { |
|
| 50 | + return $validator->getData()[ $field ]; |
|
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | } |
@@ -33,12 +33,16 @@ |
||
| 33 | 33 | |
| 34 | 34 | protected function getParameterName($parameters, Validator $validator) |
| 35 | 35 | { |
| 36 | - if(isset($parameters[0])) return $parameters[0]; |
|
| 36 | + if(isset($parameters[0])) { |
|
| 37 | + return $parameters[0]; |
|
| 38 | + } |
|
| 37 | 39 | |
| 38 | 40 | $possibles = ['email', 'email_address']; |
| 39 | 41 | |
| 40 | 42 | foreach ($possibles as $possible) { |
| 41 | - if(isset($validator->getData()[$possible])) return $possible; |
|
| 43 | + if(isset($validator->getData()[$possible])) { |
|
| 44 | + return $possible; |
|
| 45 | + } |
|
| 42 | 46 | } |
| 43 | 47 | } |
| 44 | 48 | |
@@ -22,7 +22,9 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public function hasExpired() |
| 24 | 24 | { |
| 25 | - if (is_null($this->valid_until)) return false; |
|
| 25 | + if (is_null($this->valid_until)) { |
|
| 26 | + return false; |
|
| 27 | + } |
|
| 26 | 28 | |
| 27 | 29 | return $this->valid_until->isPast(); |
| 28 | 30 | } |
@@ -34,7 +36,9 @@ discard block |
||
| 34 | 36 | */ |
| 35 | 37 | public function isFull() |
| 36 | 38 | { |
| 37 | - if ($this->max == 0) return false; |
|
| 39 | + if ($this->max == 0) { |
|
| 40 | + return false; |
|
| 41 | + } |
|
| 38 | 42 | |
| 39 | 43 | return $this->uses >= $this->max; |
| 40 | 44 | } |