@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function filterConstructor($strRequest) |
| 76 | 76 | { |
| 77 | - $ParameterQuery = '$filter='; |
|
| 78 | - $ParameterQuery.= $strRequest; |
|
| 77 | + $ParameterQuery = '$filter='; |
|
| 78 | + $ParameterQuery .= $strRequest; |
|
| 79 | 79 | $this->concatenationUrlCurl($ParameterQuery); |
| 80 | 80 | return $this; |
| 81 | 81 | } |
@@ -92,13 +92,13 @@ discard block |
||
| 92 | 92 | public function orderBy($whatSort, $param = 'asc') |
| 93 | 93 | { |
| 94 | 94 | $ParameterQuery = '$orderby='; |
| 95 | - $ParameterQuery.= ucfirst($whatSort); |
|
| 95 | + $ParameterQuery .= ucfirst($whatSort); |
|
| 96 | 96 | |
| 97 | - if ( empty($param) === false ) { |
|
| 97 | + if (empty($param) === false) { |
|
| 98 | 98 | if ($param != 'desc' && $param != 'asc') { |
| 99 | 99 | throw new \Exception('no valid orderby parameters'); |
| 100 | 100 | } |
| 101 | - $ParameterQuery.= " ".$param; |
|
| 101 | + $ParameterQuery .= " ".$param; |
|
| 102 | 102 | } |
| 103 | 103 | $this->concatenationUrlCurl($ParameterQuery); |
| 104 | 104 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function amount($amountMax = null) |
| 131 | 131 | { |
| 132 | - Assert::that($amountMax,'You must specify a numeric parameter for the amount of the method')->integer(); |
|
| 132 | + Assert::that($amountMax, 'You must specify a numeric parameter for the amount of the method')->integer(); |
|
| 133 | 133 | $ParameterQuery = '$top='.$amountMax; |
| 134 | 134 | $this->concatenationUrlCurl($ParameterQuery); |
| 135 | 135 | return $this; |
@@ -141,10 +141,10 @@ discard block |
||
| 141 | 141 | private function query() |
| 142 | 142 | { |
| 143 | 143 | $parameters = str_replace(' ', '%20', $this->url); |
| 144 | - $url = $this->kernel->getCollection() . $parameters; |
|
| 145 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
| 144 | + $url = $this->kernel->getCollection().$parameters; |
|
| 145 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
| 146 | 146 | |
| 147 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
| 147 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
| 148 | 148 | [ |
| 149 | 149 | 'headers' => [ |
| 150 | 150 | 'HTTP/1.0', |
@@ -157,11 +157,11 @@ discard block |
||
| 157 | 157 | ], |
| 158 | 158 | 'http_errors' => false |
| 159 | 159 | ]); |
| 160 | - $body = $response->getBody(); |
|
| 160 | + $body = $response->getBody(); |
|
| 161 | 161 | |
| 162 | 162 | $this->kernel->getHandler()->parse($body->getContents()); |
| 163 | 163 | |
| 164 | - if ( $response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized' ) |
|
| 164 | + if ($response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized') |
|
| 165 | 165 | { |
| 166 | 166 | $this->kernel->authentication(); |
| 167 | 167 | $this->query(); |