@@ -45,15 +45,15 @@ |
||
| 45 | 45 | ->getProperties(ClassWithMixedProperties::class); |
| 46 | 46 | |
| 47 | 47 | $this->assertArrayHasKey( |
| 48 | - "\0" . ClassWithMixedProperties::class . "\0" . 'privateProperty', |
|
| 48 | + "\0".ClassWithMixedProperties::class."\0".'privateProperty', |
|
| 49 | 49 | $properties |
| 50 | 50 | ); |
| 51 | 51 | $this->assertArrayHasKey( |
| 52 | - "\0" . ClassWithMixedProperties::class . "\0" . 'privatePropertyOverride', |
|
| 52 | + "\0".ClassWithMixedProperties::class."\0".'privatePropertyOverride', |
|
| 53 | 53 | $properties |
| 54 | 54 | ); |
| 55 | 55 | $this->assertArrayHasKey( |
| 56 | - "\0" . ParentClass::class . "\0" . 'privatePropertyOverride', |
|
| 56 | + "\0".ParentClass::class."\0".'privatePropertyOverride', |
|
| 57 | 57 | $properties |
| 58 | 58 | ); |
| 59 | 59 | $this->assertArrayHasKey( |
@@ -14,11 +14,11 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | protected function _loadDriver() |
| 16 | 16 | { |
| 17 | - if (!class_exists(Yaml::class, true)) { |
|
| 17 | + if ( ! class_exists(Yaml::class, true)) { |
|
| 18 | 18 | $this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.'); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - return new YamlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'yaml'); |
|
| 21 | + return new YamlDriver(__DIR__.DIRECTORY_SEPARATOR.'yaml'); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function testJoinTablesWithMappedSuperclassForYamlDriver() |
| 30 | 30 | { |
| 31 | 31 | $yamlDriver = $this->_loadDriver(); |
| 32 | - $yamlDriver->getLocator()->addPaths([__DIR__ . DIRECTORY_SEPARATOR . 'yaml']); |
|
| 32 | + $yamlDriver->getLocator()->addPaths([__DIR__.DIRECTORY_SEPARATOR.'yaml']); |
|
| 33 | 33 | |
| 34 | 34 | $em = $this->_getTestEntityManager(); |
| 35 | 35 | $em->getConfiguration()->setMetadataDriverImpl($yamlDriver); |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | { |
| 131 | 131 | $this->expectException(MappingException::class); |
| 132 | 132 | $this->expectExceptionMessage( |
| 133 | - 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
| 133 | + 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
| 134 | 134 | . ' of \'Doctrine\Tests\ORM\Mapping\HierarchyBase\' to be properly mapped in the inheritance hierarchy.' |
| 135 | 135 | . ' Alternatively you can make \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' an abstract class to' |
| 136 | 136 | . ' avoid this exception from occurring.' |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | protected function _loadDriver() |
| 20 | 20 | { |
| 21 | - return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml'); |
|
| 21 | + return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml'); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function testClassTableInheritanceDiscriminatorMap() |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | public function testValidateXmlSchema($xmlMappingFile) |
| 152 | 152 | { |
| 153 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
| 153 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
| 154 | 154 | $dom = new \DOMDocument('UTF-8'); |
| 155 | 155 | |
| 156 | 156 | $dom->load($xmlMappingFile); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | static public function dataValidSchema() |
| 162 | 162 | { |
| 163 | - $list = glob(__DIR__ . '/xml/*.xml'); |
|
| 163 | + $list = glob(__DIR__.'/xml/*.xml'); |
|
| 164 | 164 | $invalid = [ |
| 165 | 165 | 'Doctrine.Tests.Models.DDC889.DDC889Class.dcm' |
| 166 | 166 | ]; |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid); |
| 170 | 170 | }); |
| 171 | 171 | |
| 172 | - return array_map(function($item){ |
|
| 172 | + return array_map(function($item) { |
|
| 173 | 173 | return [$item]; |
| 174 | 174 | }, $list); |
| 175 | 175 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | protected function setUp() |
| 20 | 20 | { |
| 21 | 21 | parent::setUp(); |
| 22 | - $this->resolver = new DefaultEntityListenerResolver(); |
|
| 22 | + $this->resolver = new DefaultEntityListenerResolver(); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function testResolve() |
@@ -1078,7 +1078,7 @@ |
||
| 1078 | 1078 | $this->expectExceptionMessage("You have specified invalid cascade options for " . CMS\CmsUser::class . "::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'"); |
| 1079 | 1079 | |
| 1080 | 1080 | $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass', 'cascade' => ['invalid']]); |
| 1081 | - } |
|
| 1081 | + } |
|
| 1082 | 1082 | |
| 1083 | 1083 | /** |
| 1084 | 1084 | * @group DDC-964 |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | use Doctrine\Tests\OrmTestCase; |
| 22 | 22 | use DoctrineGlobal_Article; |
| 23 | 23 | |
| 24 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 24 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 25 | 25 | |
| 26 | 26 | class ClassMetadataTest extends OrmTestCase |
| 27 | 27 | { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $this->assertEquals('phonenumbers', $oneOneMapping['fieldName']); |
| 72 | 72 | $this->assertEquals(CMS\CmsAddress::class, $oneOneMapping['targetEntity']); |
| 73 | 73 | $this->assertTrue($cm->isReadOnly); |
| 74 | - $this->assertEquals(['dql' => ['name'=>'dql','query'=>'foo','dql'=>'foo']], $cm->namedQueries); |
|
| 74 | + $this->assertEquals(['dql' => ['name'=>'dql', 'query'=>'foo', 'dql'=>'foo']], $cm->namedQueries); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | public function testFieldIsNullable() |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | { |
| 205 | 205 | $cm = new ClassMetadata(CMS\CmsUser::class); |
| 206 | 206 | $cm->initializeReflection(new RuntimeReflectionService()); |
| 207 | - $cm->isIdentifierComposite = true; |
|
| 207 | + $cm->isIdentifierComposite = true; |
|
| 208 | 208 | |
| 209 | 209 | $this->expectException(\Doctrine\ORM\Mapping\MappingException::class); |
| 210 | 210 | $cm->getSingleIdentifierFieldName(); |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | |
| 397 | 397 | $this->assertEquals('CMS_ADDRESS_CMS_USER', $manyToManyMetadata->associationMappings['user']['joinTable']['name']); |
| 398 | 398 | |
| 399 | - $this->assertEquals(['CMS_ADDRESS_ID','CMS_USER_ID'], $manyToManyMetadata->associationMappings['user']['joinTableColumns']); |
|
| 399 | + $this->assertEquals(['CMS_ADDRESS_ID', 'CMS_USER_ID'], $manyToManyMetadata->associationMappings['user']['joinTableColumns']); |
|
| 400 | 400 | $this->assertEquals(['CMS_ADDRESS_ID'=>'ID'], $manyToManyMetadata->associationMappings['user']['relationToSourceKeyColumns']); |
| 401 | 401 | $this->assertEquals(['CMS_USER_ID'=>'ID'], $manyToManyMetadata->associationMappings['user']['relationToTargetKeyColumns']); |
| 402 | 402 | |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | $cm->initializeReflection(new RuntimeReflectionService()); |
| 437 | 437 | |
| 438 | 438 | $this->expectException(MappingException::class); |
| 439 | - $this->expectExceptionMessage("No mapping found for field 'foo' on class '" . CMS\CmsUser::class . "'."); |
|
| 439 | + $this->expectExceptionMessage("No mapping found for field 'foo' on class '".CMS\CmsUser::class."'."); |
|
| 440 | 440 | |
| 441 | 441 | $cm->getFieldMapping('foo'); |
| 442 | 442 | } |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | public function testEmptyFieldNameThrowsException() |
| 547 | 547 | { |
| 548 | 548 | $this->expectException(MappingException::class); |
| 549 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
| 549 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
| 550 | 550 | |
| 551 | 551 | $cm = new ClassMetadata(CMS\CmsUser::class); |
| 552 | 552 | $cm->initializeReflection(new RuntimeReflectionService()); |
@@ -701,12 +701,12 @@ discard block |
||
| 701 | 701 | $mapping = $cm->getSqlResultSetMapping('find-all'); |
| 702 | 702 | |
| 703 | 703 | $this->assertEquals(CMS\CmsUser::class, $mapping['entities'][0]['entityClass']); |
| 704 | - $this->assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
| 705 | - $this->assertEquals(['name'=>'name','column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
| 704 | + $this->assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
| 705 | + $this->assertEquals(['name'=>'name', 'column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
| 706 | 706 | |
| 707 | 707 | $this->assertEquals(CMS\CmsEmail::class, $mapping['entities'][1]['entityClass']); |
| 708 | - $this->assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
| 709 | - $this->assertEquals(['name'=>'email','column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
| 708 | + $this->assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
| 709 | + $this->assertEquals(['name'=>'email', 'column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
| 710 | 710 | |
| 711 | 711 | $this->assertEquals('scalarColumn', $mapping['columns'][0]['name']); |
| 712 | 712 | } |
@@ -921,7 +921,7 @@ discard block |
||
| 921 | 921 | $cm->addLifecycleCallback('notfound', 'postLoad'); |
| 922 | 922 | |
| 923 | 923 | $this->expectException(MappingException::class); |
| 924 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback."); |
|
| 924 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback."); |
|
| 925 | 925 | |
| 926 | 926 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
| 927 | 927 | } |
@@ -936,7 +936,7 @@ discard block |
||
| 936 | 936 | $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass']); |
| 937 | 937 | |
| 938 | 938 | $this->expectException(MappingException::class); |
| 939 | - $this->expectExceptionMessage("The target-entity Doctrine\\Tests\\Models\\CMS\\UnknownClass cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
| 939 | + $this->expectExceptionMessage("The target-entity Doctrine\\Tests\\Models\\CMS\\UnknownClass cannot be found in '".CMS\CmsUser::class."#address'."); |
|
| 940 | 940 | |
| 941 | 941 | $cm->validateAssociations(); |
| 942 | 942 | } |
@@ -1075,7 +1075,7 @@ discard block |
||
| 1075 | 1075 | $cm->initializeReflection(new RuntimeReflectionService()); |
| 1076 | 1076 | |
| 1077 | 1077 | $this->expectException(MappingException::class); |
| 1078 | - $this->expectExceptionMessage("You have specified invalid cascade options for " . CMS\CmsUser::class . "::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'"); |
|
| 1078 | + $this->expectExceptionMessage("You have specified invalid cascade options for ".CMS\CmsUser::class."::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'"); |
|
| 1079 | 1079 | |
| 1080 | 1080 | $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass', 'cascade' => ['invalid']]); |
| 1081 | 1081 | } |
@@ -1320,7 +1320,7 @@ discard block |
||
| 1320 | 1320 | */ |
| 1321 | 1321 | public function propertyToColumnName($propertyName, $className = null) |
| 1322 | 1322 | { |
| 1323 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
| 1323 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
| 1324 | 1324 | } |
| 1325 | 1325 | } |
| 1326 | 1326 | |
@@ -24,18 +24,18 @@ |
||
| 24 | 24 | public $avatar; |
| 25 | 25 | |
| 26 | 26 | public function getId() { |
| 27 | - return $this->id; |
|
| 27 | + return $this->id; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function getUsername() { |
| 31 | - return $this->username; |
|
| 31 | + return $this->username; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function getAvatar() { |
| 35 | - return $this->avatar; |
|
| 35 | + return $this->avatar; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function setAvatar(ForumAvatar $avatar) { |
| 39 | - $this->avatar = $avatar; |
|
| 39 | + $this->avatar = $avatar; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -83,11 +83,11 @@ discard block |
||
| 83 | 83 | { |
| 84 | 84 | $metadata->mapField( |
| 85 | 85 | [ |
| 86 | - 'id' => true, |
|
| 87 | - 'fieldName' => 'id', |
|
| 88 | - 'type' => 'integer', |
|
| 89 | - 'columnName' => 'user_id', |
|
| 90 | - 'length' => 150, |
|
| 86 | + 'id' => true, |
|
| 87 | + 'fieldName' => 'id', |
|
| 88 | + 'type' => 'integer', |
|
| 89 | + 'columnName' => 'user_id', |
|
| 90 | + 'length' => 150, |
|
| 91 | 91 | ] |
| 92 | 92 | ); |
| 93 | 93 | |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $metadata->mapManyToMany( |
| 106 | 106 | [ |
| 107 | - 'fieldName' => 'groups', |
|
| 108 | - 'targetEntity' => 'DDC3579Group' |
|
| 107 | + 'fieldName' => 'groups', |
|
| 108 | + 'targetEntity' => 'DDC3579Group' |
|
| 109 | 109 | ] |
| 110 | 110 | ); |
| 111 | 111 | |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | static public function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata) |
| 134 | 134 | { |
| 135 | 135 | $metadata->setInheritanceType(\Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_JOINED); |
| 136 | - $metadata->setTableName( 'company_contracts'); |
|
| 136 | + $metadata->setTableName('company_contracts'); |
|
| 137 | 137 | $metadata->setDiscriminatorColumn( |
| 138 | 138 | [ |
| 139 | 139 | 'name' => 'discr', |