@@ -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 | } |
@@ -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 | } |
@@ -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->assertLessThanOrEqual($expectedMax, $actualMax, $actualMax . ' must be less than '.$expectedMax); |
|
34 | + $this->assertLessThanOrEqual($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->assertGreaterThanOrEqual($expectedMin, $actualMin, $actualMin . ' must be less than '.$expectedMin); |
|
45 | + $this->assertGreaterThanOrEqual($expectedMin, $actualMin, $actualMin . ' must be less than ' . $expectedMin); |
|
46 | 46 | } |
47 | 47 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $this->assertTrue($metadataManager->getEdmx()->isOK($msg), $msg); |
173 | 173 | |
174 | 174 | $expectedRelation = 'Data.Category_Products_Product_Category'; |
175 | - list($principalNav, ) = $metadataManager->addNavigationPropertyToEntityType( |
|
175 | + list($principalNav,) = $metadataManager->addNavigationPropertyToEntityType( |
|
176 | 176 | $categoryType, '*', 'Products', $productType, '1', 'Category', ['CategoryID'], ['CategoryID'] |
177 | 177 | ); |
178 | 178 | $this->assertEquals($expectedRelation, $principalNav->getRelationship()); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $this->assertTrue($assoc instanceof TAssociationType); |
219 | 219 | $this->assertTrue($assoc->isOK($msg), $msg); |
220 | 220 | |
221 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
221 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
222 | 222 | $ends = $assoc->getEnd(); |
223 | 223 | |
224 | 224 | $this->assertEquals(2, count($ends)); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $this->assertTrue($assoc instanceof TAssociationType); |
253 | 253 | $this->assertTrue($assoc->isOK($msg), $msg); |
254 | 254 | |
255 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
255 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
256 | 256 | $ends = $assoc->getEnd(); |
257 | 257 | |
258 | 258 | $this->assertEquals(2, count($ends)); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $this->assertTrue($assoc instanceof TAssociationType); |
287 | 287 | $this->assertTrue($assoc->isOK($msg), $msg); |
288 | 288 | |
289 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
289 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
290 | 290 | $ends = $assoc->getEnd(); |
291 | 291 | |
292 | 292 | $this->assertEquals(2, count($ends)); |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $this->assertTrue($assoc instanceof TAssociationType); |
321 | 321 | $this->assertTrue($assoc->isOK($msg), $msg); |
322 | 322 | |
323 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
323 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
324 | 324 | $ends = $assoc->getEnd(); |
325 | 325 | |
326 | 326 | $this->assertEquals(2, count($ends)); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $this->assertTrue($assoc instanceof TAssociationType); |
355 | 355 | $this->assertTrue($assoc->isOK($msg), $msg); |
356 | 356 | |
357 | - $this->assertEquals('Data.'.$assoc->getName(), $principal->getRelationship()); |
|
357 | + $this->assertEquals('Data.' . $assoc->getName(), $principal->getRelationship()); |
|
358 | 358 | $ends = $assoc->getEnd(); |
359 | 359 | |
360 | 360 | $this->assertEquals(2, count($ends)); |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | { |
599 | 599 | list(, $metadataManager, $categoryType, $customerType) = $this->setUpMetadataForNavTests(); |
600 | 600 | |
601 | - $expected = 'Invalid multiplicity combination - 1 1'; |
|
601 | + $expected = 'Invalid multiplicity combination - 1 1'; |
|
602 | 602 | $actual = null; |
603 | 603 | |
604 | 604 | try { |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | |
641 | 641 | public function testAddComplexType() |
642 | 642 | { |
643 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
643 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
644 | 644 | |
645 | 645 | $name = 'Name'; |
646 | 646 | $accessType = 'Public'; |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
653 | 653 | |
654 | 654 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
655 | - $this->assertEquals($oldCount+1, $newCount); |
|
655 | + $this->assertEquals($oldCount + 1, $newCount); |
|
656 | 656 | $this->assertNotNull($result); |
657 | 657 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
658 | 658 | $this->assertNotNull($result->getDocumentation()); |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | |
661 | 661 | public function testAddComplexTypeWithOnlySummary() |
662 | 662 | { |
663 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
663 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
664 | 664 | |
665 | 665 | $name = 'Name'; |
666 | 666 | $accessType = 'Public'; |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
673 | 673 | |
674 | 674 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
675 | - $this->assertEquals($oldCount+1, $newCount); |
|
675 | + $this->assertEquals($oldCount + 1, $newCount); |
|
676 | 676 | $this->assertNotNull($result); |
677 | 677 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
678 | 678 | $this->assertNull($result->getDocumentation()); |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | |
681 | 681 | public function testAddComplexTypeWithOnlyDescription() |
682 | 682 | { |
683 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
683 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
684 | 684 | |
685 | 685 | $name = 'Name'; |
686 | 686 | $accessType = 'Public'; |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
693 | 693 | |
694 | 694 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
695 | - $this->assertEquals($oldCount+1, $newCount); |
|
695 | + $this->assertEquals($oldCount + 1, $newCount); |
|
696 | 696 | $this->assertNotNull($result); |
697 | 697 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
698 | 698 | $this->assertNull($result->getDocumentation()); |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | $expected = 'Default value cannot be object or array'; |
704 | 704 | $actual = null; |
705 | 705 | |
706 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
706 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
707 | 707 | $complex = m::mock(TComplexTypeType::class); |
708 | 708 | $name = 'name'; |
709 | 709 | $type = 'type'; |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | $expected = 'Default value cannot be object or array'; |
723 | 723 | $actual = null; |
724 | 724 | |
725 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
725 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
726 | 726 | $complex = m::mock(TComplexTypeType::class); |
727 | 727 | $name = 'name'; |
728 | 728 | $type = 'type'; |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | |
739 | 739 | public function testAddPropertyToComplexTypeDefaultValueBoolean() |
740 | 740 | { |
741 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
741 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
742 | 742 | $complex = m::mock(TComplexTypeType::class); |
743 | 743 | $complex->shouldReceive('addToProperty') |
744 | 744 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | |
765 | 765 | public function testAddPropertyToComplexTypeDefaultValueBooleanOnlySummary() |
766 | 766 | { |
767 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
767 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
768 | 768 | $complex = m::mock(TComplexTypeType::class); |
769 | 769 | $complex->shouldReceive('addToProperty') |
770 | 770 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | |
792 | 792 | public function testAddPropertyToComplexTypeDefaultValueBooleanOnlyDescription() |
793 | 793 | { |
794 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
794 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
795 | 795 | $complex = m::mock(TComplexTypeType::class); |
796 | 796 | $complex->shouldReceive('addToProperty') |
797 | 797 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | $longDescription = new TTextType(); |
911 | 911 | |
912 | 912 | $metadataManager = new MetadataManager(); |
913 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
913 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
914 | 914 | $this->assertNotNull($result->getDocumentation()); |
915 | 915 | } |
916 | 916 | |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | $longDescription = null; |
923 | 923 | |
924 | 924 | $metadataManager = new MetadataManager(); |
925 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
925 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
926 | 926 | $this->assertNull($result->getDocumentation()); |
927 | 927 | } |
928 | 928 | |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | $longDescription = new TTextType(); |
935 | 935 | |
936 | 936 | $metadataManager = new MetadataManager(); |
937 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
937 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
938 | 938 | $this->assertNull($result->getDocumentation()); |
939 | 939 | } |
940 | 940 |
@@ -471,8 +471,8 @@ discard block |
||
471 | 471 | foreach ($this->getProperty() as $prop) { |
472 | 472 | $propName = $prop->getName(); |
473 | 473 | if (in_array($propName, $pArray)) { |
474 | - $msg = 'Prop: Property Names, and Navigation Property Must Be Unique for '. $propName . ' on ' |
|
475 | - . $this->getName() . ' '. __CLASS__; |
|
474 | + $msg = 'Prop: Property Names, and Navigation Property Must Be Unique for ' . $propName . ' on ' |
|
475 | + . $this->getName() . ' ' . __CLASS__; |
|
476 | 476 | return false; |
477 | 477 | } |
478 | 478 | $pArray[] = $propName; |
@@ -480,8 +480,8 @@ discard block |
||
480 | 480 | foreach ($this->getNavigationProperty() as $prop) { |
481 | 481 | $propName = $prop->getName(); |
482 | 482 | if (in_array($propName, $pArray)) { |
483 | - $msg = 'Nav: Property Names, and Navigation Property Must Be Unique for '. $propName . ' on ' |
|
484 | - . $this->getName() . ' '. __CLASS__; |
|
483 | + $msg = 'Nav: Property Names, and Navigation Property Must Be Unique for ' . $propName . ' on ' |
|
484 | + . $this->getName() . ' ' . __CLASS__; |
|
485 | 485 | return false; |
486 | 486 | } |
487 | 487 | $pArray[] = $prop->getName(); |
@@ -194,7 +194,7 @@ |
||
194 | 194 | |
195 | 195 | $msg = ''; |
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); |