@@ -20,7 +20,7 @@ |
||
20 | 20 | /** |
21 | 21 | * @inheritdoc |
22 | 22 | */ |
23 | - public function data(array $data) { |
|
23 | + public function data(array $data){ |
|
24 | 24 | foreach($data as $key => $value){ |
25 | 25 | if (strtolower($key)!=='oauth_token' || strtolower($key)!=='delete_if_fails' || strtolower($key)!=='format'){ |
26 | 26 | if (strpos($value,'@')===FALSE){ |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use SugarAPI\SDK\EntryPoint\Abstracts\POST\JSONEntryPoint as POSTEntryPoint; |
6 | 6 | |
7 | -class CreateRecord extends POSTEntryPoint{ |
|
7 | +class CreateRecord extends POSTEntryPoint { |
|
8 | 8 | |
9 | 9 | protected $_URL = '$module'; |
10 | 10 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | protected function loadDefaults(){ |
43 | 43 | include __DIR__ .DIRECTORY_SEPARATOR.'defaults.php'; |
44 | - if (isset($defaults)) { |
|
44 | + if (isset($defaults)){ |
|
45 | 45 | static::$_DEFAULTS = $defaults; |
46 | 46 | if (isset($defaults['instance'])){ |
47 | 47 | $this->setInstance($defaults['instance']); |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | $EntryPoint = new $Class($this->url,$params); |
82 | 82 | |
83 | 83 | if ($EntryPoint->authRequired()){ |
84 | - if (isset($this->authToken)) { |
|
84 | + if (isset($this->authToken)){ |
|
85 | 85 | $EntryPoint->configureAuth($this->authToken->access_token); |
86 | - }else{ |
|
86 | + } else{ |
|
87 | 87 | throw new AuthenticationException('no_auth'); |
88 | 88 | } |
89 | 89 | } |
90 | 90 | return $EntryPoint; |
91 | - }else{ |
|
91 | + } else{ |
|
92 | 92 | throw new SDKException('Method '.$name.', is not a registered method of the SugarAPI SDK'); |
93 | 93 | } |
94 | 94 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $response = $EP->data($this->authOptions)->execute()->getResponse(); |
101 | 101 | if ($response->getStatus()=='200'){ |
102 | 102 | $this->authToken = $response->getBody(); |
103 | - }else{ |
|
103 | + } else{ |
|
104 | 104 | throw new AuthenticationException($response->getBody()); |
105 | 105 | } |
106 | 106 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | print_r($response); |
14 | 14 | |
15 | -}catch(\SugarAPI\SDK\Exception\AuthenticationException $ex){ |
|
15 | +} catch(\SugarAPI\SDK\Exception\AuthenticationException $ex){ |
|
16 | 16 | print $ex->getMessage(); |
17 | 17 | } |
18 | 18 |