@@ -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,18 +27,18 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function getProfileByEmail($email) |
29 | 29 | { |
30 | - $resultCertain = $this->getProfileCertainReturnByEmail($email); |
|
31 | - if($resultCertain->isSuccessFul()){ |
|
30 | + $resultCertain = $this->getProfileCertainReturnByEmail($email); |
|
31 | + if ($resultCertain->isSuccessFul()) { |
|
32 | 32 | $resultCertainProfile = $resultCertain->getResults(); |
33 | - if($resultCertainProfile->size == 1){ |
|
33 | + if ($resultCertainProfile->size == 1) { |
|
34 | 34 | return $resultCertainProfile->profiles[0]; |
35 | 35 | |
36 | - } elseif($resultCertainProfile->size > 1){ |
|
36 | + } elseif ($resultCertainProfile->size>1) { |
|
37 | 37 | throw new RessourceException('Duplicate entries'); |
38 | - } else{ |
|
38 | + }else { |
|
39 | 39 | return $resultCertain; |
40 | 40 | } |
41 | - } else{ |
|
41 | + }else { |
|
42 | 42 | return null; |
43 | 43 | } |
44 | 44 | |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | * @param string $email |
51 | 51 | * @return ProfileObject |
52 | 52 | */ |
53 | - public function getDuplicateProfileByEmail($profilePin,$email) |
|
53 | + public function getDuplicateProfileByEmail($profilePin, $email) |
|
54 | 54 | { |
55 | - $resultCertain = $this->getProfileByEmail($email); |
|
55 | + $resultCertain = $this->getProfileByEmail($email); |
|
56 | 56 | $pofileDuplicates = array_map(function($profile) use ($profilePin){ |
57 | - if($profile->profilePin != $profilePin){ |
|
57 | + if ($profile->profilePin != $profilePin) { |
|
58 | 58 | return $profile; |
59 | 59 | } |
60 | 60 | }, $resultCertain); |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function getProfiles() |
81 | 81 | { |
82 | - $request= $this->get(); |
|
83 | - if($request->isSuccessFul()){ |
|
82 | + $request = $this->get(); |
|
83 | + if ($request->isSuccessFul()) { |
|
84 | 84 | $profileCertainResults = $request->getResults(); |
85 | 85 | return $profileCertainResults->profiles; |
86 | 86 | } |