@@ -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 | } |