@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @throws Exceptions\RessourceMandatoryFieldException |
| 76 | 76 | */ |
| 77 | 77 | public function post($bodyData, $query = array(), $ressourceId = null, |
| 78 | - $assoc = false, $contentType = 'json') |
|
| 78 | + $assoc = false, $contentType = 'json') |
|
| 79 | 79 | { |
| 80 | 80 | $ressourceName = $this->getRessourceName(); |
| 81 | 81 | ; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | * @return \Wabel\CertainAPI\CertainRessourceAbstract |
| 225 | 225 | */ |
| 226 | 226 | public function getWithEventCode($eventCode, $ressourceId, $params = array(), |
| 227 | - $assoc = false, $contentType = 'json') |
|
| 227 | + $assoc = false, $contentType = 'json') |
|
| 228 | 228 | { |
| 229 | 229 | $ressourceId = $eventCode.'/'.$ressourceId; |
| 230 | 230 | return $this->get($ressourceId, $params, $assoc, $contentType); |
@@ -241,8 +241,8 @@ discard block |
||
| 241 | 241 | * @return \Wabel\CertainAPI\CertainRessourceAbstract |
| 242 | 242 | */ |
| 243 | 243 | public function postWithEventCode($eventCode, $ressourceId, $bodyData, |
| 244 | - $query = array(), $assoc = false, |
|
| 245 | - $contentType = 'json') |
|
| 244 | + $query = array(), $assoc = false, |
|
| 245 | + $contentType = 'json') |
|
| 246 | 246 | { |
| 247 | 247 | $ressourceId = $eventCode.'/'.$ressourceId; |
| 248 | 248 | return $this->post($bodyData, $query, $ressourceId, $assoc, $contentType); |
@@ -259,8 +259,8 @@ discard block |
||
| 259 | 259 | * @return \Wabel\CertainAPI\CertainRessourceAbstract |
| 260 | 260 | */ |
| 261 | 261 | public function putWithEventCode($eventCode, $ressourceId, $bodyData, |
| 262 | - $query = array(), $assoc = false, |
|
| 263 | - $contentType = 'json') |
|
| 262 | + $query = array(), $assoc = false, |
|
| 263 | + $contentType = 'json') |
|
| 264 | 264 | { |
| 265 | 265 | $ressourceId = $eventCode.'/'.$ressourceId; |
| 266 | 266 | return $this->put($bodyData, $query, $ressourceId, $assoc, $contentType); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | if ($ressourceName == '' || is_null($ressourceName)) { |
| 83 | 83 | throw new Exceptions\RessourceException('No ressource name provided.'); |
| 84 | 84 | } |
| 85 | - if ($ressourceId === null && count($this->getMandatoryFields()) > 0) { |
|
| 85 | + if ($ressourceId === null && count($this->getMandatoryFields())>0) { |
|
| 86 | 86 | foreach ($this->getMandatoryFields() as $field) { |
| 87 | 87 | if (!in_array($field, array_keys($bodyData))) { |
| 88 | 88 | throw new Exceptions\RessourceMandatoryFieldException(sprintf('The field %s is required', |
@@ -115,14 +115,14 @@ discard block |
||
| 115 | 115 | if ($ressourceName == '' || is_null($ressourceName)) { |
| 116 | 116 | throw new Exceptions\RessourceException('No ressource name provided.'); |
| 117 | 117 | } |
| 118 | - if (!is_null($ressourceId) && count($this->getMandatoryFields()) > 0) { |
|
| 118 | + if (!is_null($ressourceId) && count($this->getMandatoryFields())>0) { |
|
| 119 | 119 | foreach ($this->getMandatoryFields() as $field) { |
| 120 | 120 | if (!in_array($field, array_keys($bodyData))) { |
| 121 | 121 | throw new Exceptions\RessourceMandatoryFieldException(sprintf('The field %s is required', |
| 122 | 122 | $field)); |
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | - } else { |
|
| 125 | + }else { |
|
| 126 | 126 | throw new Exceptions\RessourceMandatoryFieldException(sprintf('The id field is required')); |
| 127 | 127 | } |
| 128 | 128 | $this->results = $this->certainApiService->put($ressourceName, |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | foreach ($ressourceCalledParameters as $segmentKey => $segmentValue) { |
| 206 | 206 | if ($segmentValue != '') { |
| 207 | 207 | $this->ressourceCalled .= '/'.$segmentKey.'/'.$segmentValue; |
| 208 | - } else { |
|
| 208 | + }else { |
|
| 209 | 209 | $this->ressourceCalled .= '/'.$segmentKey; |
| 210 | 210 | } |
| 211 | 211 | } |