@@ -38,6 +38,9 @@ |
||
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | + /** |
|
42 | + * @param string $email |
|
43 | + */ |
|
41 | 44 | public function getProfileCertainReturnByEmail($email) |
42 | 45 | { |
43 | 46 | return $this->get(null, ['email'=> $email]); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | class ProfileCertain extends CertainRessourceAbstract implements CertainRessourceInterface |
13 | 13 | { |
14 | - public function getRessourceName(){ |
|
14 | + public function getRessourceName() { |
|
15 | 15 | return 'Profile'; |
16 | 16 | } |
17 | 17 | public function getMandatoryFields() |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function getProfileByEmail($email) |
29 | 29 | { |
30 | - $resultCertain = $this->getProfileCertainReturnByEmail($email); |
|
31 | - if($resultCertain->size == 1){ |
|
30 | + $resultCertain = $this->getProfileCertainReturnByEmail($email); |
|
31 | + if ($resultCertain->size == 1) { |
|
32 | 32 | return $resultCertain->profiles[0]; |
33 | 33 | |
34 | - } elseif($resultCertain->size > 1){ |
|
34 | + } elseif ($resultCertain->size>1) { |
|
35 | 35 | throw new RessourceException('Duplicate entries'); |
36 | - } else{ |
|
36 | + }else { |
|
37 | 37 | return $resultCertain; |
38 | 38 | } |
39 | 39 | } |