|  | @@ -172,7 +172,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 |   |