@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | protected function configure() |
41 | 41 | { |
42 | 42 | $this->setName('orm:info') |
43 | - ->setDescription('Show basic information about all mapped entities') |
|
44 | - ->setHelp(<<<EOT |
|
43 | + ->setDescription('Show basic information about all mapped entities') |
|
44 | + ->setHelp(<<<EOT |
|
45 | 45 | The <info>%command.name%</info> shows basic information about which |
46 | 46 | entities exist and possibly if their mapping information contains errors or |
47 | 47 | not. |
48 | 48 | EOT |
49 | - ); |
|
49 | + ); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | $entityManager = $this->getHelper('em')->getEntityManager(); |
61 | 61 | |
62 | 62 | $entityClassNames = $entityManager->getConfiguration() |
63 | - ->getMetadataDriverImpl() |
|
64 | - ->getAllClassNames(); |
|
63 | + ->getMetadataDriverImpl() |
|
64 | + ->getAllClassNames(); |
|
65 | 65 | |
66 | 66 | if ( ! $entityClassNames) { |
67 | 67 | $ui->caution( |
@@ -45,9 +45,9 @@ |
||
45 | 45 | protected function configure() |
46 | 46 | { |
47 | 47 | $this->setName('orm:ensure-production-settings') |
48 | - ->setDescription('Verify that Doctrine is properly configured for a production environment') |
|
49 | - ->addOption('complete', null, InputOption::VALUE_NONE, 'Flag to also inspect database connection existence.') |
|
50 | - ->setHelp('Verify that Doctrine is properly configured for a production environment.'); |
|
48 | + ->setDescription('Verify that Doctrine is properly configured for a production environment') |
|
49 | + ->addOption('complete', null, InputOption::VALUE_NONE, 'Flag to also inspect database connection existence.') |
|
50 | + ->setHelp('Verify that Doctrine is properly configured for a production environment.'); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -46,11 +46,11 @@ |
||
46 | 46 | protected function configure() |
47 | 47 | { |
48 | 48 | $this->setName('orm:generate-proxies') |
49 | - ->setAliases(['orm:generate:proxies']) |
|
50 | - ->setDescription('Generates proxy classes for entity classes') |
|
51 | - ->addArgument('dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.') |
|
52 | - ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.') |
|
53 | - ->setHelp('Generates proxy classes for entity classes.'); |
|
49 | + ->setAliases(['orm:generate:proxies']) |
|
50 | + ->setDescription('Generates proxy classes for entity classes') |
|
51 | + ->addArgument('dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.') |
|
52 | + ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.') |
|
53 | + ->setHelp('Generates proxy classes for entity classes.'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -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 |
@@ -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 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | return $config; |
137 | 137 | } |
138 | 138 | |
139 | - private static function createCacheConfiguration(bool $isDevMode, string $proxyDir, ?Cache $cache) : Cache |
|
139 | + private static function createCacheConfiguration(bool $isDevMode, string $proxyDir, ?Cache $cache) : Cache |
|
140 | 140 | { |
141 | 141 | $cache = self::createCacheInstance($isDevMode, $cache); |
142 | 142 | |
@@ -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 | } |