@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -declare(strict_types=1); |
|
| 4 | +declare(strict_types = 1); |
|
| 5 | 5 | |
| 6 | 6 | namespace Doctrine\ORM\Utility; |
| 7 | 7 | |
@@ -62,14 +62,14 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | // iterate over association mappings |
| 64 | 64 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
| 65 | - if (! ($association instanceof AssociationMetadata)) { |
|
| 65 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
| 66 | 66 | continue; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // resolve join columns over to-one or to-many |
| 70 | 70 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
| 71 | 71 | |
| 72 | - if (! $association->isOwningSide()) { |
|
| 72 | + if ( ! $association->isOwningSide()) { |
|
| 73 | 73 | $association = $targetClass->getProperty($association->getMappedBy()); |
| 74 | 74 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
| 75 | 75 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Tools; |
| 6 | 6 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $this->namespace = uniqid("doctrine_", false); |
| 40 | 40 | $this->tmpDir = sys_get_temp_dir(); |
| 41 | 41 | |
| 42 | - mkdir($this->tmpDir . \DIRECTORY_SEPARATOR . $this->namespace); |
|
| 42 | + mkdir($this->tmpDir.\DIRECTORY_SEPARATOR.$this->namespace); |
|
| 43 | 43 | |
| 44 | 44 | $this->generator = new EntityGenerator(); |
| 45 | 45 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | public function tearDown() |
| 54 | 54 | { |
| 55 | - $ri = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->tmpDir . '/' . $this->namespace)); |
|
| 55 | + $ri = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->tmpDir.'/'.$this->namespace)); |
|
| 56 | 56 | |
| 57 | 57 | foreach ($ri AS $file) { |
| 58 | 58 | /* @var $file \SplFileInfo */ |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - rmdir($this->tmpDir . '/' . $this->namespace); |
|
| 64 | + rmdir($this->tmpDir.'/'.$this->namespace); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -71,9 +71,9 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function generateBookEntityFixture(array $embeddedClasses = []) |
| 73 | 73 | { |
| 74 | - $metadata = new ClassMetadata($this->namespace . '\EntityGeneratorBook', $this->metadataBuildingContext); |
|
| 74 | + $metadata = new ClassMetadata($this->namespace.'\EntityGeneratorBook', $this->metadataBuildingContext); |
|
| 75 | 75 | |
| 76 | - $metadata->setCustomRepositoryClassName($this->namespace . '\EntityGeneratorBookRepository'); |
|
| 76 | + $metadata->setCustomRepositoryClassName($this->namespace.'\EntityGeneratorBookRepository'); |
|
| 77 | 77 | |
| 78 | 78 | $tableMetadata = new Mapping\TableMetadata(); |
| 79 | 79 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | private function generateEntityTypeFixture(array $field) |
| 194 | 194 | { |
| 195 | - $metadata = new ClassMetadata($this->namespace . '\EntityType', $this->metadataBuildingContext); |
|
| 195 | + $metadata = new ClassMetadata($this->namespace.'\EntityType', $this->metadataBuildingContext); |
|
| 196 | 196 | |
| 197 | 197 | $tableMetadata = new Mapping\TableMetadata(); |
| 198 | 198 | $tableMetadata->setName('entity_type'); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | private function generateIsbnEmbeddableFixture(array $embeddedClasses = [], $columnPrefix = null) |
| 227 | 227 | { |
| 228 | - $metadata = new ClassMetadata($this->namespace . '\EntityGeneratorIsbn', $this->metadataBuildingContext); |
|
| 228 | + $metadata = new ClassMetadata($this->namespace.'\EntityGeneratorIsbn', $this->metadataBuildingContext); |
|
| 229 | 229 | $metadata->isEmbeddedClass = true; |
| 230 | 230 | |
| 231 | 231 | $fieldMetadata = new Mapping\FieldMetadata('prefix'); |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | */ |
| 284 | 284 | private function generateTestEmbeddableFixture() |
| 285 | 285 | { |
| 286 | - $metadata = new ClassMetadata($this->namespace . '\EntityGeneratorTestEmbeddable', $this->metadataBuildingContext); |
|
| 286 | + $metadata = new ClassMetadata($this->namespace.'\EntityGeneratorTestEmbeddable', $this->metadataBuildingContext); |
|
| 287 | 287 | |
| 288 | 288 | $metadata->isEmbeddedClass = true; |
| 289 | 289 | |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | private function loadEntityClass(ClassMetadata $metadata) |
| 327 | 327 | { |
| 328 | 328 | $className = basename(str_replace('\\', '/', $metadata->getClassName())); |
| 329 | - $path = $this->tmpDir . '/' . $this->namespace . '/' . $className . '.php'; |
|
| 329 | + $path = $this->tmpDir.'/'.$this->namespace.'/'.$className.'.php'; |
|
| 330 | 330 | |
| 331 | 331 | self::assertFileExists($path); |
| 332 | 332 | |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | |
| 478 | 478 | $this->generator->writeEntityClass($metadata, $this->tmpDir); |
| 479 | 479 | |
| 480 | - self::assertFileExists($this->tmpDir . "/" . $this->namespace . "/EntityGeneratorBook.php~"); |
|
| 480 | + self::assertFileExists($this->tmpDir."/".$this->namespace."/EntityGeneratorBook.php~"); |
|
| 481 | 481 | |
| 482 | 482 | $book = $this->newInstance($metadata); |
| 483 | 483 | $reflClass = new \ReflectionClass($metadata->getClassName()); |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | */ |
| 630 | 630 | public function testMappedSuperclassAnnotationGeneration() |
| 631 | 631 | { |
| 632 | - $metadata = new ClassMetadata($this->namespace . '\EntityGeneratorBook', $this->metadataBuildingContext); |
|
| 632 | + $metadata = new ClassMetadata($this->namespace.'\EntityGeneratorBook', $this->metadataBuildingContext); |
|
| 633 | 633 | |
| 634 | 634 | $metadata->isMappedSuperclass = true; |
| 635 | 635 | |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | */ |
| 668 | 668 | public function testGenerateEntityWithSequenceGenerator() |
| 669 | 669 | { |
| 670 | - $metadata = new ClassMetadata($this->namespace . '\DDC1784Entity', $this->metadataBuildingContext); |
|
| 670 | + $metadata = new ClassMetadata($this->namespace.'\DDC1784Entity', $this->metadataBuildingContext); |
|
| 671 | 671 | |
| 672 | 672 | $fieldMetadata = new Mapping\FieldMetadata('id'); |
| 673 | 673 | $fieldMetadata->setType(Type::getType('integer')); |
@@ -684,8 +684,8 @@ discard block |
||
| 684 | 684 | |
| 685 | 685 | $this->generator->writeEntityClass($metadata, $this->tmpDir); |
| 686 | 686 | |
| 687 | - $filename = $this->tmpDir . DIRECTORY_SEPARATOR |
|
| 688 | - . $this->namespace . DIRECTORY_SEPARATOR . 'DDC1784Entity.php'; |
|
| 687 | + $filename = $this->tmpDir.DIRECTORY_SEPARATOR |
|
| 688 | + . $this->namespace.DIRECTORY_SEPARATOR.'DDC1784Entity.php'; |
|
| 689 | 689 | |
| 690 | 690 | self::assertFileExists($filename); |
| 691 | 691 | |
@@ -705,7 +705,7 @@ discard block |
||
| 705 | 705 | */ |
| 706 | 706 | public function testGenerateEntityWithMultipleInverseJoinColumns() |
| 707 | 707 | { |
| 708 | - $metadata = new ClassMetadata($this->namespace . '\DDC2079Entity', $this->metadataBuildingContext); |
|
| 708 | + $metadata = new ClassMetadata($this->namespace.'\DDC2079Entity', $this->metadataBuildingContext); |
|
| 709 | 709 | |
| 710 | 710 | $fieldMetadata = new Mapping\FieldMetadata('id'); |
| 711 | 711 | $fieldMetadata->setType(Type::getType('integer')); |
@@ -744,14 +744,14 @@ discard block |
||
| 744 | 744 | $association = new Mapping\ManyToManyAssociationMetadata('centroCustos'); |
| 745 | 745 | |
| 746 | 746 | $association->setJoinTable($joinTable); |
| 747 | - $association->setTargetEntity($this->namespace . '\\DDC2079CentroCusto'); |
|
| 747 | + $association->setTargetEntity($this->namespace.'\\DDC2079CentroCusto'); |
|
| 748 | 748 | |
| 749 | 749 | $metadata->addProperty($association); |
| 750 | 750 | |
| 751 | 751 | $this->generator->writeEntityClass($metadata, $this->tmpDir); |
| 752 | 752 | |
| 753 | - $filename = $this->tmpDir . DIRECTORY_SEPARATOR |
|
| 754 | - . $this->namespace . DIRECTORY_SEPARATOR . 'DDC2079Entity.php'; |
|
| 753 | + $filename = $this->tmpDir.DIRECTORY_SEPARATOR |
|
| 754 | + . $this->namespace.DIRECTORY_SEPARATOR.'DDC2079Entity.php'; |
|
| 755 | 755 | |
| 756 | 756 | self::assertFileExists($filename); |
| 757 | 757 | |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | $method->setAccessible(true); |
| 783 | 783 | |
| 784 | 784 | foreach ($constants as $name => $value) { |
| 785 | - if( ! preg_match($pattern, $name)) { |
|
| 785 | + if ( ! preg_match($pattern, $name)) { |
|
| 786 | 786 | continue; |
| 787 | 787 | } |
| 788 | 788 | |
@@ -811,7 +811,7 @@ discard block |
||
| 811 | 811 | $method->setAccessible(true); |
| 812 | 812 | |
| 813 | 813 | foreach ($constants as $name => $value) { |
| 814 | - if( ! preg_match($pattern, $name)) { |
|
| 814 | + if ( ! preg_match($pattern, $name)) { |
|
| 815 | 815 | continue; |
| 816 | 816 | } |
| 817 | 817 | |
@@ -840,7 +840,7 @@ discard block |
||
| 840 | 840 | $method->setAccessible(true); |
| 841 | 841 | |
| 842 | 842 | foreach ($constants as $name => $value) { |
| 843 | - if( ! preg_match($pattern, $name)) { |
|
| 843 | + if ( ! preg_match($pattern, $name)) { |
|
| 844 | 844 | continue; |
| 845 | 845 | } |
| 846 | 846 | |
@@ -864,7 +864,7 @@ discard block |
||
| 864 | 864 | public function testEntityTypeAlias(array $field) |
| 865 | 865 | { |
| 866 | 866 | $metadata = $this->generateEntityTypeFixture($field); |
| 867 | - $path = $this->tmpDir . '/'. $this->namespace . '/EntityType.php'; |
|
| 867 | + $path = $this->tmpDir.'/'.$this->namespace.'/EntityType.php'; |
|
| 868 | 868 | |
| 869 | 869 | self::assertFileExists($path); |
| 870 | 870 | require_once $path; |
@@ -877,8 +877,8 @@ discard block |
||
| 877 | 877 | $type = $field['phpType']; |
| 878 | 878 | $name = $field['fieldName']; |
| 879 | 879 | $value = $field['value']; |
| 880 | - $getter = "get" . ucfirst($name); |
|
| 881 | - $setter = "set" . ucfirst($name); |
|
| 880 | + $getter = "get".ucfirst($name); |
|
| 881 | + $setter = "set".ucfirst($name); |
|
| 882 | 882 | |
| 883 | 883 | self::assertPhpDocVarType($type, $reflClass->getProperty($name)); |
| 884 | 884 | self::assertPhpDocParamType($type, $reflClass->getMethod($setter)); |
@@ -901,13 +901,13 @@ discard block |
||
| 901 | 901 | $metadata = $cmf->getMetadataFor(get_class($user)); |
| 902 | 902 | |
| 903 | 903 | // @todo guilhermeblanco Fix this test as changing Entity class should never be allowed. |
| 904 | - $metadata->setClassName($this->namespace . "\DDC2372User"); |
|
| 904 | + $metadata->setClassName($this->namespace."\DDC2372User"); |
|
| 905 | 905 | |
| 906 | 906 | $this->generator->writeEntityClass($metadata, $this->tmpDir); |
| 907 | 907 | |
| 908 | - self::assertFileExists($this->tmpDir . "/" . $this->namespace . "/DDC2372User.php"); |
|
| 908 | + self::assertFileExists($this->tmpDir."/".$this->namespace."/DDC2372User.php"); |
|
| 909 | 909 | |
| 910 | - require $this->tmpDir . "/" . $this->namespace . "/DDC2372User.php"; |
|
| 910 | + require $this->tmpDir."/".$this->namespace."/DDC2372User.php"; |
|
| 911 | 911 | |
| 912 | 912 | $reflClass = new \ReflectionClass($metadata->getClassName()); |
| 913 | 913 | |
@@ -929,12 +929,12 @@ discard block |
||
| 929 | 929 | $metadata = $cmf->getMetadataFor(get_class($user)); |
| 930 | 930 | |
| 931 | 931 | // @todo guilhermeblanco Fix this test as changing Entity class should never be allowed. |
| 932 | - $metadata->setClassName($this->namespace . "\DDC2372Admin"); |
|
| 932 | + $metadata->setClassName($this->namespace."\DDC2372Admin"); |
|
| 933 | 933 | |
| 934 | 934 | $this->generator->writeEntityClass($metadata, $this->tmpDir); |
| 935 | 935 | |
| 936 | - self::assertFileExists($this->tmpDir . "/" . $this->namespace . "/DDC2372Admin.php"); |
|
| 937 | - require $this->tmpDir . "/" . $this->namespace . "/DDC2372Admin.php"; |
|
| 936 | + self::assertFileExists($this->tmpDir."/".$this->namespace."/DDC2372Admin.php"); |
|
| 937 | + require $this->tmpDir."/".$this->namespace."/DDC2372Admin.php"; |
|
| 938 | 938 | |
| 939 | 939 | $reflClass = new \ReflectionClass($metadata->getClassName()); |
| 940 | 940 | |
@@ -954,22 +954,22 @@ discard block |
||
| 954 | 954 | $cmf->setEntityManager($em); |
| 955 | 955 | |
| 956 | 956 | $ns = $this->namespace; |
| 957 | - $nsdir = $this->tmpDir . '/' . $ns; |
|
| 957 | + $nsdir = $this->tmpDir.'/'.$ns; |
|
| 958 | 958 | |
| 959 | 959 | // Dump DDC1590User into temp file |
| 960 | 960 | $content = str_replace( |
| 961 | 961 | 'namespace Doctrine\Tests\Models\DDC1590', |
| 962 | - 'namespace ' . $ns, |
|
| 963 | - file_get_contents(__DIR__ . '/../../Models/DDC1590/DDC1590User.php') |
|
| 962 | + 'namespace '.$ns, |
|
| 963 | + file_get_contents(__DIR__.'/../../Models/DDC1590/DDC1590User.php') |
|
| 964 | 964 | ); |
| 965 | 965 | |
| 966 | - $fname = $nsdir . "/DDC1590User.php"; |
|
| 966 | + $fname = $nsdir."/DDC1590User.php"; |
|
| 967 | 967 | file_put_contents($fname, $content); |
| 968 | 968 | |
| 969 | 969 | // Require DDC1590User |
| 970 | 970 | require $fname; |
| 971 | 971 | |
| 972 | - $metadata = $cmf->getMetadataFor($ns . '\DDC1590User'); |
|
| 972 | + $metadata = $cmf->getMetadataFor($ns.'\DDC1590User'); |
|
| 973 | 973 | $this->generator->writeEntityClass($metadata, $this->tmpDir); |
| 974 | 974 | |
| 975 | 975 | // class DDC1590User extends DDC1590Entity { ... } |
@@ -977,13 +977,13 @@ discard block |
||
| 977 | 977 | |
| 978 | 978 | // class _DDC1590User extends DDC1590Entity { ... } |
| 979 | 979 | $source2 = str_replace('class DDC1590User', 'class _DDC1590User', $source); |
| 980 | - $fname2 = $nsdir . "/_DDC1590User.php"; |
|
| 980 | + $fname2 = $nsdir."/_DDC1590User.php"; |
|
| 981 | 981 | file_put_contents($fname2, $source2); |
| 982 | 982 | require $fname2; |
| 983 | 983 | |
| 984 | 984 | // class __DDC1590User { ... } |
| 985 | 985 | $source3 = str_replace('class DDC1590User extends DDC1590Entity', 'class __DDC1590User', $source); |
| 986 | - $fname3 = $nsdir . "/__DDC1590User.php"; |
|
| 986 | + $fname3 = $nsdir."/__DDC1590User.php"; |
|
| 987 | 987 | file_put_contents($fname3, $source3); |
| 988 | 988 | require $fname3; |
| 989 | 989 | |
@@ -1146,7 +1146,7 @@ discard block |
||
| 1146 | 1146 | $this->loadEntityClass($metadata); |
| 1147 | 1147 | |
| 1148 | 1148 | $className = basename(str_replace('\\', '/', $metadata->getClassName())); |
| 1149 | - $path = $this->tmpDir . '/' . $this->namespace . '/' . $className . '.php'; |
|
| 1149 | + $path = $this->tmpDir.'/'.$this->namespace.'/'.$className.'.php'; |
|
| 1150 | 1150 | $classTest = file_get_contents($path); |
| 1151 | 1151 | |
| 1152 | 1152 | $this->generator->setRegenerateEntityIfExists(true); |
@@ -1155,7 +1155,7 @@ discard block |
||
| 1155 | 1155 | $this->generator->writeEntityClass($metadata, $this->tmpDir); |
| 1156 | 1156 | $classNew = file_get_contents($path); |
| 1157 | 1157 | |
| 1158 | - self::assertSame($classTest,$classNew); |
|
| 1158 | + self::assertSame($classTest, $classNew); |
|
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | 1161 | /** |
@@ -203,8 +203,8 @@ |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | - * @group DDC-1663 |
|
| 207 | - */ |
|
| 206 | + * @group DDC-1663 |
|
| 207 | + */ |
|
| 208 | 208 | public function testAddNamedNativeQueryResultSetMappingWithoutFields() |
| 209 | 209 | { |
| 210 | 210 | $cm = new ClassMetadata(CmsUser::class, $this->metadataBuildingContext); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
| 6 | 6 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $driver = new DatabaseDriver($sm); |
| 54 | 54 | |
| 55 | 55 | foreach ($driver->getAllClassNames() as $className) { |
| 56 | - if (!in_array(strtolower($className), $classNames)) { |
|
| 56 | + if ( ! in_array(strtolower($className), $classNames)) { |
|
| 57 | 57 | continue; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if (count($metadatas) != count($classNames)) { |
| 68 | - $this->fail("Have not found all classes matching the names '" . implode(", ", $classNames) . "' only tables " . implode(", ", array_keys($metadatas))); |
|
| 68 | + $this->fail("Have not found all classes matching the names '".implode(", ", $classNames)."' only tables ".implode(", ", array_keys($metadatas))); |
|
| 69 | 69 | } |
| 70 | 70 | return $metadatas; |
| 71 | 71 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Mapping; |
| 6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | use Doctrine\Tests\OrmTestCase; |
| 31 | 31 | use DoctrineGlobal_Article; |
| 32 | 32 | |
| 33 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 33 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 34 | 34 | |
| 35 | 35 | class ClassMetadataTest extends OrmTestCase |
| 36 | 36 | { |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | $namingStrategy |
| 638 | 638 | ); |
| 639 | 639 | |
| 640 | - $metadata = new ClassMetadata(CMS\CmsAddress::class, $this->metadataBuildingContext); |
|
| 640 | + $metadata = new ClassMetadata(CMS\CmsAddress::class, $this->metadataBuildingContext); |
|
| 641 | 641 | |
| 642 | 642 | $association = new Mapping\ManyToManyAssociationMetadata('user'); |
| 643 | 643 | |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | public function testEmptyFieldNameThrowsException() |
| 798 | 798 | { |
| 799 | 799 | $this->expectException(MappingException::class); |
| 800 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
| 800 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
| 801 | 801 | |
| 802 | 802 | $metadata = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
| 803 | 803 | $metadata->initializeReflection(new RuntimeReflectionService()); |
@@ -943,12 +943,12 @@ discard block |
||
| 943 | 943 | $mapping = $cm->getSqlResultSetMapping('find-all'); |
| 944 | 944 | |
| 945 | 945 | self::assertEquals('__CLASS__', $mapping['entities'][0]['entityClass']); |
| 946 | - self::assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
| 947 | - self::assertEquals(['name'=>'name','column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
| 946 | + self::assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
| 947 | + self::assertEquals(['name'=>'name', 'column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
| 948 | 948 | |
| 949 | 949 | self::assertEquals(CMS\CmsEmail::class, $mapping['entities'][1]['entityClass']); |
| 950 | - self::assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
| 951 | - self::assertEquals(['name'=>'email','column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
| 950 | + self::assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
| 951 | + self::assertEquals(['name'=>'email', 'column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
| 952 | 952 | |
| 953 | 953 | self::assertEquals('scalarColumn', $mapping['columns'][0]['name']); |
| 954 | 954 | } |
@@ -1146,7 +1146,7 @@ discard block |
||
| 1146 | 1146 | $cm->addLifecycleCallback('notfound', 'postLoad'); |
| 1147 | 1147 | |
| 1148 | 1148 | $this->expectException(MappingException::class); |
| 1149 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback."); |
|
| 1149 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback."); |
|
| 1150 | 1150 | |
| 1151 | 1151 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
| 1152 | 1152 | } |
@@ -1166,7 +1166,7 @@ discard block |
||
| 1166 | 1166 | $cm->addProperty($association); |
| 1167 | 1167 | |
| 1168 | 1168 | $this->expectException(MappingException::class); |
| 1169 | - $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
| 1169 | + $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'."); |
|
| 1170 | 1170 | |
| 1171 | 1171 | $cm->validateAssociations(); |
| 1172 | 1172 | } |
@@ -1504,6 +1504,6 @@ discard block |
||
| 1504 | 1504 | */ |
| 1505 | 1505 | public function propertyToColumnName($propertyName, $className = null) |
| 1506 | 1506 | { |
| 1507 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
| 1507 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
| 1508 | 1508 | } |
| 1509 | 1509 | } |