Completed
Pull Request — master (#182)
by Christopher
02:38
created
src/POData/UriProcessor/UriProcessorNew.php 2 patches
Spacing   +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.
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 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@  discard block
 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
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
      */
684 684
     protected function compareETag(
685 685
         &$entryObject,
686
-        ResourceType &$resourceType,
686
+        ResourceType & $resourceType,
687 687
         &$needToSerializeResponse
688 688
     ) {
689 689
         $needToSerializeResponse = true;
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
      *                        for use in a URI) there are etag properties, NULL if
778 778
      *                        there is no etag property
779 779
      */
780
-    protected function getETagForEntry(&$entryObject, ResourceType &$resourceType)
780
+    protected function getETagForEntry(&$entryObject, ResourceType & $resourceType)
781 781
     {
782 782
         $eTag = null;
783 783
         $comma = null;
Please login to merge, or discard this 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.