@@ -17,8 +17,8 @@ |
||
17 | 17 | /** |
18 | 18 | * @inheritdoc |
19 | 19 | */ |
20 | - public function getBody($asArray = true) { |
|
21 | - return json_decode($this->body,$asArray); |
|
20 | + public function getBody($asArray = true){ |
|
21 | + return json_decode($this->body, $asArray); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | } |
25 | 25 | \ No newline at end of file |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @inheritdoc |
19 | 19 | */ |
20 | - public function getBody($asArray = true) { |
|
20 | + public function getBody($asArray = true){ |
|
21 | 21 | return json_decode($this->body,$asArray); |
22 | 22 | } |
23 | 23 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @inheritdoc |
19 | 19 | */ |
20 | - public function getBody($asArray = true) { |
|
20 | + public function getBody($asArray = TRUE) { |
|
21 | 21 | return json_decode($this->body,$asArray); |
22 | 22 | } |
23 | 23 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class EntryPointException extends SDKException { |
6 | 6 | |
7 | - public function __construct($message) { |
|
7 | + public function __construct($message){ |
|
8 | 8 | parent::__construct($message); |
9 | 9 | } |
10 | 10 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class EntryPointException extends SDKException { |
6 | 6 | |
7 | - public function __construct($message) { |
|
7 | + public function __construct($message){ |
|
8 | 8 | parent::__construct($message); |
9 | 9 | } |
10 | 10 |
@@ -8,8 +8,8 @@ |
||
8 | 8 | |
9 | 9 | protected $message = 'Authentication Exception [%s] occurred in SDK Client. Message: %s'; |
10 | 10 | |
11 | - public function __construct($message) { |
|
12 | - parent::__construct(sprintf($this->message,get_called_class(),$message)); |
|
11 | + public function __construct($message){ |
|
12 | + parent::__construct(sprintf($this->message, get_called_class(), $message)); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class EntryPointException extends SDKException { |
6 | 6 | |
7 | - public function __construct($message) { |
|
7 | + public function __construct($message){ |
|
8 | 8 | parent::__construct($message); |
9 | 9 | } |
10 | 10 |
@@ -8,8 +8,8 @@ |
||
8 | 8 | |
9 | 9 | protected $message = 'EntryPoint Exception [%s] occurred on EntryPoint %s: %s'; |
10 | 10 | |
11 | - public function __construct($EntryPoint,$data) { |
|
12 | - parent::__construct(sprintf($this->message,get_called_class(),$EntryPoint,$data)); |
|
11 | + public function __construct($EntryPoint, $data){ |
|
12 | + parent::__construct(sprintf($this->message, get_called_class(), $EntryPoint, $data)); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | protected $message = 'EntryPoint Exception [%s] occurred on EntryPoint %s: %s'; |
10 | 10 | |
11 | - public function __construct($EntryPoint,$data) { |
|
11 | + public function __construct($EntryPoint,$data){ |
|
12 | 12 | parent::__construct(sprintf($this->message,get_called_class(),$EntryPoint,$data)); |
13 | 13 | } |
14 | 14 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * @param null $data |
59 | 59 | * @return mixed |
60 | 60 | */ |
61 | - public function execute($data = null); |
|
61 | + public function execute($data = NULL); |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Get the module that is set on the EntryPoint |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | protected $accessToken; |
95 | 95 | |
96 | 96 | |
97 | - public function __construct($url,$options = array()){ |
|
97 | + public function __construct($url, $options = array()){ |
|
98 | 98 | $this->baseUrl = $url; |
99 | 99 | |
100 | - if (!empty($options)) { |
|
100 | + if (!empty($options)){ |
|
101 | 101 | $this->setOptions($options); |
102 | - }elseif(!$this->requiresOptions()){ |
|
102 | + }elseif (!$this->requiresOptions()){ |
|
103 | 103 | $this->configureURL(); |
104 | 104 | } |
105 | 105 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function setData($data){ |
123 | 123 | $this->Data = $data; |
124 | - if ($this->verifyData()) { |
|
124 | + if ($this->verifyData()){ |
|
125 | 125 | $this->Request->setBody($data); |
126 | 126 | } |
127 | 127 | return $this; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | /** |
131 | 131 | * @inheritdoc |
132 | 132 | */ |
133 | - public function setAuth($accessToken) { |
|
133 | + public function setAuth($accessToken){ |
|
134 | 134 | if ($this->authRequired()){ |
135 | 135 | $this->accessToken = $accessToken; |
136 | 136 | $this->Request->addHeader('OAuth-Token', $accessToken); |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | * @inheritdoc |
143 | 143 | * @throws InvalidURLException - When passed in URL contains $variables |
144 | 144 | */ |
145 | - public function setUrl($url) { |
|
145 | + public function setUrl($url){ |
|
146 | 146 | $this->Url = $url; |
147 | - if ($this->verifyUrl()) { |
|
147 | + if ($this->verifyUrl()){ |
|
148 | 148 | $this->Request->setURL($this->Url); |
149 | 149 | } |
150 | 150 | return $this; |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | /** |
154 | 154 | * @inheritdoc |
155 | 155 | */ |
156 | - public function setRequest(RequestInterface $Request) { |
|
156 | + public function setRequest(RequestInterface $Request){ |
|
157 | 157 | $this->Request = $Request; |
158 | 158 | return $this; |
159 | 159 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | /** |
162 | 162 | * @inheritdoc |
163 | 163 | */ |
164 | - public function setResponse(ResponseInterface $Response) { |
|
164 | + public function setResponse(ResponseInterface $Response){ |
|
165 | 165 | $this->Response = $Response; |
166 | 166 | return $this; |
167 | 167 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | /** |
170 | 170 | * @inheritdoc |
171 | 171 | */ |
172 | - public function getModule() { |
|
172 | + public function getModule(){ |
|
173 | 173 | return $this->Module; |
174 | 174 | } |
175 | 175 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | /** |
216 | 216 | * @inheritdoc |
217 | 217 | */ |
218 | - public function authRequired() { |
|
218 | + public function authRequired(){ |
|
219 | 219 | return $this->_AUTH_REQUIRED; |
220 | 220 | } |
221 | 221 | |
@@ -223,8 +223,8 @@ discard block |
||
223 | 223 | * Override function for configuring Default Values on some EntryPoints to allow for short hand |
224 | 224 | */ |
225 | 225 | protected function configureData($data){ |
226 | - if (!empty($this->_REQUIRED_DATA)&&is_array($data)){ |
|
227 | - foreach($this->_REQUIRED_DATA as $property => $value){ |
|
226 | + if (!empty($this->_REQUIRED_DATA) && is_array($data)){ |
|
227 | + foreach ($this->_REQUIRED_DATA as $property => $value){ |
|
228 | 228 | if (!isset($data[$property])){ |
229 | 229 | $data[$property] = $value; |
230 | 230 | } |
@@ -240,18 +240,18 @@ discard block |
||
240 | 240 | */ |
241 | 241 | protected function configureURL(){ |
242 | 242 | $url = $this->_URL; |
243 | - if ($this->requiresOptions()) { |
|
243 | + if ($this->requiresOptions()){ |
|
244 | 244 | $urlParts = explode("/", $this->_URL); |
245 | 245 | $o = 0; |
246 | - foreach ($urlParts as $key => $part) { |
|
247 | - if (strpos($part, "$") !== FALSE) { |
|
248 | - if (isset($this->Options[$o])) { |
|
246 | + foreach ($urlParts as $key => $part){ |
|
247 | + if (strpos($part, "$")!==FALSE){ |
|
248 | + if (isset($this->Options[$o])){ |
|
249 | 249 | $urlParts[$key] = $this->Options[$o]; |
250 | 250 | $o++; |
251 | 251 | } |
252 | 252 | } |
253 | 253 | } |
254 | - $url = implode($urlParts,"/"); |
|
254 | + $url = implode($urlParts, "/"); |
|
255 | 255 | } |
256 | 256 | $url = $this->baseUrl.$url; |
257 | 257 | $this->setUrl($url); |
@@ -263,9 +263,9 @@ discard block |
||
263 | 263 | * @throws InvalidURLException |
264 | 264 | */ |
265 | 265 | protected function verifyUrl(){ |
266 | - $UrlArray = explode("?",$this->Url); |
|
267 | - if (strpos($UrlArray[0],"$") !== FALSE){ |
|
268 | - throw new InvalidURLException(get_called_class(),"Configured URL is ".$this->Url); |
|
266 | + $UrlArray = explode("?", $this->Url); |
|
267 | + if (strpos($UrlArray[0], "$")!==FALSE){ |
|
268 | + throw new InvalidURLException(get_called_class(), "Configured URL is ".$this->Url); |
|
269 | 269 | } |
270 | 270 | return true; |
271 | 271 | } |
@@ -276,11 +276,11 @@ discard block |
||
276 | 276 | * @throws RequiredOptionsException |
277 | 277 | */ |
278 | 278 | protected function verifyOptions(){ |
279 | - $urlVarCount = substr_count($this->_URL,"$"); |
|
279 | + $urlVarCount = substr_count($this->_URL, "$"); |
|
280 | 280 | $optionCount = 0; |
281 | 281 | $optionCount += count($this->Options); |
282 | 282 | if ($urlVarCount!==$optionCount){ |
283 | - throw new RequiredOptionsException(get_called_class(),"URL requires $urlVarCount options."); |
|
283 | + throw new RequiredOptionsException(get_called_class(), "URL requires $urlVarCount options."); |
|
284 | 284 | } |
285 | 285 | return true; |
286 | 286 | } |
@@ -291,20 +291,20 @@ discard block |
||
291 | 291 | * @throws RequiredDataException |
292 | 292 | */ |
293 | 293 | protected function verifyData(){ |
294 | - if (isset($this->_DATA_TYPE)||!empty($this->_DATA_TYPE)) { |
|
295 | - if (gettype($this->Data) !== $this->_DATA_TYPE) { |
|
296 | - throw new RequiredDataException(get_called_class(),"Valid DataType is {$this->_DATA_TYPE}"); |
|
294 | + if (isset($this->_DATA_TYPE) || !empty($this->_DATA_TYPE)){ |
|
295 | + if (gettype($this->Data)!==$this->_DATA_TYPE){ |
|
296 | + throw new RequiredDataException(get_called_class(), "Valid DataType is {$this->_DATA_TYPE}"); |
|
297 | 297 | } |
298 | 298 | } |
299 | 299 | if (!empty($this->_REQUIRED_DATA)){ |
300 | 300 | $errors = array(); |
301 | - foreach($this->_REQUIRED_DATA as $property => $defaultValue){ |
|
301 | + foreach ($this->_REQUIRED_DATA as $property => $defaultValue){ |
|
302 | 302 | if (!isset($this->Data[$property])){ |
303 | 303 | $errors[] = $property; |
304 | 304 | } |
305 | 305 | } |
306 | 306 | if (count($errors)>0){ |
307 | - throw new RequiredDataException(get_called_class(),"Missing data for $errors"); |
|
307 | + throw new RequiredDataException(get_called_class(), "Missing data for $errors"); |
|
308 | 308 | } |
309 | 309 | } |
310 | 310 | return true; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | * @return bool |
316 | 316 | */ |
317 | 317 | protected function requiresOptions(){ |
318 | - return strpos($this->_URL,"$") !== FALSE?TRUE:FALSE; |
|
318 | + return strpos($this->_URL, "$")!==FALSE?TRUE:FALSE; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | } |
322 | 322 | \ No newline at end of file |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | public function __construct($url,$options = array()){ |
98 | 98 | $this->baseUrl = $url; |
99 | 99 | |
100 | - if (!empty($options)) { |
|
100 | + if (!empty($options)){ |
|
101 | 101 | $this->setOptions($options); |
102 | - }elseif(!$this->requiresOptions()){ |
|
102 | + } elseif(!$this->requiresOptions()){ |
|
103 | 103 | $this->configureURL(); |
104 | 104 | } |
105 | 105 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function setData($data){ |
123 | 123 | $this->Data = $data; |
124 | - if ($this->verifyData()) { |
|
124 | + if ($this->verifyData()){ |
|
125 | 125 | $this->Request->setBody($data); |
126 | 126 | } |
127 | 127 | return $this; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | /** |
131 | 131 | * @inheritdoc |
132 | 132 | */ |
133 | - public function setAuth($accessToken) { |
|
133 | + public function setAuth($accessToken){ |
|
134 | 134 | if ($this->authRequired()){ |
135 | 135 | $this->accessToken = $accessToken; |
136 | 136 | $this->Request->addHeader('OAuth-Token', $accessToken); |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | * @inheritdoc |
143 | 143 | * @throws InvalidURLException - When passed in URL contains $variables |
144 | 144 | */ |
145 | - public function setUrl($url) { |
|
145 | + public function setUrl($url){ |
|
146 | 146 | $this->Url = $url; |
147 | - if ($this->verifyUrl()) { |
|
147 | + if ($this->verifyUrl()){ |
|
148 | 148 | $this->Request->setURL($this->Url); |
149 | 149 | } |
150 | 150 | return $this; |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | /** |
154 | 154 | * @inheritdoc |
155 | 155 | */ |
156 | - public function setRequest(RequestInterface $Request) { |
|
156 | + public function setRequest(RequestInterface $Request){ |
|
157 | 157 | $this->Request = $Request; |
158 | 158 | return $this; |
159 | 159 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | /** |
162 | 162 | * @inheritdoc |
163 | 163 | */ |
164 | - public function setResponse(ResponseInterface $Response) { |
|
164 | + public function setResponse(ResponseInterface $Response){ |
|
165 | 165 | $this->Response = $Response; |
166 | 166 | return $this; |
167 | 167 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | /** |
170 | 170 | * @inheritdoc |
171 | 171 | */ |
172 | - public function getModule() { |
|
172 | + public function getModule(){ |
|
173 | 173 | return $this->Module; |
174 | 174 | } |
175 | 175 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | /** |
216 | 216 | * @inheritdoc |
217 | 217 | */ |
218 | - public function authRequired() { |
|
218 | + public function authRequired(){ |
|
219 | 219 | return $this->_AUTH_REQUIRED; |
220 | 220 | } |
221 | 221 | |
@@ -240,12 +240,12 @@ discard block |
||
240 | 240 | */ |
241 | 241 | protected function configureURL(){ |
242 | 242 | $url = $this->_URL; |
243 | - if ($this->requiresOptions()) { |
|
243 | + if ($this->requiresOptions()){ |
|
244 | 244 | $urlParts = explode("/", $this->_URL); |
245 | 245 | $o = 0; |
246 | - foreach ($urlParts as $key => $part) { |
|
247 | - if (strpos($part, "$") !== FALSE) { |
|
248 | - if (isset($this->Options[$o])) { |
|
246 | + foreach ($urlParts as $key => $part){ |
|
247 | + if (strpos($part, "$") !== FALSE){ |
|
248 | + if (isset($this->Options[$o])){ |
|
249 | 249 | $urlParts[$key] = $this->Options[$o]; |
250 | 250 | $o++; |
251 | 251 | } |
@@ -291,8 +291,8 @@ discard block |
||
291 | 291 | * @throws RequiredDataException |
292 | 292 | */ |
293 | 293 | protected function verifyData(){ |
294 | - if (isset($this->_DATA_TYPE)||!empty($this->_DATA_TYPE)) { |
|
295 | - if (gettype($this->Data) !== $this->_DATA_TYPE) { |
|
294 | + if (isset($this->_DATA_TYPE)||!empty($this->_DATA_TYPE)){ |
|
295 | + if (gettype($this->Data) !== $this->_DATA_TYPE){ |
|
296 | 296 | throw new RequiredDataException(get_called_class(),"Valid DataType is {$this->_DATA_TYPE}"); |
297 | 297 | } |
298 | 298 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * Whether or not Authentication is Required |
17 | 17 | * @var bool |
18 | 18 | */ |
19 | - protected $_AUTH_REQUIRED = true; |
|
19 | + protected $_AUTH_REQUIRED = TRUE; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * The URL for the EntryPoint |
@@ -204,8 +204,8 @@ discard block |
||
204 | 204 | /** |
205 | 205 | * @inheritdoc |
206 | 206 | */ |
207 | - public function execute($data = null){ |
|
208 | - if ($data!==null){ |
|
207 | + public function execute($data = NULL){ |
|
208 | + if ($data!==NULL){ |
|
209 | 209 | $this->configureData($data); |
210 | 210 | } |
211 | 211 | $this->Request->send(); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | if (strpos($UrlArray[0],"$") !== FALSE){ |
268 | 268 | throw new InvalidURLException(get_called_class(),"Configured URL is ".$this->Url); |
269 | 269 | } |
270 | - return true; |
|
270 | + return TRUE; |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | if ($urlVarCount!==$optionCount){ |
283 | 283 | throw new RequiredOptionsException(get_called_class(),"URL requires $urlVarCount options."); |
284 | 284 | } |
285 | - return true; |
|
285 | + return TRUE; |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | /** |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | throw new RequiredDataException(get_called_class(),"Missing data for $errors"); |
308 | 308 | } |
309 | 309 | } |
310 | - return true; |
|
310 | + return TRUE; |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
@@ -14,14 +14,14 @@ |
||
14 | 14 | */ |
15 | 15 | protected $downloadDir = null; |
16 | 16 | |
17 | - public function __construct($url, array $options = array()) { |
|
17 | + public function __construct($url, array $options = array()){ |
|
18 | 18 | $this->setRequest(new GETFile()); |
19 | 19 | parent::__construct($url, $options); |
20 | 20 | } |
21 | 21 | |
22 | - public function execute($data = null) { |
|
22 | + public function execute($data = null){ |
|
23 | 23 | parent::execute($data); |
24 | - $this->setResponse(new FileResponse($this->Request->getResponse(),$this->Request->getCurlObject(),$this->downloadDir)); |
|
24 | + $this->setResponse(new FileResponse($this->Request->getResponse(), $this->Request->getCurlObject(), $this->downloadDir)); |
|
25 | 25 | return $this; |
26 | 26 | } |
27 | 27 |
@@ -12,14 +12,14 @@ |
||
12 | 12 | * The directory in which to download the File |
13 | 13 | * @var string |
14 | 14 | */ |
15 | - protected $downloadDir = null; |
|
15 | + protected $downloadDir = NULL; |
|
16 | 16 | |
17 | 17 | public function __construct($url, array $options = array()) { |
18 | 18 | $this->setRequest(new GETFile()); |
19 | 19 | parent::__construct($url, $options); |
20 | 20 | } |
21 | 21 | |
22 | - public function execute($data = null) { |
|
22 | + public function execute($data = NULL) { |
|
23 | 23 | parent::execute($data); |
24 | 24 | $this->setResponse(new FileResponse($this->Request->getResponse(),$this->Request->getCurlObject(),$this->downloadDir)); |
25 | 25 | return $this; |
@@ -8,12 +8,12 @@ |
||
8 | 8 | |
9 | 9 | abstract class AbstractPostFileEntryPoint extends AbstractEntryPoint { |
10 | 10 | |
11 | - public function __construct($url, array $options = array()) { |
|
11 | + public function __construct($url, array $options = array()){ |
|
12 | 12 | $this->setRequest(new POSTFile()); |
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = null){ |
|
17 | 17 | parent::execute($data); |
18 | 18 | $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
19 | 19 | return $this; |
@@ -8,14 +8,14 @@ |
||
8 | 8 | |
9 | 9 | abstract class AbstractPostFileEntryPoint extends AbstractEntryPoint { |
10 | 10 | |
11 | - public function __construct($url, array $options = array()) { |
|
11 | + public function __construct($url, array $options = array()){ |
|
12 | 12 | $this->setRequest(new POSTFile()); |
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = null){ |
|
17 | 17 | parent::execute($data); |
18 | - $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
|
18 | + $this->setResponse(new JSON($this->Request->getResponse(), $this->Request->getCurlObject())); |
|
19 | 19 | return $this; |
20 | 20 | } |
21 | 21 |
@@ -8,12 +8,12 @@ |
||
8 | 8 | |
9 | 9 | abstract class AbstractPostFileEntryPoint extends AbstractEntryPoint { |
10 | 10 | |
11 | - public function __construct($url, array $options = array()) { |
|
11 | + public function __construct($url, array $options = array()){ |
|
12 | 12 | $this->setRequest(new POSTFile()); |
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = null){ |
|
17 | 17 | parent::execute($data); |
18 | 18 | $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
19 | 19 | return $this; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = NULL) { |
|
17 | 17 | parent::execute($data); |
18 | 18 | $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
19 | 19 | return $this; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $data[$fileField] = $this->setFileFieldValue($data[$fileField]); |
48 | 48 | }else{ |
49 | 49 | foreach ($this->Data as $key => $value){ |
50 | - if (!array_key_exists($key,$this->_REQUIRED_DATA)){ |
|
50 | + if (!array_key_exists($key, $this->_REQUIRED_DATA)){ |
|
51 | 51 | $data[$key] = $this->setFileFieldValue($value); |
52 | 52 | } |
53 | 53 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | protected function configureData($data){ |
35 | 35 | if (!empty($this->Options)){ |
36 | 36 | $fileField = end($this->Options); |
37 | - }else{ |
|
37 | + } else{ |
|
38 | 38 | throw new RequiredOptionsException(get_called_class()); |
39 | 39 | } |
40 | 40 | if (is_string($data) && isset($fileField)){ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | if (is_array($data)){ |
46 | 46 | if (isset($fileField)){ |
47 | 47 | $data[$fileField] = $this->setFileFieldValue($data[$fileField]); |
48 | - }else{ |
|
48 | + } else{ |
|
49 | 49 | foreach ($this->Data as $key => $value){ |
50 | 50 | if (!array_key_exists($key,$this->_REQUIRED_DATA)){ |
51 | 51 | $data[$key] = $this->setFileFieldValue($value); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | protected $_REQUIRED_DATA = array( |
24 | 24 | 'format' => 'sugar-html-json', |
25 | - 'delete_if_fails' => false |
|
25 | + 'delete_if_fails' => FALSE |
|
26 | 26 | ); |
27 | 27 | |
28 | 28 | /** |