Completed
Push — master ( e51b65...b01527 )
by Mike
8s
created
src/SugarAPI.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         require __DIR__ .DIRECTORY_SEPARATOR.'EntryPoint' .DIRECTORY_SEPARATOR.'registry.php';
65 65
         if (isset($entryPoints)){
66 66
             $this->entryPoints = $entryPoints;
67
-        }else{
67
+        } else{
68 68
             throw new InitializationFailure('no_ep_registry');
69 69
         }
70 70
     }
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
             if ($EntryPoint->authRequired()){
78 78
                 if (isset($this->authToken)) {
79 79
                     $EntryPoint->getRequest()->addHeader('OAuth-Token', $this->authToken->access_token);
80
-                }else{
80
+                } else{
81 81
                     throw new AuthenticationError('no_auth');
82 82
                 }
83 83
             }
84 84
             return $EntryPoint;
85
-        }else{
85
+        } else{
86 86
             throw new InvalidEntryPoint('invalid_ep');
87 87
         }
88 88
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $response = $EP->data($this->authOptions)->execute()->getResponse();
95 95
         if ($response->getStatus()=='200'){
96 96
             $this->authToken = $response->getBody();
97
-        }else{
97
+        } else{
98 98
             throw new AuthenticationError('failed_auth');
99 99
         }
100 100
     }
Please login to merge, or discard this patch.
src/EntryPoint/Abstracts/AbstractEntryPoint.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
         if ($urlVarCount!==$optionCount){
190 190
             if (empty($this->Module)){
191 191
                 throw new EntryPointExecutionFailure('missing_module');
192
-            }else{
192
+            } else{
193 193
                 throw new EntryPointExecutionFailure('missing_options');
194 194
             }
195
-        }else{
195
+        } else{
196 196
             return true;
197 197
         }
198 198
     }
@@ -203,18 +203,18 @@  discard block
 block discarded – undo
203 203
     protected function validateData(){
204 204
         if (empty($this->_REQUIRED_DATA)||count($this->_REQUIRED_DATA)==0){
205 205
             return true;
206
-        }else{
206
+        } else{
207 207
             $errors = array();
208 208
             foreach($this->_REQUIRED_DATA as $property){
209 209
                 if (isset($this->Data[$property]) || $this->Data[$property]!==null){
210 210
                     continue;
211
-                }else{
211
+                } else{
212 212
                     $errors[] = $property;
213 213
                 }
214 214
             }
215 215
             if (count($errors)>0){
216 216
                 throw new EntryPointExecutionFailure('missing_data');
217
-            }else{
217
+            } else{
218 218
                 return true;
219 219
             }
220 220
         }
Please login to merge, or discard this patch.
src/Exception/Abstracts/AbstractException.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     protected function convertCode($code,$string=''){
16 16
         if (array_key_exists($code,$this->failureCodes)){
17 17
             return $this->failureCodes[$code];
18
-        }else{
18
+        } else{
19 19
             return $this->defaultMessage;
20 20
         }
21 21
     }
Please login to merge, or discard this patch.
examples/ListRecords.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
     $response = $EP->execute()->getResponse();
11 11
     if ($response->getStatus()=='200'){
12 12
         print_r($response->getBody());
13
-    }else{
13
+    } else{
14 14
         print_r($EP);
15 15
         print_r($response->getBody());
16 16
     }
17
-}catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
17
+} catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
18 18
     print $ex->getMessage();
19 19
 }
Please login to merge, or discard this patch.
examples/UpdateRecord.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     ))->execute()->getResponse()->getBody();
16 16
     echo "Updated Record: ".$record->id;
17 17
 
18
-}catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
18
+} catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
19 19
     print $ex->getMessage();
20 20
 }
21 21
 
Please login to merge, or discard this patch.
examples/CreateRecord.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
         print_r($getResponse->getBody());
20 20
     }
21 21
 
22
-}catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
22
+} catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
23 23
     print $ex->getMessage();
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
src/Response/Abstracts/AbstractResponse.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     protected function convertCode($code,$string=''){
16 16
         if (array_key_exists($code,$this->failureCodes)){
17 17
             return $this->failureCodes[$code];
18
-        }else{
18
+        } else{
19 19
             return $this->defaultMessage;
20 20
         }
21 21
     }
Please login to merge, or discard this patch.
examples/FavoriteRecord.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     ))->execute()->getResponse()->getBody();
16 16
     echo "Updated Record: ".$record->id;
17 17
 
18
-}catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
18
+} catch(\SugarAPI\SDK\Exception\AuthenticationError $ex){
19 19
     print $ex->getMessage();
20 20
 }
21 21
 
Please login to merge, or discard this patch.