Passed
Pull Request — master (#244)
by Alex
03:59
created
src/POData/Configuration/IServiceConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
      *
104 104
      * @return int
105 105
      */
106
-    public function getEntitySetPageSize(ResourceSet $resourceSet): int ;
106
+    public function getEntitySetPageSize(ResourceSet $resourceSet): int;
107 107
 
108 108
     /**
109 109
      * Sets the maximum page size for an entity set resource.
Please login to merge, or discard this patch.
src/POData/BatchProcessor/BatchProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
     public function getResponse()
74 74
     {
75 75
         $response = '';
76
-        $splitter =  '--' . $this->batchBoundary . $this->getService()->getConfiguration()->getLineEndings();
76
+        $splitter = '--' . $this->batchBoundary . $this->getService()->getConfiguration()->getLineEndings();
77 77
         $raw      = $this->changeSetProcessors;
78 78
         foreach ($raw as $contentID => &$workingObject) {
79 79
             $response .= $splitter;
Please login to merge, or discard this patch.
src/POData/SimpleDataService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         return $config;
82 82
     }
83 83
 
84
-    public function initialize(IServiceConfiguration $config){
84
+    public function initialize(IServiceConfiguration $config) {
85 85
 
86 86
     }
87 87
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,8 @@
 block discarded – undo
81 81
         return $config;
82 82
     }
83 83
 
84
-    public function initialize(IServiceConfiguration $config){
84
+    public function initialize(IServiceConfiguration $config)
85
+    {
85 86
 
86 87
     }
87 88
 
Please login to merge, or discard this patch.
src/POData/Writers/Json/JsonWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      * @param string $eol         the line terminator character
39 39
      * @param bool   $prettyPrint if output should be well formatted.
40 40
      */
41
-    public function __construct($writer,  string $eol, bool $prettyPrint)
41
+    public function __construct($writer, string $eol, bool $prettyPrint)
42 42
     {
43 43
         $this->writer = new IndentedTextWriter($writer, $eol, $prettyPrint);
44 44
     }
Please login to merge, or discard this patch.
src/POData/BatchProcessor/ChangeSetParser.php 1 patch
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     protected $changeSetBoundary;
21 21
     protected $rawRequests = [];
22 22
     protected $service;
23
-    protected $contentIDToLocationLookup =[];
23
+    protected $contentIDToLocationLookup = [];
24 24
 
25 25
     /**
26 26
      * ChangeSetParser constructor.
@@ -77,8 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $response = '';
79 79
         $splitter = false === $this->changeSetBoundary ?
80
-            '' :
81
-            '--' . $this->changeSetBoundary . $this->getService()->getConfiguration()->getLineEndings();
80
+            '' : '--' . $this->changeSetBoundary . $this->getService()->getConfiguration()->getLineEndings();
82 81
         $raw      = $this->getRawRequests();
83 82
         foreach ($raw as $contentID => &$workingObject) {
84 83
             $headers = $workingObject->Response->getHeaders();
@@ -100,16 +99,14 @@  discard block
 block discarded – undo
100 99
         }
101 100
         $response .= trim($splitter);
102 101
         $response .= false === $this->changeSetBoundary ?
103
-            $this->getService()->getConfiguration()->getLineEndings() :
104
-            '--' . $this->getService()->getConfiguration()->getLineEndings();
102
+            $this->getService()->getConfiguration()->getLineEndings() : '--' . $this->getService()->getConfiguration()->getLineEndings();
105 103
         $response = 'Content-Length: ' .
106 104
             strlen($response) .
107 105
             $this->getService()->getConfiguration()->getLineEndings() .
108 106
             $this->getService()->getConfiguration()->getLineEndings() .
109 107
             $response;
110 108
         $response = false === $this->changeSetBoundary ?
111
-            $response :
112
-            'Content-Type: multipart/mixed; boundary=' .
109
+            $response : 'Content-Type: multipart/mixed; boundary=' .
113 110
             $this->changeSetBoundary .
114 111
             $this->getService()->getConfiguration()->getLineEndings() .
115 112
             $response;
@@ -121,7 +118,7 @@  discard block
 block discarded – undo
121 118
      */
122 119
     public function handleData()
123 120
     {
124
-        $firstLine               = trim(strtok($this->getData(), $this->getService()->getConfiguration()->getLineEndings()));// with trim matches both crlf and lf
121
+        $firstLine               = trim(strtok($this->getData(), $this->getService()->getConfiguration()->getLineEndings())); // with trim matches both crlf and lf
125 122
         $this->changeSetBoundary = substr($firstLine, 40);
126 123
 
127 124
         $prefix  = 'HTTP_';
@@ -197,7 +194,7 @@  discard block
 block discarded – undo
197 194
                 $contentIDinit--;
198 195
             }
199 196
 
200
-            $this->rawRequests[$contentID] = (object)[
197
+            $this->rawRequests[$contentID] = (object) [
201 198
                 'RequestVerb' => $requestPathParts[0],
202 199
                 'RequestURL' => $requestPathParts[1],
203 200
                 'ServerParams' => $serverParts,
Please login to merge, or discard this patch.
src/POData/BaseService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -400,16 +400,16 @@  discard block
 block discarded – undo
400 400
 
401 401
         //We always register the v1 stuff
402 402
         $registry->register(new JsonODataV1Writer($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput()));
403
-        $registry->register(new AtomODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),$serviceURI));
403
+        $registry->register(new AtomODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), $serviceURI));
404 404
 
405 405
         if (-1 < $serviceVersion->compare(Version::v2())) {
406 406
             $registry->register(new JsonODataV2Writer($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput()));
407 407
         }
408 408
 
409 409
         if (-1 < $serviceVersion->compare(Version::v3())) {
410
-            $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),JsonLightMetadataLevel::NONE(), $serviceURI));
411
-            $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),JsonLightMetadataLevel::MINIMAL(), $serviceURI));
412
-            $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),JsonLightMetadataLevel::FULL(), $serviceURI));
410
+            $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), JsonLightMetadataLevel::NONE(), $serviceURI));
411
+            $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), JsonLightMetadataLevel::MINIMAL(), $serviceURI));
412
+            $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), JsonLightMetadataLevel::FULL(), $serviceURI));
413 413
         }
414 414
     }
415 415
 
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 
660 660
         //The response format can be dictated by the target resource kind. IE a $value will be different then expected
661 661
         //getTargetKind doesn't deal with link resources directly and this can change things
662
-        $targetKind         = $request->isLinkUri() ? TargetKind::LINK() : $request->getTargetKind();
662
+        $targetKind = $request->isLinkUri() ? TargetKind::LINK() : $request->getTargetKind();
663 663
 
664 664
         switch ($targetKind) {
665 665
             case TargetKind::METADATA():
Please login to merge, or discard this patch.