Completed
Pull Request — master (#182)
by Christopher
02:38
created
src/POData/UriProcessor/UriProcessorNew.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -330,8 +330,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/POData/BaseService.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.