@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * Register an EntryPoint method on the SugarAPI object. |
| 121 | 121 | * Allows for loading custom EntryPoints, so long as custom EntryPoints are autoloaded accordingly |
| 122 | 122 | * @param $funcName - name of Method to be called on SugarAPI Object |
| 123 | - * @param $className - full name of EntryPoint Class that will be utilized |
|
| 123 | + * @param string $className - full name of EntryPoint Class that will be utilized |
|
| 124 | 124 | * @throws SDKException |
| 125 | 125 | */ |
| 126 | 126 | public function registerEntryPoint($funcName, $className){ |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | /** |
| 192 | 192 | * Get the configured Rest v10 URL |
| 193 | - * @return mixed |
|
| 193 | + * @return string |
|
| 194 | 194 | */ |
| 195 | 195 | public function getURL(){ |
| 196 | 196 | return $this->url; |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | * Configure the static property $_DEFAULTS with settings from defaults.php |
| 79 | 79 | */ |
| 80 | 80 | protected function loadDefaults(){ |
| 81 | - if (empty(static::$_DEFAULTS)) { |
|
| 82 | - include __DIR__ . DIRECTORY_SEPARATOR . 'defaults.php'; |
|
| 83 | - if (isset($defaults)) { |
|
| 81 | + if (empty(static::$_DEFAULTS)){ |
|
| 82 | + include __DIR__.DIRECTORY_SEPARATOR.'defaults.php'; |
|
| 83 | + if (isset($defaults)){ |
|
| 84 | 84 | static::$_DEFAULTS = $defaults; |
| 85 | 85 | } |
| 86 | 86 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $response = $EP->data($this->authOptions)->execute()->getResponse(); |
| 169 | 169 | if ($response->getStatus()=='200'){ |
| 170 | 170 | $this->authToken = $response->getBody(); |
| 171 | - } else{ |
|
| 171 | + }else{ |
|
| 172 | 172 | throw new AuthenticationException($response->getBody()); |
| 173 | 173 | } |
| 174 | 174 | } |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | * Configure the static property $_DEFAULTS with settings from defaults.php |
| 79 | 79 | */ |
| 80 | 80 | protected function loadDefaults(){ |
| 81 | - if (empty(static::$_DEFAULTS)) { |
|
| 81 | + if (empty(static::$_DEFAULTS)){ |
|
| 82 | 82 | include __DIR__ . DIRECTORY_SEPARATOR . 'defaults.php'; |
| 83 | - if (isset($defaults)) { |
|
| 83 | + if (isset($defaults)){ |
|
| 84 | 84 | static::$_DEFAULTS = $defaults; |
| 85 | 85 | } |
| 86 | 86 | } |
@@ -146,12 +146,12 @@ discard block |
||
| 146 | 146 | if ($EntryPoint->authRequired()){ |
| 147 | 147 | if (isset($this->authToken)){ |
| 148 | 148 | $EntryPoint->configureAuth($this->authToken->access_token); |
| 149 | - }else{ |
|
| 149 | + } else{ |
|
| 150 | 150 | throw new AuthenticationException('Authentication is required for EntryPoint ['.$name.'].'); |
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | return $EntryPoint; |
| 154 | - }else{ |
|
| 154 | + } else{ |
|
| 155 | 155 | throw new SDKException('Method '.$name.', is not a registered method of the SugarAPI SDK'); |
| 156 | 156 | } |
| 157 | 157 | } |