@@ -103,7 +103,7 @@ |
||
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. |
@@ -73,7 +73,7 @@ |
||
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; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | protected $changeSetBoundary; |
20 | 20 | protected $rawRequests = []; |
21 | 21 | protected $service; |
22 | - protected $contentIDToLocationLookup =[]; |
|
22 | + protected $contentIDToLocationLookup = []; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * ChangeSetParser constructor. |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | { |
86 | 86 | $response = ''; |
87 | 87 | $splitter = false === $this->changeSetBoundary ? |
88 | - '' : |
|
89 | - '--' . $this->changeSetBoundary . $this->getService()->getConfiguration()->getLineEndings(); |
|
88 | + '' : '--' . $this->changeSetBoundary . $this->getService()->getConfiguration()->getLineEndings(); |
|
90 | 89 | $raw = $this->getRawRequests(); |
91 | 90 | foreach ($raw as $contentID => &$workingObject) { |
92 | 91 | $headers = $workingObject->Response->getHeaders(); |
@@ -108,16 +107,14 @@ discard block |
||
108 | 107 | } |
109 | 108 | $response .= trim($splitter); |
110 | 109 | $response .= false === $this->changeSetBoundary ? |
111 | - $this->getService()->getConfiguration()->getLineEndings() : |
|
112 | - '--' . $this->getService()->getConfiguration()->getLineEndings(); |
|
110 | + $this->getService()->getConfiguration()->getLineEndings() : '--' . $this->getService()->getConfiguration()->getLineEndings(); |
|
113 | 111 | $response = 'Content-Length: ' . |
114 | 112 | strlen($response) . |
115 | 113 | $this->getService()->getConfiguration()->getLineEndings() . |
116 | 114 | $this->getService()->getConfiguration()->getLineEndings() . |
117 | 115 | $response; |
118 | 116 | $response = false === $this->changeSetBoundary ? |
119 | - $response : |
|
120 | - 'Content-Type: multipart/mixed; boundary=' . |
|
117 | + $response : 'Content-Type: multipart/mixed; boundary=' . |
|
121 | 118 | $this->changeSetBoundary . |
122 | 119 | $this->getService()->getConfiguration()->getLineEndings() . |
123 | 120 | $response; |
@@ -129,7 +126,7 @@ discard block |
||
129 | 126 | */ |
130 | 127 | public function handleData() |
131 | 128 | { |
132 | - $firstLine = trim(strtok($this->getData(), $this->getService()->getConfiguration()->getLineEndings()));// with trim matches both crlf and lf |
|
129 | + $firstLine = trim(strtok($this->getData(), $this->getService()->getConfiguration()->getLineEndings())); // with trim matches both crlf and lf |
|
133 | 130 | $this->changeSetBoundary = substr($firstLine, 40); |
134 | 131 | |
135 | 132 | $prefix = 'HTTP_'; |
@@ -204,7 +201,7 @@ discard block |
||
204 | 201 | if ($contentIDinit == $contentID) { |
205 | 202 | $contentIDinit--; |
206 | 203 | } |
207 | - $this->rawRequests[$contentID] = (object)[ |
|
204 | + $this->rawRequests[$contentID] = (object) [ |
|
208 | 205 | 'RequestVerb' => $requestPathParts[0], |
209 | 206 | 'RequestURL' => $requestPathParts[1], |
210 | 207 | 'ServerParams' => $serverParts, |
@@ -81,7 +81,7 @@ |
||
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 |
@@ -81,7 +81,8 @@ |
||
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 |
@@ -395,16 +395,16 @@ |
||
395 | 395 | |
396 | 396 | //We always register the v1 stuff |
397 | 397 | $registry->register(new JsonODataV1Writer($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput())); |
398 | - $registry->register(new AtomODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),$serviceURI)); |
|
398 | + $registry->register(new AtomODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), $serviceURI)); |
|
399 | 399 | |
400 | 400 | if (-1 < $serviceVersion->compare(Version::v2())) { |
401 | 401 | $registry->register(new JsonODataV2Writer($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput())); |
402 | 402 | } |
403 | 403 | |
404 | 404 | if (-1 < $serviceVersion->compare(Version::v3())) { |
405 | - $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),JsonLightMetadataLevel::NONE(), $serviceURI)); |
|
406 | - $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),JsonLightMetadataLevel::MINIMAL(), $serviceURI)); |
|
407 | - $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(),JsonLightMetadataLevel::FULL(), $serviceURI)); |
|
405 | + $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), JsonLightMetadataLevel::NONE(), $serviceURI)); |
|
406 | + $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), JsonLightMetadataLevel::MINIMAL(), $serviceURI)); |
|
407 | + $registry->register(new JsonLightODataWriter($this->getConfiguration()->getLineEndings(), $this->getConfiguration()->getPrettyOutput(), JsonLightMetadataLevel::FULL(), $serviceURI)); |
|
408 | 408 | } |
409 | 409 | } |
410 | 410 |
@@ -38,7 +38,7 @@ |
||
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 | } |