@@ -146,7 +146,7 @@ |
||
146 | 146 | for ($j = $i + 1; $j < $numParms; $j++) { |
147 | 147 | assert( |
148 | 148 | $this->parameter[$j] instanceof TFunctionImportParameterType, |
149 | - get_class($this->parameter[$j]). ' ' . $j |
|
149 | + get_class($this->parameter[$j]) . ' ' . $j |
|
150 | 150 | ); |
151 | 151 | $inName = $this->parameter[$j]->getName(); |
152 | 152 | if ($outName == $inName) { |
@@ -203,7 +203,7 @@ |
||
203 | 203 | return false; |
204 | 204 | } |
205 | 205 | if (!in_array($navProp->getFromRole(), $roles)) { |
206 | - $msg = 'Navigation Property Role ' .$navProp->getToRole() |
|
206 | + $msg = 'Navigation Property Role ' . $navProp->getToRole() |
|
207 | 207 | . ' lacks a matching Property in the assocation'; |
208 | 208 | return false; |
209 | 209 | } |
@@ -687,12 +687,12 @@ |
||
687 | 687 | $counter += isset($this->$name) ? 1 : 0; |
688 | 688 | } |
689 | 689 | if (-1 < $this->gExpressionMinimum && $counter < $this->gExpressionMinimum) { |
690 | - $msg = $counter . ' fields not null. Need minimum of '.$this->gExpressionMinimum. ': ' |
|
690 | + $msg = $counter . ' fields not null. Need minimum of ' . $this->gExpressionMinimum . ': ' |
|
691 | 691 | . get_class($this); |
692 | 692 | return false; |
693 | 693 | } |
694 | 694 | if (-1 < $this->gExpressionMaximum && $counter > $this->gExpressionMaximum) { |
695 | - $msg = $counter . ' fields not null. Need maximum of '.$this->gExpressionMaximum. ': ' |
|
695 | + $msg = $counter . ' fields not null. Need maximum of ' . $this->gExpressionMaximum . ': ' |
|
696 | 696 | . get_class($this); |
697 | 697 | return false; |
698 | 698 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | for ($i = 0; $i < 100; $i++) { |
32 | 32 | $actualMax = max($type->getRand(), $actualMax); |
33 | 33 | } |
34 | - $this->assertTrue($expectedMax >= $actualMax, $actualMax . ' must be less than '.$expectedMax); |
|
34 | + $this->assertTrue($expectedMax >= $actualMax, $actualMax . ' must be less than ' . $expectedMax); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function testGetRandMinimum() |
@@ -42,6 +42,6 @@ discard block |
||
42 | 42 | for ($i = 0; $i < 100; $i++) { |
43 | 43 | $actualMin = min($type->getRand(), $actualMin); |
44 | 44 | } |
45 | - $this->assertTrue($expectedMin <= $actualMin, $actualMin . ' must be less than '.$expectedMin); |
|
45 | + $this->assertTrue($expectedMin <= $actualMin, $actualMin . ' must be less than ' . $expectedMin); |
|
46 | 46 | } |
47 | 47 | } |
@@ -194,7 +194,7 @@ |
||
194 | 194 | |
195 | 195 | $msg = null; |
196 | 196 | $expected = 'OH NOES!'; |
197 | - $arr = [ $bar ]; |
|
197 | + $arr = [$bar]; |
|
198 | 198 | |
199 | 199 | $foo = new testType(); |
200 | 200 | $this->assertFalse($foo->isChildArrayOK($arr, $msg), $msg); |
@@ -111,7 +111,7 @@ |
||
111 | 111 | |
112 | 112 | public function testTooManyEnds() |
113 | 113 | { |
114 | - $expected = 'Supplied array not a valid array: '. |
|
114 | + $expected = 'Supplied array not a valid array: ' . |
|
115 | 115 | 'AlgoWeb\ODataMetadata\MetadataV3\edm\EntityContainer\AssociationSetAnonymousType'; |
116 | 116 | $actual = null; |
117 | 117 |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $this->assertTrue($metadataManager->getEdmx()->isOK($msg), $msg); |
114 | 114 | |
115 | 115 | $expectedRelation = 'Data.Category_Products_Product_Category'; |
116 | - list($principalNav, ) = $metadataManager->addNavigationPropertyToEntityType( |
|
116 | + list($principalNav,) = $metadataManager->addNavigationPropertyToEntityType( |
|
117 | 117 | $CategoryType, '*', 'Products', $ProductType, '1', 'Category', ['CategoryID'], ['CategoryID'] |
118 | 118 | ); |
119 | 119 | $this->assertEquals($expectedRelation, $principalNav->getRelationship()); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $associationType = null; |
148 | 148 | foreach ($dom->getElementsByTagName('Association') as $eType) { |
149 | 149 | foreach ($eType->attributes as $aType) { |
150 | - if ($aType->name == 'Name' && 'Data.'.$aType->value == $ProductRelationship) { |
|
150 | + if ($aType->name == 'Name' && 'Data.' . $aType->value == $ProductRelationship) { |
|
151 | 151 | $associationType = $eType; |
152 | 152 | } |
153 | 153 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $this->assertTrue($metadataManager->getEdmx()->isOK($msg), $msg); |
166 | 166 | |
167 | 167 | $expectedRelation = 'Data.Category_Products_Product_Category'; |
168 | - list($principalNav, ) = $metadataManager->addNavigationPropertyToEntityType( |
|
168 | + list($principalNav,) = $metadataManager->addNavigationPropertyToEntityType( |
|
169 | 169 | $CategoryType, '*', 'Products', $ProductType, '1', 'Category', ['CategoryID'], ['CategoryID'] |
170 | 170 | ); |
171 | 171 | $this->assertEquals($expectedRelation, $principalNav->getRelationship()); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $this->assertTrue($assoc instanceof TAssociationType); |
212 | 212 | $this->assertTrue($assoc->isOK($msg), $msg); |
213 | 213 | |
214 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
214 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
215 | 215 | $ends = $assoc->getEnd(); |
216 | 216 | |
217 | 217 | $this->assertEquals(2, count($ends)); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $this->assertTrue($assoc instanceof TAssociationType); |
246 | 246 | $this->assertTrue($assoc->isOK($msg), $msg); |
247 | 247 | |
248 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
248 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
249 | 249 | $ends = $assoc->getEnd(); |
250 | 250 | |
251 | 251 | $this->assertEquals(2, count($ends)); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $this->assertTrue($assoc instanceof TAssociationType); |
280 | 280 | $this->assertTrue($assoc->isOK($msg), $msg); |
281 | 281 | |
282 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
282 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
283 | 283 | $ends = $assoc->getEnd(); |
284 | 284 | |
285 | 285 | $this->assertEquals(2, count($ends)); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | $this->assertTrue($assoc instanceof TAssociationType); |
314 | 314 | $this->assertTrue($assoc->isOK($msg), $msg); |
315 | 315 | |
316 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
316 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
317 | 317 | $ends = $assoc->getEnd(); |
318 | 318 | |
319 | 319 | $this->assertEquals(2, count($ends)); |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $this->assertTrue($assoc instanceof TAssociationType); |
348 | 348 | $this->assertTrue($assoc->isOK($msg), $msg); |
349 | 349 | |
350 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
350 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
351 | 351 | $ends = $assoc->getEnd(); |
352 | 352 | |
353 | 353 | $this->assertEquals(2, count($ends)); |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | { |
551 | 551 | list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests(); |
552 | 552 | |
553 | - $expected = 'Invalid multiplicity combination - 1 1'; |
|
553 | + $expected = 'Invalid multiplicity combination - 1 1'; |
|
554 | 554 | $actual = null; |
555 | 555 | |
556 | 556 | try { |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | { |
573 | 573 | list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests(); |
574 | 574 | |
575 | - $expected = 'Invalid multiplicity combination - * 0..1'; |
|
575 | + $expected = 'Invalid multiplicity combination - * 0..1'; |
|
576 | 576 | $actual = null; |
577 | 577 | |
578 | 578 | try { |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | |
593 | 593 | public function testAddComplexType() |
594 | 594 | { |
595 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
595 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
596 | 596 | |
597 | 597 | $name = 'Name'; |
598 | 598 | $accessType = 'Public'; |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
605 | 605 | |
606 | 606 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
607 | - $this->assertEquals($oldCount+1, $newCount); |
|
607 | + $this->assertEquals($oldCount + 1, $newCount); |
|
608 | 608 | $this->assertNotNull($result); |
609 | 609 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
610 | 610 | $this->assertNotNull($result->getDocumentation()); |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | |
613 | 613 | public function testAddComplexTypeWithOnlySummary() |
614 | 614 | { |
615 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
615 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
616 | 616 | |
617 | 617 | $name = 'Name'; |
618 | 618 | $accessType = 'Public'; |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
625 | 625 | |
626 | 626 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
627 | - $this->assertEquals($oldCount+1, $newCount); |
|
627 | + $this->assertEquals($oldCount + 1, $newCount); |
|
628 | 628 | $this->assertNotNull($result); |
629 | 629 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
630 | 630 | $this->assertNull($result->getDocumentation()); |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | |
633 | 633 | public function testAddComplexTypeWithOnlyDescription() |
634 | 634 | { |
635 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
635 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
636 | 636 | |
637 | 637 | $name = 'Name'; |
638 | 638 | $accessType = 'Public'; |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
645 | 645 | |
646 | 646 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
647 | - $this->assertEquals($oldCount+1, $newCount); |
|
647 | + $this->assertEquals($oldCount + 1, $newCount); |
|
648 | 648 | $this->assertNotNull($result); |
649 | 649 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
650 | 650 | $this->assertNull($result->getDocumentation()); |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | $expected = 'Default value cannot be object or array'; |
656 | 656 | $actual = null; |
657 | 657 | |
658 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
658 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
659 | 659 | $complex = m::mock(TComplexTypeType::class); |
660 | 660 | $name = 'name'; |
661 | 661 | $type = 'type'; |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | $expected = 'Default value cannot be object or array'; |
675 | 675 | $actual = null; |
676 | 676 | |
677 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
677 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
678 | 678 | $complex = m::mock(TComplexTypeType::class); |
679 | 679 | $name = 'name'; |
680 | 680 | $type = 'type'; |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | |
691 | 691 | public function testAddPropertyToComplexTypeDefaultValueBoolean() |
692 | 692 | { |
693 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
693 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
694 | 694 | $complex = m::mock(TComplexTypeType::class); |
695 | 695 | $complex->shouldReceive('addToProperty') |
696 | 696 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | |
717 | 717 | public function testAddPropertyToComplexTypeDefaultValueBooleanOnlySummary() |
718 | 718 | { |
719 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
719 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
720 | 720 | $complex = m::mock(TComplexTypeType::class); |
721 | 721 | $complex->shouldReceive('addToProperty') |
722 | 722 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -743,7 +743,7 @@ discard block |
||
743 | 743 | |
744 | 744 | public function testAddPropertyToComplexTypeDefaultValueBooleanOnlyDescription() |
745 | 745 | { |
746 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
746 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
747 | 747 | $complex = m::mock(TComplexTypeType::class); |
748 | 748 | $complex->shouldReceive('addToProperty') |
749 | 749 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | $longDescription = new TTextType(); |
863 | 863 | |
864 | 864 | $metadataManager = new MetadataManager(); |
865 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
865 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
866 | 866 | $this->assertNotNull($result->getDocumentation()); |
867 | 867 | } |
868 | 868 | |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | $longDescription = null; |
875 | 875 | |
876 | 876 | $metadataManager = new MetadataManager(); |
877 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
877 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
878 | 878 | $this->assertNull($result->getDocumentation()); |
879 | 879 | } |
880 | 880 | |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | $longDescription = new TTextType(); |
887 | 887 | |
888 | 888 | $metadataManager = new MetadataManager(); |
889 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
889 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
890 | 890 | $this->assertNull($result->getDocumentation()); |
891 | 891 | } |
892 | 892 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $newEntity->setName($name); |
65 | 65 | $this->addDocumentation($summary, $longDescription, $newEntity); |
66 | 66 | $newEntity->setAbstract($isAbstract); |
67 | - $newEntity->setBaseType(null === $baseType ? null:$this->getNamespace() . $baseType->getName()); |
|
67 | + $newEntity->setBaseType(null === $baseType ? null : $this->getNamespace() . $baseType->getName()); |
|
68 | 68 | |
69 | 69 | $entitySet = new EntitySetAnonymousType(); |
70 | 70 | $entitySet->setName(Str::plural($newEntity->getName())); |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | |
370 | 370 | $namespace = $this->getNamespace(); |
371 | 371 | $typeName = $expectedReturnType->getName(); |
372 | - $fqTypeName = $namespace.$typeName; |
|
372 | + $fqTypeName = $namespace . $typeName; |
|
373 | 373 | $fqSetName = ($entitySet == null) ? $typeName : $entitySet->getName(); |
374 | 374 | |
375 | 375 | $returnType = new TFunctionImportReturnTypeType(); |