@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | private function _getResourceAssociationSet(ResourceSetWrapper $resourceSet, ResourceType $resourceType, ResourceProperty $navigationProperty) |
| 246 | 246 | { |
| 247 | - $associationSetLookupKey = $resourceSet->getName().'_'.$resourceType->getFullName().'_'.$navigationProperty->getName(); |
|
| 247 | + $associationSetLookupKey = $resourceSet->getName() . '_' . $resourceType->getFullName() . '_' . $navigationProperty->getName(); |
|
| 248 | 248 | if (array_key_exists($associationSetLookupKey, $this->_resourceAssociationSets)) { |
| 249 | 249 | return $this->_resourceAssociationSets[$associationSetLookupKey]; |
| 250 | 250 | } |
@@ -283,9 +283,9 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | $reverseAssociationSetLookupKey = null; |
| 285 | 285 | if (!is_null($relatedEnd->getResourceProperty())) { |
| 286 | - $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName().'_'.$relatedEnd->getResourceProperty()->getResourceType()->getFullName().'_'.$relatedEnd->getResourceProperty()->getName(); |
|
| 286 | + $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName() . '_' . $relatedEnd->getResourceProperty()->getResourceType()->getFullName() . '_' . $relatedEnd->getResourceProperty()->getName(); |
|
| 287 | 287 | } else { |
| 288 | - $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName().'_Null_'.$resourceType->getFullName().'_'.$navigationProperty->getName(); |
|
| 288 | + $reverseAssociationSetLookupKey = $relatedEnd->getResourceSet()->getName() . '_Null_' . $resourceType->getFullName() . '_' . $navigationProperty->getName(); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | if (array_key_exists($reverseAssociationSetLookupKey, $this->_resourceAssociationSets)) { |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | { |
| 325 | 325 | $resourceTypeNamespace = $this->getResourceTypeNamespace($resourceType); |
| 326 | 326 | $resourceAssociationTypesInNamespace = &$this->getResourceAssociationTypesForNamespace($resourceTypeNamespace); |
| 327 | - $associationTypeLookupKey = $resourceType->getName().'_'.$navigationProperty->getName(); |
|
| 327 | + $associationTypeLookupKey = $resourceType->getName() . '_' . $navigationProperty->getName(); |
|
| 328 | 328 | if (array_key_exists($associationTypeLookupKey, $resourceAssociationTypesInNamespace)) { |
| 329 | 329 | return $resourceAssociationTypesInNamespace[$associationTypeLookupKey]; |
| 330 | 330 | } |
@@ -334,8 +334,8 @@ discard block |
||
| 334 | 334 | $associationTypeEnd1Name = $associationTypeEnd2Name = null; |
| 335 | 335 | $isBiDirectional = $resourceAssociationSet->isBidirectional(); |
| 336 | 336 | if ($isBiDirectional) { |
| 337 | - $associationTypeEnd1Name = $resourceAssociationSet->getEnd1()->getResourceType()->getName().'_'.$resourceAssociationSet->getEnd1()->getResourceProperty()->getName(); |
|
| 338 | - $associationTypeEnd2Name = $resourceAssociationSet->getEnd2()->getResourceType()->getName().'_'.$resourceAssociationSet->getEnd2()->getResourceProperty()->getName(); |
|
| 337 | + $associationTypeEnd1Name = $resourceAssociationSet->getEnd1()->getResourceType()->getName() . '_' . $resourceAssociationSet->getEnd1()->getResourceProperty()->getName(); |
|
| 338 | + $associationTypeEnd2Name = $resourceAssociationSet->getEnd2()->getResourceType()->getName() . '_' . $resourceAssociationSet->getEnd2()->getResourceProperty()->getName(); |
|
| 339 | 339 | } else { |
| 340 | 340 | if (!is_null($resourceAssociationSet->getEnd1()->getResourceProperty())) { |
| 341 | 341 | $associationTypeEnd1Name = $resourceAssociationSet->getEnd1()->getResourceType()->getName(); |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | $resourceAssociationTypesInNamespace[$associationTypeLookupKey] = $resourceAssociationType; |
| 371 | 371 | if ($isBiDirectional) { |
| 372 | 372 | $relatedAssociationSetEnd = $resourceAssociationSet->getRelatedResourceAssociationSetEnd($resourceSet->getResourceSet(), $resourceType, $navigationProperty); |
| 373 | - $relatedEndLookupKey = $relatedAssociationSetEnd->getResourceType()->getName().'_'.$relatedAssociationSetEnd->getResourceProperty()->getName(); |
|
| 373 | + $relatedEndLookupKey = $relatedAssociationSetEnd->getResourceType()->getName() . '_' . $relatedAssociationSetEnd->getResourceProperty()->getName(); |
|
| 374 | 374 | $resourceAssociationTypesInNamespace[$relatedEndLookupKey] = $resourceAssociationType; |
| 375 | 375 | } |
| 376 | 376 | |
@@ -394,10 +394,10 @@ discard block |
||
| 394 | 394 | $resourceAssociationSet->getEnd1() : $resourceAssociationSet->getEnd2(); |
| 395 | 395 | $end2 = $resourceAssociationSet->getRelatedResourceAssociationSetEnd($end1->getResourceSet(), $end1->getResourceType(), $end1->getResourceProperty()); |
| 396 | 396 | //e.g. Customer_Orders (w.r.t Northwind DB) |
| 397 | - $associationTypeName = $end1->getResourceType()->getName().'_'.$end1->getResourceProperty()->getName(); |
|
| 397 | + $associationTypeName = $end1->getResourceType()->getName() . '_' . $end1->getResourceProperty()->getName(); |
|
| 398 | 398 | if (!is_null($end2->getResourceProperty())) { |
| 399 | 399 | //Customer_Orders_Order_Customer |
| 400 | - $associationTypeName .= '_'.$end2->getResourceType()->getName().'_'.$end2->getResourceProperty()->getName(); |
|
| 400 | + $associationTypeName .= '_' . $end2->getResourceType()->getName() . '_' . $end2->getResourceProperty()->getName(); |
|
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | return $associationTypeName; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $resourceTypesInContainerNamespace = []; |
| 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)) { |
@@ -366,7 +366,7 @@ |
||
| 366 | 366 | */ |
| 367 | 367 | private function _writeNavigationProperty(ResourceType $resourceType, $associationTypesInResourceTypeNamespace, ResourceProperty $navigationProperty) |
| 368 | 368 | { |
| 369 | - $associationTypeLookupName = $resourceType->getName().'_'.$navigationProperty->getName(); |
|
| 369 | + $associationTypeLookupName = $resourceType->getName() . '_' . $navigationProperty->getName(); |
|
| 370 | 370 | if (!array_key_exists($associationTypeLookupName, $associationTypesInResourceTypeNamespace)) { |
| 371 | 371 | throw new InvalidOperationException(Messages::metadataWriterNoResourceAssociationSetForNavigationProperty($navigationProperty->getName(), $resourceType->getName())); |
| 372 | 372 | } |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | * edm schema version for the metadata |
| 213 | 213 | * @param EdmSchemaVersion $edmSchemaVersion |
| 214 | 214 | */ |
| 215 | - public function getDataServiceAndEdmSchemaVersions(Version &$dsVersion, &$edmSchemaVersion) |
|
| 215 | + public function getDataServiceAndEdmSchemaVersions(Version & $dsVersion, &$edmSchemaVersion) |
|
| 216 | 216 | { |
| 217 | 217 | if ($this->_metadataResourceTypeSet->hasNamedStreams()) { |
| 218 | 218 | $dsVersion->raiseVersion(3, 0); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $resourceType = $resourceProperty->getResourceType(); |
| 177 | 177 | $resourceTypeNamespace = $this->getResourceTypeNamespace($resourceType); |
| 178 | 178 | $resourceTypesInNamespace = $this->getResourceTypesForNamespace($resourceTypeNamespace); |
| 179 | - if (!array_key_exists($resourceTypeNamespace.'.'.$resourceType->getName(), $resourceTypesInNamespace)) { |
|
| 179 | + if (!array_key_exists($resourceTypeNamespace . '.' . $resourceType->getName(), $resourceTypesInNamespace)) { |
|
| 180 | 180 | continue; |
| 181 | 181 | } |
| 182 | 182 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | { |
| 238 | 238 | $resourceTypeNamespace = $this->getResourceTypeNamespace($resourceType); |
| 239 | 239 | $resourceTypesInNamespace = &$this->getResourceTypesForNamespace($resourceTypeNamespace); |
| 240 | - $resourceNameWithNamespace = $resourceTypeNamespace.'.'.$resourceType->getName(); |
|
| 240 | + $resourceNameWithNamespace = $resourceTypeNamespace . '.' . $resourceType->getName(); |
|
| 241 | 241 | if (!array_key_exists($resourceNameWithNamespace, $resourceTypesInNamespace)) { |
| 242 | 242 | if ($resourceType->isMediaLinkEntry()) { |
| 243 | 243 | $this->_hasVisibleMediaLinkEntry = true; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | $service->getHost()->setResponseStatusCode(HttpStatus::CODE_OK); |
| 80 | 80 | $service->getHost()->setResponseContentType($responseContentType); |
| 81 | - $service->getHost()->setResponseVersion($dataServiceVersion->toString().';'); |
|
| 81 | + $service->getHost()->setResponseVersion($dataServiceVersion->toString() . ';'); |
|
| 82 | 82 | $service->getHost()->setResponseCacheControl(ODataConstants::HTTPRESPONSE_HEADER_CACHECONTROL_NOCACHE); |
| 83 | 83 | $service->getHost()->getOperationContext()->outgoingResponse()->setStream($responseBody); |
| 84 | 84 | } |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | */ |
| 113 | 113 | public function toString() |
| 114 | 114 | { |
| 115 | - return $this->major.'.'.$this->minor; |
|
| 115 | + return $this->major . '.' . $this->minor; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | //Is there a better way to do static const of complex type? |
@@ -116,6 +116,6 @@ |
||
| 116 | 116 | */ |
| 117 | 117 | public static function expandProjectionParserPropertyWithoutMatchingExpand($propertyName) |
| 118 | 118 | { |
| 119 | - return 'Only navigation properties specified in expand option can be travered in select option,In order to treaverse the navigation property \''.$propertyName.'\', it should be first expanded'; |
|
| 119 | + return 'Only navigation properties specified in expand option can be travered in select option,In order to treaverse the navigation property \'' . $propertyName . '\', it should be first expanded'; |
|
| 120 | 120 | } |
| 121 | 121 | } |
@@ -57,6 +57,6 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public static function objectModelSerializerLoopsNotAllowedInComplexTypes($complexPropertyName) |
| 59 | 59 | { |
| 60 | - return 'A circular loop was detected while serializing the property \''.$complexPropertyName.'\'. You must make sure that loops are not present in properties that return a bag or complex type.'; |
|
| 60 | + return 'A circular loop was detected while serializing the property \'' . $complexPropertyName . '\'. You must make sure that loops are not present in properties that return a bag or complex type.'; |
|
| 61 | 61 | } |
| 62 | 62 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public static function providersWrapperIDSQPMethodReturnsUnExpectedType($entityTypeName, $methodName) |
| 113 | 113 | { |
| 114 | - return 'The implementation of the method '.$methodName.' must return an instance of type described by resource set\'s type('.$entityTypeName.') or null if resource does not exist.'; |
|
| 114 | + return 'The implementation of the method ' . $methodName . ' must return an instance of type described by resource set\'s type(' . $entityTypeName . ') or null if resource does not exist.'; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public static function providersWrapperIDSQPMethodReturnsInstanceWithNullKeyProperties($methodName) |
| 126 | 126 | { |
| 127 | - return 'The '.$methodName.' implementation returns an entity with null key propert(y|ies).'; |
|
| 127 | + return 'The ' . $methodName . ' implementation returns an entity with null key propert(y|ies).'; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
@@ -138,6 +138,6 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public static function providersWrapperIDSQPMethodReturnsInstanceWithNonMatchingKeys($methodName) |
| 140 | 140 | { |
| 141 | - return 'The '.$methodName.' implementation returns an instance with non-matching key'; |
|
| 141 | + return 'The ' . $methodName . ' implementation returns an instance with non-matching key'; |
|
| 142 | 142 | } |
| 143 | 143 | } |