@@ -116,8 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | $response = ''; |
118 | 118 | $splitter = false === $this->changeSetBoundary ? |
119 | - '' : |
|
120 | - '--' . $this->changeSetBoundary . $ODataEOL; |
|
119 | + '' : '--' . $this->changeSetBoundary . $ODataEOL; |
|
121 | 120 | $raw = $this->getRawRequests(); |
122 | 121 | foreach ($raw as $contentID => &$workingObject) { |
123 | 122 | $headers = $workingObject->outgoingResponse()->getHeaders(); |
@@ -139,16 +138,14 @@ discard block |
||
139 | 138 | } |
140 | 139 | $response .= trim($splitter); |
141 | 140 | $response .= false === $this->changeSetBoundary ? |
142 | - $ODataEOL : |
|
143 | - '--' . $ODataEOL; |
|
141 | + $ODataEOL : '--' . $ODataEOL; |
|
144 | 142 | $response = 'Content-Length: ' . |
145 | 143 | strlen($response) . |
146 | 144 | $ODataEOL . |
147 | 145 | $ODataEOL . |
148 | 146 | $response; |
149 | 147 | $response = false === $this->changeSetBoundary ? |
150 | - $response : |
|
151 | - 'Content-Type: multipart/mixed; boundary=' . |
|
148 | + $response : 'Content-Type: multipart/mixed; boundary=' . |
|
152 | 149 | $this->changeSetBoundary . |
153 | 150 | $ODataEOL . |
154 | 151 | $response; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | $inboundRequestHeaders = $this->setupHeaders(strtok("\n")); |
22 | 22 | |
23 | - $RequestBody = trim($RequestBody); |
|
23 | + $RequestBody = trim($RequestBody); |
|
24 | 24 | |
25 | 25 | $host = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? $_SERVER['SERVER_ADDR'] ?? 'localhost'; |
26 | 26 | $protocol = $_SERVER['PROTOCOL'] = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http'; |
@@ -414,7 +414,7 @@ |
||
414 | 414 | |
415 | 415 | $textLen = strlen($text); |
416 | 416 | if ($textIndex >= $textLen || '.' != $text[$textIndex]) { |
417 | - return $qualityValue * 1000; |
|
417 | + return $qualityValue*1000; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | ++$textIndex; |
@@ -72,7 +72,7 @@ |
||
72 | 72 | return $this; |
73 | 73 | } |
74 | 74 | |
75 | - public function addPropertyContent($propertyContent){ |
|
75 | + public function addPropertyContent($propertyContent) { |
|
76 | 76 | $this->propertyContents[] = $propertyContent; |
77 | 77 | return $this; |
78 | 78 |
@@ -72,7 +72,8 @@ |
||
72 | 72 | return $this; |
73 | 73 | } |
74 | 74 | |
75 | - public function addPropertyContent($propertyContent){ |
|
75 | + public function addPropertyContent($propertyContent) |
|
76 | + { |
|
76 | 77 | $this->propertyContents[] = $propertyContent; |
77 | 78 | return $this; |
78 | 79 |
@@ -102,7 +102,7 @@ |
||
102 | 102 | public static function validateWithoutPrefix(string $value, &$outValue) |
103 | 103 | { |
104 | 104 | $length = strlen($value); |
105 | - if (0 == $length || 0 != $length % 2) { |
|
105 | + if (0 == $length || 0 != $length%2) { |
|
106 | 106 | return false; |
107 | 107 | } |
108 | 108 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $type1 = $end1->getResourceType(); |
67 | 67 | $type2 = $end2->getResourceType(); |
68 | 68 | |
69 | - if ($type1 === $type2 && $prop1 === $prop2) { |
|
69 | + if ($type1 === $type2 && $prop1 === $prop2) { |
|
70 | 70 | throw new InvalidArgumentException( |
71 | 71 | Messages::resourceAssociationSetSelfReferencingAssociationCannotBeBiDirectional() |
72 | 72 | ); |
@@ -9,11 +9,11 @@ |
||
9 | 9 | */ |
10 | 10 | class ODataLink |
11 | 11 | { |
12 | - /** |
|
13 | - * Name of the link. This becomes last segment of rel attribute value. |
|
14 | - * |
|
15 | - * @var string |
|
16 | - */ |
|
12 | + /** |
|
13 | + * Name of the link. This becomes last segment of rel attribute value. |
|
14 | + * |
|
15 | + * @var string |
|
16 | + */ |
|
17 | 17 | private $name; |
18 | 18 | /** |
19 | 19 | * Title of the link. This become value of title attribute. |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $relativeUri = $this->getRequest()->getIdentifier(); |
143 | 143 | $absoluteUri = $this->getRequest()->getRequestUrl()->getUrlAsString(); |
144 | 144 | |
145 | - $selfLink = new ODataLink('self', $title, null, $relativeUri); |
|
145 | + $selfLink = new ODataLink('self', $title, null, $relativeUri); |
|
146 | 146 | |
147 | 147 | $odata = new ODataFeed(); |
148 | 148 | $odata->title = new ODataTitle($title); |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE() == $propKind ? 'entry' : 'feed'; |
329 | 329 | $propType = 'application/atom+xml;type=' . $propTail; |
330 | 330 | $propName = $prop->getName(); |
331 | - $nuLink = new ODataLink( |
|
331 | + $nuLink = new ODataLink( |
|
332 | 332 | ODataConstants::ODATA_RELATED_NAMESPACE . $propName, |
333 | 333 | $propName, |
334 | 334 | $propType, |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | $odata->type = new ODataCategory($type); |
357 | 357 | $odata->propertyContent = $propertyContent; |
358 | 358 | $odata->isMediaLinkEntry = true === $resourceType->isMediaLinkEntry() ? true : null; |
359 | - $odata->editLink = new ODataLink('edit',$title, null, $relativeUri); |
|
359 | + $odata->editLink = new ODataLink('edit', $title, null, $relativeUri); |
|
360 | 360 | $odata->mediaLink = $mediaLink; |
361 | 361 | $odata->mediaLinks = $mediaLinks; |
362 | 362 | $odata->links = $links; |
@@ -743,7 +743,7 @@ discard block |
||
743 | 743 | return false; |
744 | 744 | } |
745 | 745 | |
746 | - return 0 == ($value % 4); |
|
746 | + return 0 == ($value%4); |
|
747 | 747 | } |
748 | 748 | |
749 | 749 | /** |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | ODataConstants::HTTPQUERY_STRING_EXPAND, |
874 | 874 | ODataConstants::HTTPQUERY_STRING_ORDERBY, |
875 | 875 | ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
876 | - ODataConstants::HTTPQUERY_STRING_SELECT,] as $queryOption) { |
|
876 | + ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
877 | 877 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption); |
878 | 878 | if (null !== $value) { |
879 | 879 | if (null !== $queryParameterString) { |