@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Concatenation Url In Curl |
15 | - * @param $newParameters string |
|
15 | + * @param string $newParameters string |
|
16 | 16 | * @return $this |
17 | 17 | */ |
18 | 18 | protected function concatenationUrlCurl($newParameters) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
150 | - * @param $typeAction string |
|
150 | + * @param string $typeAction string |
|
151 | 151 | * @return Action |
152 | 152 | */ |
153 | 153 | public function setAction($typeAction) |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | /** |
194 | 194 | * Set collection for correct query |
195 | 195 | * @param string $collection |
196 | - * @return mixed |
|
196 | + * @return string |
|
197 | 197 | * @throws \Exception |
198 | 198 | */ |
199 | 199 | public function setCollection($collection) |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | return app()->make(ClientInterface::class); |
224 | 224 | } |
225 | 225 | /** |
226 | - * @param $action |
|
226 | + * @param string $action |
|
227 | 227 | * @return array |
228 | 228 | */ |
229 | 229 | private function splitAction($action) |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function loadConfiguration(SourceConfiguration $configuration) |
106 | 106 | { |
107 | - config()->set( $this->prefixConfiguration = $configuration->getName(), $configuration->get()); |
|
107 | + config()->set($this->prefixConfiguration = $configuration->getName(), $configuration->get()); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | public function setHandler($typeHandler = 'xml') |
135 | 135 | { |
136 | 136 | Assertion::keyIsset($this->handlers, $typeHandler); |
137 | - $this->currentHandler = app()->make( $this->handlers[$typeHandler] ); |
|
137 | + $this->currentHandler = app()->make($this->handlers[$typeHandler]); |
|
138 | 138 | return $this->currentHandler; |
139 | 139 | } |
140 | 140 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | { |
155 | 155 | Assertion::keyIsset($this->action, $typeAction); |
156 | 156 | |
157 | - $this->currentAction = app()->make( $this->action[$typeAction] ); |
|
157 | + $this->currentAction = app()->make($this->action[$typeAction]); |
|
158 | 158 | |
159 | 159 | return $this->currentAction; |
160 | 160 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | extract($this->splitAction($action)); |
172 | 172 | |
173 | - $action = $this->setAction($action); |
|
173 | + $action = $this->setAction($action); |
|
174 | 174 | $this->setHandler($handler); |
175 | 175 | |
176 | 176 | $action->injectionKernel($this); |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | { |
201 | 201 | try { |
202 | 202 | Assertion::regex($collection, '/[A-z]+Collection$/'); |
203 | - } catch(AssertionFailedException $e) { |
|
204 | - throw new \Exception("Expected word 'Collection' in parameter method setCollection received : " . $e->getValue()); |
|
203 | + } catch (AssertionFailedException $e) { |
|
204 | + throw new \Exception("Expected word 'Collection' in parameter method setCollection received : ".$e->getValue()); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | return $this->collection = $collection; |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | |
233 | 233 | // verification values |
234 | 234 | Assertion::between(count($split), 2, 2); |
235 | - Assertion::keyExists( $this->action, $split[0]); |
|
236 | - Assertion::keyExists( $this->handlers, $split[1]); |
|
235 | + Assertion::keyExists($this->action, $split[0]); |
|
236 | + Assertion::keyExists($this->handlers, $split[1]); |
|
237 | 237 | |
238 | 238 | return ['action' => $split[0], 'handler' => $split[1]]; |
239 | 239 | } |
@@ -82,11 +82,11 @@ |
||
82 | 82 | private function query() |
83 | 83 | { |
84 | 84 | $parameters = str_replace(' ', '%20', $this->url); |
85 | - $url = $this->kernel->getCollection() . $parameters; |
|
86 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
85 | + $url = $this->kernel->getCollection().$parameters; |
|
86 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
87 | 87 | |
88 | 88 | try { |
89 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
89 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
90 | 90 | [ |
91 | 91 | 'headers' => [ |
92 | 92 | 'HTTP/1.0', |
@@ -65,11 +65,11 @@ |
||
65 | 65 | { |
66 | 66 | $parameters = str_replace(' ', '%20', $this->url); |
67 | 67 | |
68 | - $url = $this->kernel->getCollection() . $parameters; |
|
69 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
68 | + $url = $this->kernel->getCollection().$parameters; |
|
69 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
70 | 70 | |
71 | 71 | try { |
72 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
72 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
73 | 73 | [ |
74 | 74 | 'headers' => [ |
75 | 75 | 'HTTP/1.0', |
@@ -55,11 +55,11 @@ |
||
55 | 55 | { |
56 | 56 | $parameters = str_replace(' ', '%20', $this->url); |
57 | 57 | |
58 | - $url = $this->kernel->getCollection() . $parameters; |
|
59 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
58 | + $url = $this->kernel->getCollection().$parameters; |
|
59 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
60 | 60 | |
61 | 61 | try { |
62 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
62 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
63 | 63 | [ |
64 | 64 | 'headers' => [ |
65 | 65 | 'HTTP/1.0', |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function filterConstructor($strRequest) |
78 | 78 | { |
79 | - $ParameterQuery = '$filter='; |
|
80 | - $ParameterQuery.= $strRequest; |
|
79 | + $ParameterQuery = '$filter='; |
|
80 | + $ParameterQuery .= $strRequest; |
|
81 | 81 | $this->concatenationUrlCurl($ParameterQuery); |
82 | 82 | return $this; |
83 | 83 | } |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | public function orderBy($whatSort, $param = 'asc') |
95 | 95 | { |
96 | 96 | $ParameterQuery = '$orderby='; |
97 | - $ParameterQuery.= ucfirst($whatSort); |
|
97 | + $ParameterQuery .= ucfirst($whatSort); |
|
98 | 98 | |
99 | - if ( empty($param) === false ) { |
|
99 | + if (empty($param) === false) { |
|
100 | 100 | if ($param != 'desc' && $param != 'asc') { |
101 | 101 | throw new \Exception('no valid orderby parameters'); |
102 | 102 | } |
103 | - $ParameterQuery.= " ".$param; |
|
103 | + $ParameterQuery .= " ".$param; |
|
104 | 104 | } |
105 | 105 | $this->concatenationUrlCurl($ParameterQuery); |
106 | 106 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function amount($amountMax = null) |
133 | 133 | { |
134 | - Assert::that($amountMax,'You must specify a numeric parameter for the amount of the method')->integer(); |
|
134 | + Assert::that($amountMax, 'You must specify a numeric parameter for the amount of the method')->integer(); |
|
135 | 135 | $ParameterQuery = '$top='.$amountMax; |
136 | 136 | $this->concatenationUrlCurl($ParameterQuery); |
137 | 137 | return $this; |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | private function query() |
144 | 144 | { |
145 | 145 | $parameters = str_replace(' ', '%20', $this->url); |
146 | - $url = $this->kernel->getCollection() . $parameters; |
|
147 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
146 | + $url = $this->kernel->getCollection().$parameters; |
|
147 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
148 | 148 | |
149 | 149 | try { |
150 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
150 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
151 | 151 | [ |
152 | 152 | 'headers' => [ |
153 | 153 | 'HTTP/1.0', |