@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | protected function configure() |
43 | 43 | { |
44 | 44 | $this->setName('orm:mapping:describe') |
45 | - ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity') |
|
46 | - ->setDescription('Display information about mapped objects') |
|
47 | - ->setHelp(<<<EOT |
|
45 | + ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity') |
|
46 | + ->setDescription('Display information about mapped objects') |
|
47 | + ->setHelp(<<<EOT |
|
48 | 48 | The %command.full_name% command describes the metadata for the given full or partial entity class name. |
49 | 49 | |
50 | 50 | <info>%command.full_name%</info> My\Namespace\Entity\MyEntity |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | <info>%command.full_name%</info> MyEntity |
55 | 55 | EOT |
56 | - ); |
|
56 | + ); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | private function getMappedEntities(EntityManagerInterface $entityManager) |
135 | 135 | { |
136 | 136 | $entityClassNames = $entityManager->getConfiguration() |
137 | - ->getMetadataDriverImpl() |
|
138 | - ->getAllClassNames(); |
|
137 | + ->getMetadataDriverImpl() |
|
138 | + ->getAllClassNames(); |
|
139 | 139 | |
140 | 140 | if ( ! $entityClassNames) { |
141 | 141 | throw new \InvalidArgumentException( |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | |
166 | 166 | $matches = array_filter( |
167 | 167 | $this->getMappedEntities($entityManager), |
168 | - function ($mappedEntity) use ($entityName) { |
|
169 | - return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity); |
|
168 | + function($mappedEntity) use ($entityName) { |
|
169 | + return preg_match('{'.preg_quote($entityName).'}', $mappedEntity); |
|
170 | 170 | } |
171 | 171 | ); |
172 | 172 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | if (is_bool($value)) { |
208 | - return '<comment>' . ($value ? 'True' : 'False') . '</comment>'; |
|
208 | + return '<comment>'.($value ? 'True' : 'False').'</comment>'; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | if (empty($value)) { |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | public function testMixedParametersWithZeroNumber() : void |
21 | 21 | { |
22 | 22 | $query = $this->_em->createQueryBuilder() |
23 | - ->select('u') |
|
24 | - ->from(CmsUser::class, 'u') |
|
25 | - ->andWhere('u.username = :username') |
|
26 | - ->andWhere('u.id = ?0') |
|
27 | - ->getQuery(); |
|
23 | + ->select('u') |
|
24 | + ->from(CmsUser::class, 'u') |
|
25 | + ->andWhere('u.username = :username') |
|
26 | + ->andWhere('u.id = ?0') |
|
27 | + ->getQuery(); |
|
28 | 28 | |
29 | 29 | $query->setParameter('username', 'bar'); |
30 | 30 | $query->setParameter(0, 0); |
@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | public function testMixedParametersWithZeroNumberOnQueryBuilder() : void |
40 | 40 | { |
41 | 41 | $query = $this->_em->createQueryBuilder() |
42 | - ->select('u') |
|
43 | - ->from(CmsUser::class, 'u') |
|
44 | - ->andWhere('u.username = :username') |
|
45 | - ->andWhere('u.id = ?0') |
|
46 | - ->setParameter('username', 'bar') |
|
47 | - ->setParameter(0, 0) |
|
48 | - ->getQuery(); |
|
42 | + ->select('u') |
|
43 | + ->from(CmsUser::class, 'u') |
|
44 | + ->andWhere('u.username = :username') |
|
45 | + ->andWhere('u.id = ?0') |
|
46 | + ->setParameter('username', 'bar') |
|
47 | + ->setParameter(0, 0) |
|
48 | + ->getQuery(); |
|
49 | 49 | |
50 | 50 | $query->execute(); |
51 | 51 |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function countDistinct($x) |
270 | 270 | { |
271 | - return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')'; |
|
271 | + return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')'; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | } |
451 | 451 | } |
452 | 452 | |
453 | - return new Expr\Func($x . ' IN', (array) $y); |
|
453 | + return new Expr\Func($x.' IN', (array) $y); |
|
454 | 454 | } |
455 | 455 | |
456 | 456 | /** |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | } |
472 | 472 | } |
473 | 473 | |
474 | - return new Expr\Func($x . ' NOT IN', (array) $y); |
|
474 | + return new Expr\Func($x.' NOT IN', (array) $y); |
|
475 | 475 | } |
476 | 476 | |
477 | 477 | /** |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | */ |
484 | 484 | public function isNull($x) |
485 | 485 | { |
486 | - return $x . ' IS NULL'; |
|
486 | + return $x.' IS NULL'; |
|
487 | 487 | } |
488 | 488 | |
489 | 489 | /** |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | */ |
496 | 496 | public function isNotNull($x) |
497 | 497 | { |
498 | - return $x . ' IS NOT NULL'; |
|
498 | + return $x.' IS NOT NULL'; |
|
499 | 499 | } |
500 | 500 | |
501 | 501 | /** |
@@ -613,13 +613,13 @@ discard block |
||
613 | 613 | */ |
614 | 614 | private function _quoteLiteral($literal) |
615 | 615 | { |
616 | - if (is_numeric($literal) && !is_string($literal)) { |
|
616 | + if (is_numeric($literal) && ! is_string($literal)) { |
|
617 | 617 | return (string) $literal; |
618 | 618 | } else if (is_bool($literal)) { |
619 | 619 | return $literal ? "true" : "false"; |
620 | 620 | } |
621 | 621 | |
622 | - return "'" . str_replace("'", "''", $literal) . "'"; |
|
622 | + return "'".str_replace("'", "''", $literal)."'"; |
|
623 | 623 | } |
624 | 624 | |
625 | 625 | /** |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | */ |
634 | 634 | public function between($val, $x, $y) |
635 | 635 | { |
636 | - return $val . ' BETWEEN ' . $x . ' AND ' . $y; |
|
636 | + return $val.' BETWEEN '.$x.' AND '.$y; |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | /** |
@@ -100,7 +100,7 @@ |
||
100 | 100 | foreach ($AST->orderByClause->orderByItems as $item) { |
101 | 101 | if ($item->expression instanceof PathExpression) { |
102 | 102 | $AST->selectClause->selectExpressions[] = new SelectExpression( |
103 | - $this->createSelectExpressionItem($item->expression), '_dctrn_ord' . $this->_aliasCounter++ |
|
103 | + $this->createSelectExpressionItem($item->expression), '_dctrn_ord'.$this->_aliasCounter++ |
|
104 | 104 | ); |
105 | 105 | |
106 | 106 | continue; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $targetEntity = current( |
224 | 224 | array_filter( |
225 | 225 | $classes, |
226 | - function (ClassMetadata $class) use ($idMapping) : bool { |
|
226 | + function(ClassMetadata $class) use ($idMapping) : bool { |
|
227 | 227 | return $class->name === $idMapping['targetEntity']; |
228 | 228 | } |
229 | 229 | ) |
@@ -655,8 +655,8 @@ discard block |
||
655 | 655 | |
656 | 656 | if ( ! $definingClass) { |
657 | 657 | throw new \Doctrine\ORM\ORMException( |
658 | - 'Column name `' . $joinColumn['referencedColumnName'] . '` referenced for relation from ' |
|
659 | - . $mapping['sourceEntity'] . ' towards ' . $mapping['targetEntity'] . ' does not exist.' |
|
658 | + 'Column name `'.$joinColumn['referencedColumnName'].'` referenced for relation from ' |
|
659 | + . $mapping['sourceEntity'].' towards '.$mapping['targetEntity'].' does not exist.' |
|
660 | 660 | ); |
661 | 661 | } |
662 | 662 | |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | if ($table->hasPrimaryKey()) { |
843 | 843 | $columns = $table->getPrimaryKey()->getColumns(); |
844 | 844 | if (count($columns) == 1) { |
845 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
845 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
846 | 846 | if ($fullSchema->hasSequence($checkSequence)) { |
847 | 847 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
848 | 848 | } |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public static function registerAutoloadDirectory($directory) |
46 | 46 | { |
47 | - if (!class_exists('Doctrine\Common\ClassLoader', false)) { |
|
48 | - require_once $directory . "/Doctrine/Common/ClassLoader.php"; |
|
47 | + if ( ! class_exists('Doctrine\Common\ClassLoader', false)) { |
|
48 | + require_once $directory."/Doctrine/Common/ClassLoader.php"; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | $loader = new ClassLoader("Doctrine", $directory); |
52 | 52 | $loader->register(); |
53 | 53 | |
54 | - $loader = new ClassLoader("Symfony\Component", $directory . "/Doctrine"); |
|
54 | + $loader = new ClassLoader("Symfony\Component", $directory."/Doctrine"); |
|
55 | 55 | $loader->register(); |
56 | 56 | } |
57 | 57 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $namespace .= ':'; |
151 | 151 | } |
152 | 152 | |
153 | - $cache->setNamespace($namespace . 'dc2_' . md5($proxyDir) . '_'); // to avoid collisions |
|
153 | + $cache->setNamespace($namespace.'dc2_'.md5($proxyDir).'_'); // to avoid collisions |
|
154 | 154 | |
155 | 155 | return $cache; |
156 | 156 | } |