@@ -8,8 +8,6 @@ |
||
| 8 | 8 | use AlgoWeb\ODataMetadata\MetadataV3\edm\Schema; |
| 9 | 9 | use AlgoWeb\ODataMetadata\MetadataV3\edm\TAssociationType; |
| 10 | 10 | use AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityTypeType; |
| 11 | -use AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionReturnTypeType; |
|
| 12 | -use AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionType; |
|
| 13 | 11 | use AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx; |
| 14 | 12 | use Mockery as m; |
| 15 | 13 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | $ds = DIRECTORY_SEPARATOR; |
| 34 | 34 | |
| 35 | - $goodxsd = dirname(__DIR__) . $ds . "xsd" . $ds . "Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd"; |
|
| 35 | + $goodxsd = dirname(__DIR__).$ds."xsd".$ds."Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd"; |
|
| 36 | 36 | if (!file_exists($goodxsd)) { |
| 37 | 37 | return true; |
| 38 | 38 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $result = null; |
| 48 | 48 | |
| 49 | 49 | list($eType, $result) = $metadataManager->addEntityType("Category"); |
| 50 | - $this->assertNotFalse($eType, "Etype is false not type " . $metadataManager->getLastError()); |
|
| 50 | + $this->assertNotFalse($eType, "Etype is false not type ".$metadataManager->getLastError()); |
|
| 51 | 51 | $metadataManager->addPropertyToEntityType($eType, "CategoryID", "Int32", null, false, true, "Identity"); |
| 52 | 52 | $metadataManager->addPropertyToEntityType($eType, "CategoryName", "String"); |
| 53 | 53 | $metadataManager->addPropertyToEntityType($eType, "Description", "String"); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $result = null; |
| 75 | 75 | |
| 76 | 76 | list($CategoryType, $result) = $metadataManager->addEntityType("Category"); |
| 77 | - $this->assertNotFalse($CategoryType, "Etype is false not type " . $metadataManager->getLastError()); |
|
| 77 | + $this->assertNotFalse($CategoryType, "Etype is false not type ".$metadataManager->getLastError()); |
|
| 78 | 78 | $metadataManager->addPropertyToEntityType($CategoryType, "CategoryID", "Int32", null, false, true, "Identity"); |
| 79 | 79 | $metadataManager->addPropertyToEntityType($CategoryType, "CategoryName", "String"); |
| 80 | 80 | $metadataManager->addPropertyToEntityType($CategoryType, "Description", "String"); |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | $this->assertTrue($CategoryType->isOK($msg), $msg); |
| 552 | 552 | $this->assertTrue($CustomerType->isOK($msg), $msg); |
| 553 | 553 | |
| 554 | - $expected = "Invalid multiplicity combination - 1 1"; |
|
| 554 | + $expected = "Invalid multiplicity combination - 1 1"; |
|
| 555 | 555 | $actual = null; |
| 556 | 556 | |
| 557 | 557 | try { |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | $this->assertTrue($CategoryType->isOK($msg), $msg); |
| 581 | 581 | $this->assertTrue($CustomerType->isOK($msg), $msg); |
| 582 | 582 | |
| 583 | - $expected = "Invalid multiplicity combination - * 0..1"; |
|
| 583 | + $expected = "Invalid multiplicity combination - * 0..1"; |
|
| 584 | 584 | $actual = null; |
| 585 | 585 | |
| 586 | 586 | try { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | if (0 == strlen(trim($namespace))) { |
| 70 | 70 | $entityTypeName = $NewEntity->getName(); |
| 71 | 71 | } else { |
| 72 | - $entityTypeName = $namespace . "." . $NewEntity->getName(); |
|
| 72 | + $entityTypeName = $namespace.".".$NewEntity->getName(); |
|
| 73 | 73 | } |
| 74 | 74 | $entitySet->setEntityType($entityTypeName); |
| 75 | 75 | $entitySet->setGetterAccess($accessType); |
@@ -190,21 +190,21 @@ discard block |
||
| 190 | 190 | ) { |
| 191 | 191 | $principalEntitySetName = Str::plural($principalType->getName(), 2); |
| 192 | 192 | $dependentEntitySetName = Str::plural($dependentType->getName(), 2); |
| 193 | - $relationName = $principalType->getName() . "_" . $principalProperty . "_" |
|
| 194 | - . $dependentType->getName() . "_" . $dependentProperty; |
|
| 193 | + $relationName = $principalType->getName()."_".$principalProperty."_" |
|
| 194 | + . $dependentType->getName()."_".$dependentProperty; |
|
| 195 | 195 | $relationName = trim($relationName, "_"); |
| 196 | 196 | |
| 197 | 197 | $namespace = $this->V3Edmx->getDataServiceType()->getSchema()[0]->getNamespace(); |
| 198 | 198 | if (0 == strlen(trim($namespace))) { |
| 199 | 199 | $relationFQName = $relationName; |
| 200 | 200 | } else { |
| 201 | - $relationFQName = $namespace . "." . $relationName; |
|
| 201 | + $relationFQName = $namespace.".".$relationName; |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | $principalNavigationProperty = new TNavigationPropertyType(); |
| 205 | 205 | $principalNavigationProperty->setName($principalProperty); |
| 206 | - $principalNavigationProperty->setToRole(trim($dependentEntitySetName . "_" . $dependentProperty, "_")); |
|
| 207 | - $principalNavigationProperty->setFromRole($principalEntitySetName . "_" . $principalProperty); |
|
| 206 | + $principalNavigationProperty->setToRole(trim($dependentEntitySetName."_".$dependentProperty, "_")); |
|
| 207 | + $principalNavigationProperty->setFromRole($principalEntitySetName."_".$principalProperty); |
|
| 208 | 208 | $principalNavigationProperty->setRelationship($relationFQName); |
| 209 | 209 | $principalNavigationProperty->setGetterAccess($principalGetterAccess); |
| 210 | 210 | $principalNavigationProperty->setSetterAccess($principalSetterAccess); |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | if (!empty($dependentProperty)) { |
| 220 | 220 | $dependentNavigationProperty = new TNavigationPropertyType(); |
| 221 | 221 | $dependentNavigationProperty->setName($dependentProperty); |
| 222 | - $dependentNavigationProperty->setToRole($principalEntitySetName . "_" . $principalProperty); |
|
| 223 | - $dependentNavigationProperty->setFromRole($dependentEntitySetName . "_" . $dependentProperty); |
|
| 222 | + $dependentNavigationProperty->setToRole($principalEntitySetName."_".$principalProperty); |
|
| 223 | + $dependentNavigationProperty->setFromRole($dependentEntitySetName."_".$dependentProperty); |
|
| 224 | 224 | $dependentNavigationProperty->setRelationship($relationFQName); |
| 225 | 225 | $dependentNavigationProperty->setGetterAccess($dependentGetterAccess); |
| 226 | 226 | $dependentNavigationProperty->setSetterAccess($dependentSetterAccess); |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | array $principalConstraintProperty = null, |
| 272 | 272 | array $dependentConstraintProperty = null |
| 273 | 273 | ) { |
| 274 | - $multCombo = [ '*' => ['*', '1'], '0..1' => ['1'], '1' => ['*', '0..1']]; |
|
| 274 | + $multCombo = ['*' => ['*', '1'], '0..1' => ['1'], '1' => ['*', '0..1']]; |
|
| 275 | 275 | $multKeys = array_keys($multCombo); |
| 276 | 276 | if (null != $dependentNavigationProperty) { |
| 277 | 277 | if ($dependentNavigationProperty->getRelationship() != $principalNavigationProperty->getRelationship()) { |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | } |
| 291 | 291 | if (!in_array($dependentMultiplicity, $multCombo[$principalMultiplicity])) { |
| 292 | 292 | throw new \InvalidArgumentException( |
| 293 | - "Invalid multiplicity combination - ". $principalMultiplicity . ' ' . $dependentMultiplicity |
|
| 293 | + "Invalid multiplicity combination - ".$principalMultiplicity.' '.$dependentMultiplicity |
|
| 294 | 294 | ); |
| 295 | 295 | } |
| 296 | 296 | |
@@ -300,8 +300,8 @@ discard block |
||
| 300 | 300 | $principalTypeFQName = $principalType->getName(); |
| 301 | 301 | $dependentTypeFQName = $dependentType->getName(); |
| 302 | 302 | } else { |
| 303 | - $principalTypeFQName = $namespace . "." . $principalType->getName(); |
|
| 304 | - $dependentTypeFQName = $namespace . "." . $dependentType->getName(); |
|
| 303 | + $principalTypeFQName = $namespace.".".$principalType->getName(); |
|
| 304 | + $dependentTypeFQName = $namespace.".".$dependentType->getName(); |
|
| 305 | 305 | } |
| 306 | 306 | $association = new TAssociationType(); |
| 307 | 307 | $relationship = $principalNavigationProperty->getRelationship(); |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | if (0 == strlen(trim($namespace))) { |
| 370 | 370 | $associationSetName = $association->getName(); |
| 371 | 371 | } else { |
| 372 | - $associationSetName = $namespace . "." . $association->getName(); |
|
| 372 | + $associationSetName = $namespace.".".$association->getName(); |
|
| 373 | 373 | } |
| 374 | 374 | $as->setAssociation($associationSetName); |
| 375 | 375 | $end1 = new EndAnonymousType(); |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | private function initSerialiser() |
| 437 | 437 | { |
| 438 | - $ymlDir = __DIR__ . DIRECTORY_SEPARATOR . "MetadataV3" . DIRECTORY_SEPARATOR . "JMSmetadata"; |
|
| 438 | + $ymlDir = __DIR__.DIRECTORY_SEPARATOR."MetadataV3".DIRECTORY_SEPARATOR."JMSmetadata"; |
|
| 439 | 439 | $this->serializer = |
| 440 | 440 | SerializerBuilder::create() |
| 441 | 441 | ->addMetadataDir($ymlDir) |