@@ -194,10 +194,10 @@ public function __call($name, $arguments)
194194 //Get the array key for the action in the actions array
195195 foreach ($ actionMaps as $ httpMethod => $ actionArrayKey ) {
196196 $ actionKey = array_search ($ name , $ this ->$ actionArrayKey );
197- if ($ actionKey !== false ) break ;
197+ if ($ actionKey !== false ) break ;
198198 }
199199
200- if ($ actionKey === false ) {
200+ if ($ actionKey === false ) {
201201 throw new SdkException ("No action named $ name is defined for " . $ this ->getResourceName ());
202202 }
203203
@@ -233,7 +233,8 @@ public function __call($name, $arguments)
233233 *
234234 * @return string
235235 */
236- public function getResourceName () {
236+ public function getResourceName ()
237+ {
237238 return substr (get_called_class (), strrpos (get_called_class (), '\\' ) + 1 );
238239 }
239240
@@ -243,7 +244,8 @@ public function getResourceName() {
243244 *
244245 * @return string
245246 */
246- public function getResourcePostKey () {
247+ public function getResourcePostKey ()
248+ {
247249 return $ this ->resourceKey ;
248250 }
249251
@@ -253,7 +255,8 @@ public function getResourcePostKey() {
253255 *
254256 * @return string
255257 */
256- protected function pluralizeKey () {
258+ protected function pluralizeKey ()
259+ {
257260 return $ this ->resourceKey . 's ' ;
258261 }
259262
@@ -264,7 +267,8 @@ protected function pluralizeKey() {
264267 *
265268 * @return string
266269 */
267- protected function getResourcePath () {
270+ protected function getResourcePath ()
271+ {
268272 return $ this ->pluralizeKey ();
269273 }
270274
@@ -294,7 +298,7 @@ public function generateUrl($urlParams = array(), $customAction = null)
294298 public function get ($ urlParams = array (), $ url = null )
295299 {
296300
297- if (! $ url ) $ url = $ this ->generateUrl ($ urlParams );
301+ if (!$ url ) $ url = $ this ->generateUrl ($ urlParams );
298302
299303 $ this ->prepareRequest ();
300304
@@ -319,7 +323,7 @@ public function get($urlParams = array(), $url = null)
319323 public function getCount ($ urlParams = array (), $ url = null )
320324 {
321325
322- if (! $ url ) $ url = $ this ->generateUrl ($ urlParams , 'count ' );
326+ if (!$ url ) $ url = $ this ->generateUrl ($ urlParams , 'count ' );
323327
324328 $ this ->prepareRequest ();
325329
@@ -339,11 +343,11 @@ public function getCount($urlParams = array(), $url = null)
339343 */
340344 public function search ($ query )
341345 {
342- if (!$ this ->searchEnabled ) {
346+ if (!$ this ->searchEnabled ) {
343347 throw new SdkException ("Search is not available for " . $ this ->getResourceName ());
344348 }
345349
346- if (! is_array ($ query )) $ query = array ('query ' => $ query );
350+ if (!is_array ($ query )) $ query = array ('query ' => $ query );
347351
348352 $ url = $ this ->generateUrl ($ query , 'search ' );
349353
@@ -362,7 +366,7 @@ public function search($query)
362366 */
363367 public function post ($ dataArray , $ url = null )
364368 {
365- if (! $ url ) $ url = $ this ->generateUrl ();
369+ if (!$ url ) $ url = $ this ->generateUrl ();
366370
367371 $ this ->prepareRequest ($ dataArray );
368372
@@ -384,7 +388,7 @@ public function post($dataArray, $url = null)
384388 public function put ($ dataArray , $ url = null )
385389 {
386390
387- if (! $ url ) $ url = $ this ->generateUrl ();
391+ if (!$ url ) $ url = $ this ->generateUrl ();
388392
389393 $ this ->prepareRequest ($ dataArray );
390394
@@ -405,7 +409,7 @@ public function put($dataArray, $url = null)
405409 */
406410 public function delete ($ urlParams = array (), $ url = null )
407411 {
408- if (! $ url ) $ url = $ this ->generateUrl ($ urlParams );
412+ if (!$ url ) $ url = $ this ->generateUrl ($ urlParams );
409413
410414 $ this ->prepareRequest ();
411415
@@ -448,8 +452,9 @@ public function prepareRequest($dataArray = array())
448452 *
449453 * @return array
450454 */
451- protected function wrapData ($ dataArray , $ dataKey = null ) {
452- if (! $ dataKey ) $ dataKey = $ this ->getResourcePostKey ();
455+ protected function wrapData ($ dataArray , $ dataKey = null )
456+ {
457+ if (!$ dataKey ) $ dataKey = $ this ->getResourcePostKey ();
453458
454459 return array ($ dataKey => $ dataArray );
455460 }
@@ -507,7 +512,7 @@ public function processResponse($response, $dataKey = false)
507512 }
508513 }
509514
510- if (isset ($ responseArray ['errors ' ])) {
515+ if (isset ($ responseArray ['errors ' ])) {
511516 $ message = $ this ->castString ($ responseArray ['errors ' ]);
512517
513518 throw new ApiException ($ message );
0 commit comments