@@ -330,8 +330,8 @@ discard block |
||
330 | 330 | } |
331 | 331 | |
332 | 332 | $payload = $this->getRequest()->getData(); |
333 | - if($payload instanceof ODataURL){ |
|
334 | -try{ |
|
333 | + if($payload instanceof ODataURL) { |
|
334 | +try { |
|
335 | 335 | $this->executeGet(); |
336 | 336 | //dd($this->getRequest()->getSegments()[1]); |
337 | 337 | $masterModel = $this->getRequest()->getSegments()[0]->getResult(); |
@@ -353,12 +353,12 @@ discard block |
||
353 | 353 | $slaveModel = $newSegments[0]->getResult(); |
354 | 354 | $slaveResourceSet = $newSegments[0]->getTargetResourceSetWrapper(); |
355 | 355 | $linkAdded = $this->getProviders()->hookSingleModel($masterResourceSet, $masterModel, $slaveResourceSet, $slaveModel, $masterNavProperty); |
356 | - if($linkAdded){ |
|
356 | + if($linkAdded) { |
|
357 | 357 | $this->getService()->getHost()->setResponseStatusCode(HttpStatus::CODE_NOCONTENT); |
358 | - }else{ |
|
358 | + } else { |
|
359 | 359 | throw ODataException::createInternalServerError("AdapterInidicatedLinkNotAttached"); |
360 | 360 | } |
361 | -}catch(\Exception $e){ |
|
361 | +} catch(\Exception $e) { |
|
362 | 362 | dd($e); |
363 | 363 | } |
364 | 364 | foreach ($segments as $segment) { |
@@ -436,7 +436,7 @@ |
||
436 | 436 | if (null === $result->results && HTTPRequestMethod::POST() != $method && HTTPRequestMethod::DELETE() != $method) { |
437 | 437 | throw ODataException::createResourceNotFoundError($request->getIdentifier()); |
438 | 438 | } |
439 | - if(HTTPRequestMethod::POST() != $method && HTTPRequestMethod::DELETE() != $method){ |
|
439 | + if(HTTPRequestMethod::POST() != $method && HTTPRequestMethod::DELETE() != $method) { |
|
440 | 440 | $odataModelInstance = $objectModelSerializer->writeUrlElement($result); |
441 | 441 | } |
442 | 442 | } elseif (TargetKind::RESOURCE() == $requestTargetKind |