@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | public function __construct() |
| 48 | 48 | { |
| 49 | - @trigger_error(self::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); |
|
| 49 | + @trigger_error(self::class.' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function __construct($dir = null) |
| 62 | 62 | { |
| 63 | - @trigger_error(static::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); |
|
| 63 | + @trigger_error(static::class.' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); |
|
| 64 | 64 | |
| 65 | 65 | $this->_outputDir = $dir; |
| 66 | 66 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | if ( ! is_dir($dir)) { |
| 147 | 147 | mkdir($dir, 0775, true); |
| 148 | 148 | } |
| 149 | - if (file_exists($path) && !$this->_overwriteExistingFiles) { |
|
| 149 | + if (file_exists($path) && ! $this->_overwriteExistingFiles) { |
|
| 150 | 150 | throw ExportException::attemptOverwriteExistingFile($path); |
| 151 | 151 | } |
| 152 | 152 | file_put_contents($path, $output); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | protected function _generateOutputPath(ClassMetadataInfo $metadata) |
| 166 | 166 | { |
| 167 | - return $this->_outputDir . '/' . str_replace('\\', '.', $metadata->name) . $this->_extension; |
|
| 167 | + return $this->_outputDir.'/'.str_replace('\\', '.', $metadata->name).$this->_extension; |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -227,8 +227,8 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | public function transactional($func) |
| 229 | 229 | { |
| 230 | - if (!is_callable($func)) { |
|
| 231 | - throw new \InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"'); |
|
| 230 | + if ( ! is_callable($func)) { |
|
| 231 | + throw new \InvalidArgumentException('Expected argument of type "callable", got "'.gettype($func).'"'); |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | $this->conn->beginTransaction(); |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | { |
| 359 | 359 | if ($entity !== null) { |
| 360 | 360 | @trigger_error( |
| 361 | - 'Calling ' . __METHOD__ . '() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine ORM 3.0.', |
|
| 361 | + 'Calling '.__METHOD__.'() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine ORM 3.0.', |
|
| 362 | 362 | E_USER_DEPRECATED |
| 363 | 363 | ); |
| 364 | 364 | } |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | |
| 559 | 559 | if ($entityName !== null) { |
| 560 | 560 | @trigger_error( |
| 561 | - 'Calling ' . __METHOD__ . '() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine ORM 3.0.', |
|
| 561 | + 'Calling '.__METHOD__.'() with any arguments to clear specific entities is deprecated and will not be supported in Doctrine ORM 3.0.', |
|
| 562 | 562 | E_USER_DEPRECATED |
| 563 | 563 | ); |
| 564 | 564 | } |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | */ |
| 671 | 671 | public function detach($entity) |
| 672 | 672 | { |
| 673 | - @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); |
|
| 673 | + @trigger_error('Method '.__METHOD__.'() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); |
|
| 674 | 674 | |
| 675 | 675 | if ( ! is_object($entity)) { |
| 676 | 676 | throw ORMInvalidArgumentException::invalidObject('EntityManager#detach()', $entity); |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | */ |
| 696 | 696 | public function merge($entity) |
| 697 | 697 | { |
| 698 | - @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); |
|
| 698 | + @trigger_error('Method '.__METHOD__.'() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); |
|
| 699 | 699 | |
| 700 | 700 | if ( ! is_object($entity)) { |
| 701 | 701 | throw ORMInvalidArgumentException::invalidObject('EntityManager#merge()', $entity); |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | */ |
| 712 | 712 | public function copy($entity, $deep = false) |
| 713 | 713 | { |
| 714 | - @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); |
|
| 714 | + @trigger_error('Method '.__METHOD__.'() is deprecated and will be removed in Doctrine ORM 3.0.', E_USER_DEPRECATED); |
|
| 715 | 715 | |
| 716 | 716 | throw new \BadMethodCallException("Not implemented."); |
| 717 | 717 | } |
@@ -785,7 +785,7 @@ discard block |
||
| 785 | 785 | */ |
| 786 | 786 | public function isOpen() |
| 787 | 787 | { |
| 788 | - return (!$this->closed); |
|
| 788 | + return ( ! $this->closed); |
|
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | /** |
@@ -896,7 +896,7 @@ discard block |
||
| 896 | 896 | sprintf( |
| 897 | 897 | 'Invalid $connection argument of type %s given%s.', |
| 898 | 898 | is_object($connection) ? get_class($connection) : gettype($connection), |
| 899 | - is_object($connection) ? '' : ': "' . $connection . '"' |
|
| 899 | + is_object($connection) ? '' : ': "'.$connection.'"' |
|
| 900 | 900 | ) |
| 901 | 901 | ); |
| 902 | 902 | } |
@@ -946,13 +946,13 @@ discard block |
||
| 946 | 946 | { |
| 947 | 947 | switch ($lockMode) { |
| 948 | 948 | case LockMode::OPTIMISTIC: |
| 949 | - if (!$class->isVersioned) { |
|
| 949 | + if ( ! $class->isVersioned) { |
|
| 950 | 950 | throw OptimisticLockException::notVersioned($class->name); |
| 951 | 951 | } |
| 952 | 952 | break; |
| 953 | 953 | case LockMode::PESSIMISTIC_READ: |
| 954 | 954 | case LockMode::PESSIMISTIC_WRITE: |
| 955 | - if (!$this->getConnection()->isTransactionActive()) { |
|
| 955 | + if ( ! $this->getConnection()->isTransactionActive()) { |
|
| 956 | 956 | throw TransactionRequiredException::transactionRequired(); |
| 957 | 957 | } |
| 958 | 958 | } |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function __construct($case = CASE_LOWER, bool $numberAware = false) |
| 62 | 62 | { |
| 63 | - if (! $numberAware) { |
|
| 63 | + if ( ! $numberAware) { |
|
| 64 | 64 | @trigger_error( |
| 65 | - 'Creating ' . self::class . ' without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.', |
|
| 65 | + 'Creating '.self::class.' without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.', |
|
| 66 | 66 | E_USER_DEPRECATED |
| 67 | 67 | ); |
| 68 | 68 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function referenceColumnName() |
| 127 | 127 | { |
| 128 | - return $this->case === CASE_UPPER ? 'ID' : 'id'; |
|
| 128 | + return $this->case === CASE_UPPER ? 'ID' : 'id'; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function joinColumnName($propertyName, $className = null) |
| 135 | 135 | { |
| 136 | - return $this->underscore($propertyName) . '_' . $this->referenceColumnName(); |
|
| 136 | + return $this->underscore($propertyName).'_'.$this->referenceColumnName(); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) |
| 143 | 143 | { |
| 144 | - return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity); |
|
| 144 | + return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function joinKeyColumnName($entityName, $referencedColumnName = null) |
| 151 | 151 | { |
| 152 | - return $this->classToTableName($entityName) . '_' . |
|
| 152 | + return $this->classToTableName($entityName).'_'. |
|
| 153 | 153 | ($referencedColumnName ?: $this->referenceColumnName()); |
| 154 | 154 | } |
| 155 | 155 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | parent::setUp(); |
| 20 | 20 | |
| 21 | 21 | if ($this->_em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') { |
| 22 | - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mysql.'); |
|
| 22 | + $this->markTestSkipped('The '.__CLASS__.' requires the use of mysql.'); |
|
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
@@ -46,14 +46,14 @@ discard block |
||
| 46 | 46 | $sql = $tool->getCreateSchemaSql($classes); |
| 47 | 47 | $collation = $this->getColumnCollationDeclarationSQL('utf8_unicode_ci'); |
| 48 | 48 | |
| 49 | - $this->assertEquals('CREATE TABLE cms_groups (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(50) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[0]); |
|
| 50 | - $this->assertEquals('CREATE TABLE cms_users (id INT AUTO_INCREMENT NOT NULL, email_id INT DEFAULT NULL, status VARCHAR(50) DEFAULT NULL, username VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_3AF03EC5F85E0677 (username), UNIQUE INDEX UNIQ_3AF03EC5A832C1C9 (email_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[1]); |
|
| 51 | - $this->assertEquals('CREATE TABLE cms_users_groups (user_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_7EA9409AA76ED395 (user_id), INDEX IDX_7EA9409AFE54D947 (group_id), PRIMARY KEY(user_id, group_id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[2]); |
|
| 52 | - $this->assertEquals('CREATE TABLE cms_users_tags (user_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_93F5A1ADA76ED395 (user_id), INDEX IDX_93F5A1ADBAD26311 (tag_id), PRIMARY KEY(user_id, tag_id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[3]); |
|
| 53 | - $this->assertEquals('CREATE TABLE cms_tags (id INT AUTO_INCREMENT NOT NULL, tag_name VARCHAR(50) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[4]); |
|
| 54 | - $this->assertEquals('CREATE TABLE cms_addresses (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, UNIQUE INDEX UNIQ_ACAC157BA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[5]); |
|
| 55 | - $this->assertEquals('CREATE TABLE cms_emails (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(250) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[6]); |
|
| 56 | - $this->assertEquals('CREATE TABLE cms_phonenumbers (phonenumber VARCHAR(50) NOT NULL, user_id INT DEFAULT NULL, INDEX IDX_F21F790FA76ED395 (user_id), PRIMARY KEY(phonenumber)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[7]); |
|
| 49 | + $this->assertEquals('CREATE TABLE cms_groups (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(50) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[0]); |
|
| 50 | + $this->assertEquals('CREATE TABLE cms_users (id INT AUTO_INCREMENT NOT NULL, email_id INT DEFAULT NULL, status VARCHAR(50) DEFAULT NULL, username VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_3AF03EC5F85E0677 (username), UNIQUE INDEX UNIQ_3AF03EC5A832C1C9 (email_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[1]); |
|
| 51 | + $this->assertEquals('CREATE TABLE cms_users_groups (user_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_7EA9409AA76ED395 (user_id), INDEX IDX_7EA9409AFE54D947 (group_id), PRIMARY KEY(user_id, group_id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[2]); |
|
| 52 | + $this->assertEquals('CREATE TABLE cms_users_tags (user_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_93F5A1ADA76ED395 (user_id), INDEX IDX_93F5A1ADBAD26311 (tag_id), PRIMARY KEY(user_id, tag_id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[3]); |
|
| 53 | + $this->assertEquals('CREATE TABLE cms_tags (id INT AUTO_INCREMENT NOT NULL, tag_name VARCHAR(50) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[4]); |
|
| 54 | + $this->assertEquals('CREATE TABLE cms_addresses (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, UNIQUE INDEX UNIQ_ACAC157BA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[5]); |
|
| 55 | + $this->assertEquals('CREATE TABLE cms_emails (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(250) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[6]); |
|
| 56 | + $this->assertEquals('CREATE TABLE cms_phonenumbers (phonenumber VARCHAR(50) NOT NULL, user_id INT DEFAULT NULL, INDEX IDX_F21F790FA76ED395 (user_id), PRIMARY KEY(phonenumber)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[7]); |
|
| 57 | 57 | $this->assertEquals("ALTER TABLE cms_users ADD CONSTRAINT FK_3AF03EC5A832C1C9 FOREIGN KEY (email_id) REFERENCES cms_emails (id)", $sql[8]); |
| 58 | 58 | $this->assertEquals("ALTER TABLE cms_users_groups ADD CONSTRAINT FK_7EA9409AA76ED395 FOREIGN KEY (user_id) REFERENCES cms_users (id)", $sql[9]); |
| 59 | 59 | $this->assertEquals("ALTER TABLE cms_users_groups ADD CONSTRAINT FK_7EA9409AFE54D947 FOREIGN KEY (group_id) REFERENCES cms_groups (id)", $sql[10]); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $collation = $this->getColumnCollationDeclarationSQL('utf8_unicode_ci'); |
| 86 | 86 | |
| 87 | 87 | $this->assertEquals(1, count($sql)); |
| 88 | - $this->assertEquals('CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, `decimal` NUMERIC(5, 2) NOT NULL, `high_scale` NUMERIC(14, 4) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[0]); |
|
| 88 | + $this->assertEquals('CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, `decimal` NUMERIC(5, 2) NOT NULL, `high_scale` NUMERIC(14, 4) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[0]); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | public function testGetCreateSchemaSql3() |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $collation = $this->getColumnCollationDeclarationSQL('utf8_unicode_ci'); |
| 100 | 100 | |
| 101 | 101 | $this->assertEquals(1, count($sql)); |
| 102 | - $this->assertEquals('CREATE TABLE boolean_model (id INT AUTO_INCREMENT NOT NULL, booleanField TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[0]); |
|
| 102 | + $this->assertEquals('CREATE TABLE boolean_model (id INT AUTO_INCREMENT NOT NULL, booleanField TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[0]); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | ['/^(?!entity_to_r)/', null], |
| 147 | 147 | [ |
| 148 | 148 | null, |
| 149 | - static function ($assetName) : bool { |
|
| 149 | + static function($assetName) : bool { |
|
| 150 | 150 | return $assetName !== 'entity_to_remove'; |
| 151 | 151 | }, |
| 152 | 152 | ], |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | private function filterSqls(array $sqls, array $needles) : array |
| 189 | 189 | { |
| 190 | - return array_filter($sqls, static function ($sql) use ($needles) { |
|
| 190 | + return array_filter($sqls, static function($sql) use ($needles) { |
|
| 191 | 191 | foreach ($needles as $needle) { |
| 192 | 192 | if (strpos($sql, $needle) !== false) { |
| 193 | 193 | return true; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | parent::setUp(); |
| 21 | 21 | |
| 22 | 22 | if ($this->_em->getConnection()->getDatabasePlatform()->getName() !== 'sqlite') { |
| 23 | - $this->markTestSkipped('The ' . self::class . ' requires the use of sqlite.'); |
|
| 23 | + $this->markTestSkipped('The '.self::class.' requires the use of sqlite.'); |
|
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | private function filterCreateTable(array $sqls, string $tableName) : array |
| 36 | 36 | { |
| 37 | - return array_filter($sqls, static function (string $sql) use ($tableName) : bool { |
|
| 37 | + return array_filter($sqls, static function(string $sql) use ($tableName) : bool { |
|
| 38 | 38 | return strpos($sql, sprintf('CREATE TABLE %s (', $tableName)) === 0; |
| 39 | 39 | }); |
| 40 | 40 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $this->_em->getConnection()->exec(current($sqls)); |
| 53 | 53 | $sqls = $tool->getUpdateSchemaSql($classes); |
| 54 | - $sqls = array_filter($sqls, static function (string $sql) : bool { |
|
| 54 | + $sqls = array_filter($sqls, static function(string $sql) : bool { |
|
| 55 | 55 | return (bool) strpos($sql, 'my_entity'); |
| 56 | 56 | }); |
| 57 | 57 | $this->assertCount(0, $sqls); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ['/^(?!my_enti)/', null], |
| 69 | 69 | [ |
| 70 | 70 | null, |
| 71 | - static function ($assetName) : bool { |
|
| 71 | + static function($assetName) : bool { |
|
| 72 | 72 | return $assetName !== 'my_entity'; |
| 73 | 73 | }, |
| 74 | 74 | ], |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $sqls = $tool->getUpdateSchemaSql($classes); |
| 100 | - $sqls = array_filter($sqls, static function (string $sql) : bool { |
|
| 100 | + $sqls = array_filter($sqls, static function(string $sql) : bool { |
|
| 101 | 101 | return (bool) strpos($sql, 'my_entity'); |
| 102 | 102 | }); |
| 103 | 103 | self::assertCount(0, $sqls); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | parent::setUp(); |
| 19 | 19 | |
| 20 | 20 | if ($this->_em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') { |
| 21 | - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of postgresql.'); |
|
| 21 | + $this->markTestSkipped('The '.__CLASS__.' requires the use of postgresql.'); |
|
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | ['/^(?!pg_entity_to_r)/', null], |
| 154 | 154 | [ |
| 155 | 155 | null, |
| 156 | - static function ($assetName) : bool { |
|
| 156 | + static function($assetName) : bool { |
|
| 157 | 157 | return $assetName !== 'pg_entity_to_remove'; |
| 158 | 158 | }, |
| 159 | 159 | ], |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | $sqls = $tool->getUpdateSchemaSql($classes); |
| 185 | - $sqls = array_filter($sqls, static function ($sql) { |
|
| 185 | + $sqls = array_filter($sqls, static function($sql) { |
|
| 186 | 186 | return strpos($sql, 'pg_entity_to_remove') !== false; |
| 187 | 187 | }); |
| 188 | 188 | self::assertCount(0, $sqls); |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $targetEntity = current( |
| 229 | 229 | array_filter( |
| 230 | 230 | $classes, |
| 231 | - function (ClassMetadata $class) use ($idMapping) : bool { |
|
| 231 | + function(ClassMetadata $class) use ($idMapping) : bool { |
|
| 232 | 232 | return $class->name === $idMapping['targetEntity']; |
| 233 | 233 | } |
| 234 | 234 | ) |
@@ -648,8 +648,8 @@ discard block |
||
| 648 | 648 | |
| 649 | 649 | if ( ! $definingClass) { |
| 650 | 650 | throw new \Doctrine\ORM\ORMException( |
| 651 | - 'Column name `' . $joinColumn['referencedColumnName'] . '` referenced for relation from ' |
|
| 652 | - . $mapping['sourceEntity'] . ' towards ' . $mapping['targetEntity'] . ' does not exist.' |
|
| 651 | + 'Column name `'.$joinColumn['referencedColumnName'].'` referenced for relation from ' |
|
| 652 | + . $mapping['sourceEntity'].' towards '.$mapping['targetEntity'].' does not exist.' |
|
| 653 | 653 | ); |
| 654 | 654 | } |
| 655 | 655 | |
@@ -713,7 +713,7 @@ discard block |
||
| 713 | 713 | |
| 714 | 714 | $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
| 715 | 715 | |
| 716 | - if (! $this->platform->supportsForeignKeyConstraints()) { |
|
| 716 | + if ( ! $this->platform->supportsForeignKeyConstraints()) { |
|
| 717 | 717 | return; |
| 718 | 718 | } |
| 719 | 719 | |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | */ |
| 750 | 750 | private function gatherColumnOptions(array $mapping) : array |
| 751 | 751 | { |
| 752 | - if (! isset($mapping['options'])) { |
|
| 752 | + if ( ! isset($mapping['options'])) { |
|
| 753 | 753 | return []; |
| 754 | 754 | } |
| 755 | 755 | |
@@ -855,7 +855,7 @@ discard block |
||
| 855 | 855 | if ($table->hasPrimaryKey()) { |
| 856 | 856 | $columns = $table->getPrimaryKey()->getColumns(); |
| 857 | 857 | if (count($columns) == 1) { |
| 858 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
| 858 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
| 859 | 859 | if ($fullSchema->hasSequence($checkSequence)) { |
| 860 | 860 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
| 861 | 861 | } |
@@ -932,7 +932,7 @@ discard block |
||
| 932 | 932 | } |
| 933 | 933 | |
| 934 | 934 | // whitelist assets we already know about in $toSchema, use the existing filter otherwise |
| 935 | - $config->setSchemaAssetsFilter(static function ($asset) use ($filter, $toSchema) : bool { |
|
| 935 | + $config->setSchemaAssetsFilter(static function($asset) use ($filter, $toSchema) : bool { |
|
| 936 | 936 | $assetName = $asset instanceof AbstractAsset ? $asset->getName() : $asset; |
| 937 | 937 | |
| 938 | 938 | return $toSchema->hasTable($assetName) || $toSchema->hasSequence($assetName) || $filter($asset); |