0668b320 by fehrlich

minor format

1 parent bf7ec52f
...@@ -182,7 +182,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -182,7 +182,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
182 { 182 {
183 $domain = $this->getDomain(); 183 $domain = $this->getDomain();
184 184
185 return 'https://rest.'.$domain.'/restapi/'; 185 return 'https://rest.' . $domain . '/restapi/';
186 } 186 }
187 187
188 /** 188 /**
...@@ -266,7 +266,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -266,7 +266,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
266 throw new InvalidResponse('Could not parse the requested request token'); 266 throw new InvalidResponse('Could not parse the requested request token');
267 } 267 }
268 $this->saveRequestToken($body['oauth_token'], $body['oauth_token_secret']); 268 $this->saveRequestToken($body['oauth_token'], $body['oauth_token_secret']);
269 header('Location: '.$this->getBaseUrl().'security/oauth/confirm_access?oauth_token='.$body['oauth_token']); 269 header('Location: ' . $this->getBaseUrl() . 'security/oauth/confirm_access?oauth_token=' . $body['oauth_token']);
270 exit(); 270 exit();
271 } 271 }
272 272
...@@ -369,7 +369,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -369,7 +369,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
369 } 369 }
370 $path = str_replace('{user}', $this->user, $path); 370 $path = str_replace('{user}', $this->user, $path);
371 371
372 return $url.$path; 372 return $url . $path;
373 } 373 }
374 374
375 /** 375 /**
...@@ -521,7 +521,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -521,7 +521,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
521 $msgs = $this->parseMessages($res); 521 $msgs = $this->parseMessages($res);
522 if (!isset($msgs['parsed'][$expectedResponse])) { 522 if (!isset($msgs['parsed'][$expectedResponse])) {
523 $code = isset($msgs['parsed']['ERROR_RESOURCE_NOT_FOUND']) ? 404 : null; 523 $code = isset($msgs['parsed']['ERROR_RESOURCE_NOT_FOUND']) ? 404 : null;
524 throw new InvalidResponse('Did not get expected response: '.$res->getBody(), $code, null, $res, $msgs); 524 throw new InvalidResponse('Did not get expected response: ' . $res->getBody(), $code, null, $res, $msgs);
525 } 525 }
526 if ($expectedResponse == 'MESSAGE_RESOURCE_CREATED') { 526 if ($expectedResponse == 'MESSAGE_RESOURCE_CREATED') {
527 return $msgs['parsed'][$expectedResponse][0]; 527 return $msgs['parsed'][$expectedResponse][0];
...@@ -588,7 +588,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -588,7 +588,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
588 */ 588 */
589 public function updateRealEstate($id, $obj) 589 public function updateRealEstate($id, $obj)
590 { 590 {
591 $res = $this->callUserMethod('realestate/'.$id.'?usenewenergysourceenev2014values=true', 'PUT', $obj); 591 $res = $this->callUserMethod('realestate/' . $id . '?usenewenergysourceenev2014values=true', 'PUT', $obj);
592 592
593 return $this->checkForResponseUpdated($res); 593 return $this->checkForResponseUpdated($res);
594 } 594 }
...@@ -603,7 +603,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -603,7 +603,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
603 */ 603 */
604 public function deleteAttachment($reId, $attachmentId) 604 public function deleteAttachment($reId, $attachmentId)
605 { 605 {
606 $res = $this->callUserMethod('realestate/'.$reId.'/attachment/'.$attachmentId, 'DELETE'); 606 $res = $this->callUserMethod('realestate/' . $reId . '/attachment/' . $attachmentId, 'DELETE');
607 607
608 return $this->checkForResponseDeleted($res); 608 return $this->checkForResponseDeleted($res);
609 } 609 }
...@@ -628,7 +628,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -628,7 +628,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
628 */ 628 */
629 public function createAttachment($objId, $attachmentData, $content, $mimeType = 'image/jpeg', $fileName = 'image.jpg') 629 public function createAttachment($objId, $attachmentData, $content, $mimeType = 'image/jpeg', $fileName = 'image.jpg')
630 { 630 {
631 $res = $this->callUserMethod('realestate/'.$objId.'/attachment/', 'POST', [ 631 $res = $this->callUserMethod('realestate/' . $objId . '/attachment/', 'POST', [
632 'multipart' => [ 632 'multipart' => [
633 [ 633 [
634 'Content-type' => 'application/json', 634 'Content-type' => 'application/json',
...@@ -657,7 +657,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -657,7 +657,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
657 */ 657 */
658 public function createSimpleAttachment($objId, $attachmentData) 658 public function createSimpleAttachment($objId, $attachmentData)
659 { 659 {
660 $res = $this->callUserMethod('realestate/'.$objId.'/attachment/', 'POST', $attachmentData); 660 $res = $this->callUserMethod('realestate/' . $objId . '/attachment/', 'POST', $attachmentData);
661 661
662 return $this->checkForResponseCreated($res); 662 return $this->checkForResponseCreated($res);
663 } 663 }
...@@ -673,7 +673,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -673,7 +673,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
673 */ 673 */
674 public function updateAttachment($objId, $id, $attachmentData) 674 public function updateAttachment($objId, $id, $attachmentData)
675 { 675 {
676 $res = $this->callUserMethod('realestate/'.$objId.'/attachment/'.$id, 'PUT', $attachmentData); 676 $res = $this->callUserMethod('realestate/' . $objId . '/attachment/' . $id, 'PUT', $attachmentData);
677 677
678 return $this->checkForResponseUpdated($res); 678 return $this->checkForResponseUpdated($res);
679 } 679 }
...@@ -688,7 +688,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -688,7 +688,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
688 */ 688 */
689 public function updateAttachmentOrder($objId, $orderArray) 689 public function updateAttachmentOrder($objId, $orderArray)
690 { 690 {
691 $res = $this->callUserMethod('realestate/'.$objId.'/attachment/attachmentsorder', 'PUT', [ 691 $res = $this->callUserMethod('realestate/' . $objId . '/attachment/attachmentsorder', 'PUT', [
692 'attachmentsorder.attachmentsorder' => [ 692 'attachmentsorder.attachmentsorder' => [
693 '@xmlns' => [ 693 '@xmlns' => [
694 'attachmentsorder' => 'http://rest.immobilienscout24.de/schema/attachmentsorder/1.0', 694 'attachmentsorder' => 'http://rest.immobilienscout24.de/schema/attachmentsorder/1.0',
...@@ -724,7 +724,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -724,7 +724,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
724 */ 724 */
725 public function delete($reId) 725 public function delete($reId)
726 { 726 {
727 $res = $this->callUserMethod('realestate/'.$reId, 'DELETE'); 727 $res = $this->callUserMethod('realestate/' . $reId, 'DELETE');
728 728
729 return $this->checkForResponseDeleted($res); 729 return $this->checkForResponseDeleted($res);
730 } 730 }
...@@ -759,7 +759,7 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -759,7 +759,7 @@ abstract class ImmoScoutAPI extends GuzzleClient
759 */ 759 */
760 public function unpublish($reId, $publishchannel = '10000') 760 public function unpublish($reId, $publishchannel = '10000')
761 { 761 {
762 $res = $this->callMethod('publish/'.$reId.'_'.$publishchannel, 'DELETE'); 762 $res = $this->callMethod('publish/' . $reId . '_' . $publishchannel, 'DELETE');
763 763
764 return $this->checkForResponseDeleted($res); 764 return $this->checkForResponseDeleted($res);
765 } 765 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!