@@ -966,7 +966,7 @@ |
||
966 | 966 | } |
967 | 967 | /** |
968 | 968 | * @param ResourceSet $resourceSet The entity set containing the entity to fetch |
969 | - * @param object $sourceEntityInstance The source entity instance |
|
969 | + * @param KeyDescriptor $sourceEntityInstance The source entity instance |
|
970 | 970 | * @param object $data The New data for the entity instance. |
971 | 971 | * |
972 | 972 | * returns object|null returns the newly created model if sucessful or null if model creation failed. |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $resourceTypesInContainerNamespace = array(); |
99 | 99 | $containerNamespace = $this->providersWrapper->getContainerNamespace(); |
100 | 100 | foreach ($this->_metadataManager->getResourceTypesAlongWithNamespace() |
101 | - as $resourceTypeNamespace => $resourceTypesWithName) { |
|
101 | + as $resourceTypeNamespace => $resourceTypesWithName) { |
|
102 | 102 | if ($resourceTypeNamespace == $containerNamespace) { |
103 | 103 | foreach ($resourceTypesWithName as $resourceTypeName => $resourceType) { |
104 | 104 | $resourceTypesInContainerNamespace[] = $resourceType; |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | private function _writeProperties(ResourceType $resourceType, $associationTypesInResourceTypeNamespace) |
280 | 280 | { |
281 | 281 | foreach ($this->_metadataManager->getAllVisiblePropertiesDeclaredOnThisType($resourceType) |
282 | - as $resourceProperty) { |
|
282 | + as $resourceProperty) { |
|
283 | 283 | if ($resourceProperty->isKindOf(ResourcePropertyKind::BAG)) { |
284 | 284 | $this->_writeBagProperty($resourceProperty); |
285 | 285 | } elseif ($resourceProperty->isKindOf(ResourcePropertyKind::PRIMITIVE)) { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * Pushes a segment for the root of the tree |
171 | 171 | * Note: Calls to this method should be balanced with calls to popSegment. |
172 | 172 | * |
173 | - * @return bool true if the segment was pushed, false otherwise |
|
173 | + * @return boolean|null true if the segment was pushed, false otherwise |
|
174 | 174 | */ |
175 | 175 | private function pushSegmentForRoot() |
176 | 176 | { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * @param ResourceProperty &$resourceProperty Current navigation property |
190 | 190 | * being written out |
191 | 191 | * |
192 | - * @return bool true if a segment was pushed, false otherwise |
|
192 | + * @return boolean|null true if a segment was pushed, false otherwise |
|
193 | 193 | * |
194 | 194 | * @throws InvalidOperationException If this function invoked with non-navigation |
195 | 195 | * property instance |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | * @param ResourceSetWrapper &$resourceSetWrapper The resource set wrapper |
278 | 278 | * to push |
279 | 279 | * |
280 | - * @return bool true if the segment was push, false otherwise |
|
280 | + * @return boolean|null true if the segment was push, false otherwise |
|
281 | 281 | */ |
282 | 282 | private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
283 | 283 | { |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | } |
302 | 302 | |
303 | 303 | /** |
304 | - * @param $expandedProjectionNode |
|
304 | + * @param ExpandedProjectionNode $expandedProjectionNode |
|
305 | 305 | * @param $entry |
306 | 306 | * @return null|\object[] |
307 | 307 | */ |
@@ -327,10 +327,10 @@ discard block |
||
327 | 327 | } |
328 | 328 | |
329 | 329 | /** |
330 | - * @param $expandedProjectionNode |
|
330 | + * @param ExpandedProjectionNode $expandedProjectionNode |
|
331 | 331 | * @param $entry |
332 | - * @param $resourceType |
|
333 | - * @param $expandedPropertyName |
|
332 | + * @param \POData\Providers\Metadata\ResourceType $resourceType |
|
333 | + * @param string $expandedPropertyName |
|
334 | 334 | * @throws InvalidOperationException |
335 | 335 | * @throws \POData\Common\ODataException |
336 | 336 | */ |
@@ -360,9 +360,9 @@ discard block |
||
360 | 360 | /** |
361 | 361 | * @param $entry |
362 | 362 | * @param $result |
363 | - * @param $expandedProjectionNode |
|
364 | - * @param $resourceType |
|
365 | - * @param $expandedPropertyName |
|
363 | + * @param ExpandedProjectionNode $expandedProjectionNode |
|
364 | + * @param \POData\Providers\Metadata\ResourceType $resourceType |
|
365 | + * @param string $expandedPropertyName |
|
366 | 366 | * @throws InvalidOperationException |
367 | 367 | */ |
368 | 368 | private function executeCollectionExpansionProcessExpansion( |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | * @throws InvalidOperationException If this function invoked with non-navigation |
195 | 195 | * property instance |
196 | 196 | */ |
197 | - private function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty) |
|
197 | + private function pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty) |
|
198 | 198 | { |
199 | 199 | if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY) { |
200 | 200 | assert(!empty($this->getStack()->getSegmentNames()), '!is_empty($this->getStack()->getSegmentNames())'); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | * |
280 | 280 | * @return bool true if the segment was push, false otherwise |
281 | 281 | */ |
282 | - private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
282 | + private function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
283 | 283 | { |
284 | 284 | $this->getStack()->pushSegment($segmentName, $resourceSetWrapper); |
285 | 285 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | * |
51 | 51 | * @return bool true if the segment was push, false otherwise |
52 | 52 | */ |
53 | - public function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
53 | + public function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
54 | 54 | { |
55 | 55 | $rootProjectionNode = $this->getRequest()->getRootProjectionNode(); |
56 | 56 | if (!is_null($rootProjectionNode) && $rootProjectionNode->isExpansionSpecified()) { |
@@ -2,15 +2,10 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace POData\UriProcessor; |
4 | 4 | |
5 | -use Illuminate\Support\Str; |
|
6 | 5 | use POData\Providers\ProvidersWrapper; |
7 | 6 | use POData\Providers\Metadata\ResourcePropertyKind; |
8 | -use POData\Providers\Metadata\ResourceTypeKind; |
|
9 | -use POData\Providers\Metadata\ResourceSetWrapper; |
|
10 | -use POData\Providers\Metadata\ResourceProperty; |
|
11 | 7 | use POData\Providers\Query\QueryType; |
12 | 8 | use POData\UriProcessor\QueryProcessor\QueryProcessor; |
13 | -use POData\UriProcessor\QueryProcessor\ExpandProjectionParser\ExpandedProjectionNode; |
|
14 | 9 | use POData\UriProcessor\ResourcePathProcessor\ResourcePathProcessor; |
15 | 10 | use POData\UriProcessor\ResourcePathProcessor\SegmentParser\SegmentDescriptor; |
16 | 11 | use POData\UriProcessor\ResourcePathProcessor\SegmentParser\TargetKind; |
@@ -18,7 +13,6 @@ discard block |
||
18 | 13 | use POData\IService; |
19 | 14 | use POData\Common\Messages; |
20 | 15 | use POData\Common\ODataException; |
21 | -use POData\Common\InvalidOperationException; |
|
22 | 16 | use POData\Common\ODataConstants; |
23 | 17 | use POData\Providers\Query\QueryResult; |
24 | 18 | use POData\OperationContext\HTTPRequestMethod; |
@@ -382,7 +382,7 @@ |
||
382 | 382 | $segment->setResult($entityInstance); |
383 | 383 | } else { |
384 | 384 | $skip = (null == $this->getRequest()) ? 0 : $this->getRequest()->getSkipCount(); |
385 | - $skip = (null == $skip) ? 0 :$skip; |
|
385 | + $skip = (null == $skip) ? 0 : $skip; |
|
386 | 386 | $queryResult = $this->getProviders()->getResourceSet( |
387 | 387 | $this->getRequest()->queryType, |
388 | 388 | $segment->getTargetResourceSetWrapper(), |
@@ -91,7 +91,7 @@ |
||
91 | 91 | * |
92 | 92 | * @param string[] $ancestors Array of parent properties e.g. array('Orders', 'Customer', 'Customer_Demographics') |
93 | 93 | * |
94 | - * @return AnonymousFunction |
|
94 | + * @return \Closure |
|
95 | 95 | */ |
96 | 96 | public function buildComparisonFunction($ancestors) |
97 | 97 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $accessor2 = null; |
107 | 107 | $a = $this->_isAscending ? 1 : -1; |
108 | 108 | |
109 | - $retVal = function ($object1, $object2) use ($ancestors, $a) { |
|
109 | + $retVal = function($object1, $object2) use ($ancestors, $a) { |
|
110 | 110 | $accessor1 = $object1; |
111 | 111 | $accessor2 = $object2; |
112 | 112 | $flag1 = is_null($accessor1); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $flag2 |= is_null($accessor2); |
122 | 122 | } |
123 | 123 | $propertyName = $this->propertyName; |
124 | - $getter = 'get'.ucfirst($propertyName); |
|
124 | + $getter = 'get' . ucfirst($propertyName); |
|
125 | 125 | if (!is_null($accessor1)) { |
126 | 126 | $accessor1 = method_exists($accessor1, $getter) ? $accessor1->$getter() : $accessor1->$propertyName; |
127 | 127 | } |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | if ($flag1 && $flag2) { |
136 | 136 | return 0; |
137 | 137 | } elseif ($flag1) { |
138 | - return $a * -1; |
|
138 | + return $a*-1; |
|
139 | 139 | } elseif ($flag2) { |
140 | - return $a * 1; |
|
140 | + return $a*1; |
|
141 | 141 | } |
142 | 142 | $type = $this->resourceProperty->getInstanceType(); |
143 | 143 | $result = null; |
@@ -149,10 +149,10 @@ discard block |
||
149 | 149 | $result = strcmp($accessor1, $accessor2); |
150 | 150 | } else { |
151 | 151 | $delta = $accessor1 - $accessor2; |
152 | - $result = (0 == $delta) ? 0 : $delta / abs($delta); |
|
152 | + $result = (0 == $delta) ? 0 : $delta/abs($delta); |
|
153 | 153 | } |
154 | 154 | |
155 | - return $a * $result; |
|
155 | + return $a*$result; |
|
156 | 156 | }; |
157 | 157 | |
158 | 158 | return $retVal; |
@@ -406,7 +406,7 @@ |
||
406 | 406 | } else { |
407 | 407 | $code = null; |
408 | 408 | $funcList = $this->_comparisonFunctions; |
409 | - $BigFunc = function ($object1, $object2) use ($funcList) { |
|
409 | + $BigFunc = function($object1, $object2) use ($funcList) { |
|
410 | 410 | foreach ($funcList as $f) { |
411 | 411 | $ret = $f($object1, $object2); |
412 | 412 | if ($ret != 0) { |