@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use SugarAPI\SDK\EntryPoint\Abstracts\GET\FileEntryPoint as GETFileEntryPoint; |
6 | 6 | |
7 | -class RecordFileField extends GETFileEntryPoint{ |
|
7 | +class RecordFileField extends GETFileEntryPoint { |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @inheritdoc |
@@ -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){ |
@@ -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 | } |