@@ -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)); |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | { |
| 592 | 592 | list(, $metadataManager, $categoryType, $customerType) = $this->setUpMetadataForNavTests(); |
| 593 | 593 | |
| 594 | - $expected = 'Invalid multiplicity combination - 1 1'; |
|
| 594 | + $expected = 'Invalid multiplicity combination - 1 1'; |
|
| 595 | 595 | $actual = null; |
| 596 | 596 | |
| 597 | 597 | try { |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | { |
| 614 | 614 | list(, $metadataManager, $categoryType, $customerType) = $this->setUpMetadataForNavTests(); |
| 615 | 615 | |
| 616 | - $expected = 'Invalid multiplicity combination - * 0..1'; |
|
| 616 | + $expected = 'Invalid multiplicity combination - * 0..1'; |
|
| 617 | 617 | $actual = null; |
| 618 | 618 | |
| 619 | 619 | try { |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | |
| 634 | 634 | public function testAddComplexType() |
| 635 | 635 | { |
| 636 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 636 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 637 | 637 | |
| 638 | 638 | $name = 'Name'; |
| 639 | 639 | $accessType = 'Public'; |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
| 646 | 646 | |
| 647 | 647 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
| 648 | - $this->assertEquals($oldCount+1, $newCount); |
|
| 648 | + $this->assertEquals($oldCount + 1, $newCount); |
|
| 649 | 649 | $this->assertNotNull($result); |
| 650 | 650 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
| 651 | 651 | $this->assertNotNull($result->getDocumentation()); |
@@ -653,7 +653,7 @@ discard block |
||
| 653 | 653 | |
| 654 | 654 | public function testAddComplexTypeWithOnlySummary() |
| 655 | 655 | { |
| 656 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 656 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 657 | 657 | |
| 658 | 658 | $name = 'Name'; |
| 659 | 659 | $accessType = 'Public'; |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
| 666 | 666 | |
| 667 | 667 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
| 668 | - $this->assertEquals($oldCount+1, $newCount); |
|
| 668 | + $this->assertEquals($oldCount + 1, $newCount); |
|
| 669 | 669 | $this->assertNotNull($result); |
| 670 | 670 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
| 671 | 671 | $this->assertNull($result->getDocumentation()); |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | |
| 674 | 674 | public function testAddComplexTypeWithOnlyDescription() |
| 675 | 675 | { |
| 676 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 676 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 677 | 677 | |
| 678 | 678 | $name = 'Name'; |
| 679 | 679 | $accessType = 'Public'; |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | $result = $metadataManager->addComplexType($name, $accessType, $summary, $longDescription); |
| 686 | 686 | |
| 687 | 687 | $newCount = count($metadataManager->getEdmx()->getDataServiceType()->getSchema()[0]->getComplexType()); |
| 688 | - $this->assertEquals($oldCount+1, $newCount); |
|
| 688 | + $this->assertEquals($oldCount + 1, $newCount); |
|
| 689 | 689 | $this->assertNotNull($result); |
| 690 | 690 | $this->assertTrue($result instanceof TComplexTypeType, get_class($result)); |
| 691 | 691 | $this->assertNull($result->getDocumentation()); |
@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | $expected = 'Default value cannot be object or array'; |
| 697 | 697 | $actual = null; |
| 698 | 698 | |
| 699 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 699 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 700 | 700 | $complex = m::mock(TComplexTypeType::class); |
| 701 | 701 | $name = 'name'; |
| 702 | 702 | $type = 'type'; |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | $expected = 'Default value cannot be object or array'; |
| 716 | 716 | $actual = null; |
| 717 | 717 | |
| 718 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 718 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 719 | 719 | $complex = m::mock(TComplexTypeType::class); |
| 720 | 720 | $name = 'name'; |
| 721 | 721 | $type = 'type'; |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | |
| 732 | 732 | public function testAddPropertyToComplexTypeDefaultValueBoolean() |
| 733 | 733 | { |
| 734 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 734 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 735 | 735 | $complex = m::mock(TComplexTypeType::class); |
| 736 | 736 | $complex->shouldReceive('addToProperty') |
| 737 | 737 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | |
| 758 | 758 | public function testAddPropertyToComplexTypeDefaultValueBooleanOnlySummary() |
| 759 | 759 | { |
| 760 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 760 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 761 | 761 | $complex = m::mock(TComplexTypeType::class); |
| 762 | 762 | $complex->shouldReceive('addToProperty') |
| 763 | 763 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -784,7 +784,7 @@ discard block |
||
| 784 | 784 | |
| 785 | 785 | public function testAddPropertyToComplexTypeDefaultValueBooleanOnlyDescription() |
| 786 | 786 | { |
| 787 | - list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
| 787 | + list(, $metadataManager,,) = $this->setUpMetadataForNavTests(); |
|
| 788 | 788 | $complex = m::mock(TComplexTypeType::class); |
| 789 | 789 | $complex->shouldReceive('addToProperty') |
| 790 | 790 | ->with(m::type(TComplexTypePropertyType::class))->andReturnNull()->once(); |
@@ -903,7 +903,7 @@ discard block |
||
| 903 | 903 | $longDescription = new TTextType(); |
| 904 | 904 | |
| 905 | 905 | $metadataManager = new MetadataManager(); |
| 906 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
| 906 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
| 907 | 907 | $this->assertNotNull($result->getDocumentation()); |
| 908 | 908 | } |
| 909 | 909 | |
@@ -915,7 +915,7 @@ discard block |
||
| 915 | 915 | $longDescription = null; |
| 916 | 916 | |
| 917 | 917 | $metadataManager = new MetadataManager(); |
| 918 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
| 918 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
| 919 | 919 | $this->assertNull($result->getDocumentation()); |
| 920 | 920 | } |
| 921 | 921 | |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | $longDescription = new TTextType(); |
| 928 | 928 | |
| 929 | 929 | $metadataManager = new MetadataManager(); |
| 930 | - list($result, ) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
| 930 | + list($result,) = $metadataManager->addEntityType($name, null, false, $accessType, $summary, $longDescription); |
|
| 931 | 931 | $this->assertNull($result->getDocumentation()); |
| 932 | 932 | } |
| 933 | 933 | |
@@ -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 | } |