@@ -23,7 +23,7 @@ |
||
23 | 23 | switch ($this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, null)) { |
24 | 24 | case ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE: |
25 | 25 | case ODataConstants::ODATA_RELATED_NAMESPACE . |
26 | - $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_TITLE_ELELMET_NAME, ''): |
|
26 | + $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_TITLE_ELELMET_NAME, ''): |
|
27 | 27 | $object = ODataLink::class; |
28 | 28 | break; |
29 | 29 | case ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE: |
@@ -43,14 +43,14 @@ |
||
43 | 43 | public function handleStartNode($tagNamespace, $tagName, $attributes) |
44 | 44 | { |
45 | 45 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
46 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
46 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
47 | 47 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
48 | 48 | } |
49 | 49 | |
50 | 50 | public function handleEndNode($tagNamespace, $tagName) |
51 | 51 | { |
52 | 52 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
53 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
53 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
54 | 54 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
55 | 55 | } |
56 | 56 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public static function handleException(\Exception $exception, IService $service) |
26 | 26 | { |
27 | - $acceptTypesText = $service->getHost()->getRequestAccept() ?? ''; |
|
27 | + $acceptTypesText = $service->getHost()->getRequestAccept() ?? ''; |
|
28 | 28 | try { |
29 | 29 | $responseContentType = HttpProcessUtility::selectMimeType( |
30 | 30 | $acceptTypesText, |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function handleStartAtomLink($attributes) |
79 | 79 | { |
80 | - $rel = $this->arrayKeyOrDefault( |
|
80 | + $rel = $this->arrayKeyOrDefault( |
|
81 | 81 | $attributes, |
82 | 82 | ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, |
83 | 83 | '' |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | public function handleStartMetadataCount() |
96 | 96 | { |
97 | 97 | $this->enqueueEnd(function () { |
98 | - $this->oDataFeed->rowCount = (int)$this->popCharData(); |
|
98 | + $this->oDataFeed->rowCount = (int) $this->popCharData(); |
|
99 | 99 | }); |
100 | 100 | } |
101 | 101 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | if (strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
46 | 46 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
47 | 47 | ) { |
48 | - return ; |
|
48 | + return; |
|
49 | 49 | } |
50 | 50 | //TODO: this will need to be expanded with opengis namespaces as well when supported |
51 | 51 | assert($tagNamespace === ODataConstants::ODATA_NAMESPACE || |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
72 | 72 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
73 | 73 | ) { |
74 | - return ; |
|
74 | + return; |
|
75 | 75 | } |
76 | 76 | // Pops a complex object off the stack |
77 | 77 | $prop = $this->properties->pop(); |
@@ -561,8 +561,7 @@ |
||
561 | 561 | private function executeGetResourceRelated(SegmentDescriptor $segment, $eagerList) |
562 | 562 | { |
563 | 563 | $projectedProperty = $segment->getProjectedProperty(); |
564 | - $projectedPropertyKind = null !== $projectedProperty ? $projectedProperty->getKind() : |
|
565 | - new ResourcePropertyKind(0); |
|
564 | + $projectedPropertyKind = null !== $projectedProperty ? $projectedProperty->getKind() : new ResourcePropertyKind(0); |
|
566 | 565 | $queryResult = null; |
567 | 566 | switch ($projectedPropertyKind) { |
568 | 567 | case ResourcePropertyKind::RESOURCE_REFERENCE(): |
@@ -1114,6 +1114,6 @@ |
||
1114 | 1114 | return false; |
1115 | 1115 | } |
1116 | 1116 | |
1117 | - return 0 == ($value % 4); |
|
1117 | + return 0 == ($value%4); |
|
1118 | 1118 | } |
1119 | 1119 | } |
@@ -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. |
@@ -652,7 +652,7 @@ |
||
652 | 652 | |
653 | 653 | //The response format can be dictated by the target resource kind. IE a $value will be different then expected |
654 | 654 | //getTargetKind doesn't deal with link resources directly and this can change things |
655 | - $targetKind = $request->isLinkUri() ? TargetKind::LINK() : $request->getTargetKind(); |
|
655 | + $targetKind = $request->isLinkUri() ? TargetKind::LINK() : $request->getTargetKind(); |
|
656 | 656 | |
657 | 657 | switch ($targetKind) { |
658 | 658 | case TargetKind::METADATA(): |
@@ -20,7 +20,7 @@ discard block |
||
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. |
@@ -79,8 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | $response = ''; |
81 | 81 | $splitter = false === $this->changeSetBoundary ? |
82 | - '' : |
|
83 | - '--' . $this->changeSetBoundary . $ODataEOL; |
|
82 | + '' : '--' . $this->changeSetBoundary . $ODataEOL; |
|
84 | 83 | $raw = $this->getRawRequests(); |
85 | 84 | foreach ($raw as $contentID => &$workingObject) { |
86 | 85 | $headers = $workingObject->Response->getHeaders(); |
@@ -102,16 +101,14 @@ discard block |
||
102 | 101 | } |
103 | 102 | $response .= trim($splitter); |
104 | 103 | $response .= false === $this->changeSetBoundary ? |
105 | - $ODataEOL : |
|
106 | - '--' . $ODataEOL; |
|
104 | + $ODataEOL : '--' . $ODataEOL; |
|
107 | 105 | $response = 'Content-Length: ' . |
108 | 106 | strlen($response) . |
109 | 107 | $ODataEOL . |
110 | 108 | $ODataEOL . |
111 | 109 | $response; |
112 | 110 | $response = false === $this->changeSetBoundary ? |
113 | - $response : |
|
114 | - 'Content-Type: multipart/mixed; boundary=' . |
|
111 | + $response : 'Content-Type: multipart/mixed; boundary=' . |
|
115 | 112 | $this->changeSetBoundary . |
116 | 113 | $ODataEOL . |
117 | 114 | $response; |
@@ -125,7 +122,7 @@ discard block |
||
125 | 122 | { |
126 | 123 | $ODataEOL = $this->getService()->getConfiguration()->getLineEndings(); |
127 | 124 | |
128 | - $firstLine = trim(strtok($this->getData(), $ODataEOL));// with trim matches both crlf and lf |
|
125 | + $firstLine = trim(strtok($this->getData(), $ODataEOL)); // with trim matches both crlf and lf |
|
129 | 126 | $this->changeSetBoundary = substr($firstLine, 40); |
130 | 127 | |
131 | 128 | $prefix = 'HTTP_'; |
@@ -201,7 +198,7 @@ discard block |
||
201 | 198 | $contentIDinit--; |
202 | 199 | } |
203 | 200 | |
204 | - $this->rawRequests[$contentID] = (object)[ |
|
201 | + $this->rawRequests[$contentID] = (object) [ |
|
205 | 202 | 'RequestVerb' => $requestPathParts[0], |
206 | 203 | 'RequestURL' => $requestPathParts[1], |
207 | 204 | 'ServerParams' => $serverParts, |