@@ -95,7 +95,7 @@ |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $hydrationModeName = $input->getOption('hydrate'); |
| 98 | - $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationModeName)); |
|
| 98 | + $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_'.strtoupper(str_replace('-', '_', $hydrationModeName)); |
|
| 99 | 99 | |
| 100 | 100 | if ( ! defined($hydrationMode)) { |
| 101 | 101 | throw new \RuntimeException( |
@@ -58,8 +58,8 @@ |
||
| 58 | 58 | $entityManager = $this->getHelper('em')->getEntityManager(); |
| 59 | 59 | |
| 60 | 60 | $entityClassNames = $entityManager->getConfiguration() |
| 61 | - ->getMetadataDriverImpl() |
|
| 62 | - ->getAllClassNames(); |
|
| 61 | + ->getMetadataDriverImpl() |
|
| 62 | + ->getAllClassNames(); |
|
| 63 | 63 | |
| 64 | 64 | if (!$entityClassNames) { |
| 65 | 65 | throw new \Exception( |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | ->getMetadataDriverImpl() |
| 62 | 62 | ->getAllClassNames(); |
| 63 | 63 | |
| 64 | - if (!$entityClassNames) { |
|
| 64 | + if ( ! $entityClassNames) { |
|
| 65 | 65 | throw new \Exception( |
| 66 | 66 | 'You do not have any mapped Doctrine ORM entities according to the current configuration. '. |
| 67 | 67 | 'If you have entities or mapping files you should check your mapping configuration for errors.' |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | } else { |
| 87 | 87 | $sqls = $schemaTool->getDropSchemaSQL($metadatas); |
| 88 | 88 | } |
| 89 | - $output->writeln(implode(';' . PHP_EOL, $sqls)); |
|
| 89 | + $output->writeln(implode(';'.PHP_EOL, $sqls)); |
|
| 90 | 90 | |
| 91 | 91 | return 0; |
| 92 | 92 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | return 0; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - $output->writeln('<comment>ATTENTION</comment>: This operation should not be executed in a production environment.' . PHP_EOL); |
|
| 108 | + $output->writeln('<comment>ATTENTION</comment>: This operation should not be executed in a production environment.'.PHP_EOL); |
|
| 109 | 109 | |
| 110 | 110 | if ($isFullDatabaseDrop) { |
| 111 | 111 | $sqls = $schemaTool->getDropDatabaseSQL(); |
@@ -71,9 +71,9 @@ |
||
| 71 | 71 | { |
| 72 | 72 | if ($input->getOption('dump-sql')) { |
| 73 | 73 | $sqls = $schemaTool->getCreateSchemaSql($metadatas); |
| 74 | - $output->writeln(implode(';' . PHP_EOL, $sqls) . ';'); |
|
| 74 | + $output->writeln(implode(';'.PHP_EOL, $sqls).';'); |
|
| 75 | 75 | } else { |
| 76 | - $output->writeln('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL); |
|
| 76 | + $output->writeln('ATTENTION: This operation should not be executed in a production environment.'.PHP_EOL); |
|
| 77 | 77 | |
| 78 | 78 | $output->writeln('Creating database schema...'); |
| 79 | 79 | $schemaTool->createSchema($metadatas); |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | $force = true === $input->getOption('force'); |
| 123 | 123 | |
| 124 | 124 | if ($dumpSql) { |
| 125 | - $output->writeln(implode(';' . PHP_EOL, $sqls) . ';'); |
|
| 125 | + $output->writeln(implode(';'.PHP_EOL, $sqls).';'); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | if ($force) { |
@@ -61,6 +61,6 @@ |
||
| 61 | 61 | $this->ownerIdentifier = $ownerIdentifier; |
| 62 | 62 | $this->entityClass = (string) $entityClass; |
| 63 | 63 | $this->association = (string) $association; |
| 64 | - $this->hash = str_replace('\\', '.', strtolower($entityClass)) . '_' . implode(' ', $ownerIdentifier) . '__' . $association; |
|
| 64 | + $this->hash = str_replace('\\', '.', strtolower($entityClass)).'_'.implode(' ', $ownerIdentifier).'__'.$association; |
|
| 65 | 65 | } |
| 66 | 66 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | protected function getCacheEntryKey(CacheKey $key) |
| 126 | 126 | { |
| 127 | - return $this->name . self::REGION_KEY_SEPARATOR . $key->hash; |
|
| 127 | + return $this->name.self::REGION_KEY_SEPARATOR.$key->hash; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | public function evictAll() |
| 150 | 150 | { |
| 151 | - if (! $this->cache instanceof ClearableCache) { |
|
| 151 | + if ( ! $this->cache instanceof ClearableCache) { |
|
| 152 | 152 | throw new \BadMethodCallException(sprintf( |
| 153 | 153 | 'Clearing all cache entries is not supported by the supplied cache adapter of type %s', |
| 154 | 154 | get_class($this->cache) |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | public function __construct($value, $time = null) |
| 46 | 46 | { |
| 47 | 47 | $this->value = $value; |
| 48 | - $this->time = $time ? : time(); |
|
| 48 | + $this->time = $time ?: time(); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -38,9 +38,9 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | class DefaultQueryCache implements QueryCache |
| 40 | 40 | { |
| 41 | - /** |
|
| 42 | - * @var \Shitty\ORM\EntityManagerInterface |
|
| 43 | - */ |
|
| 41 | + /** |
|
| 42 | + * @var \Shitty\ORM\EntityManagerInterface |
|
| 43 | + */ |
|
| 44 | 44 | private $em; |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | |
| 131 | 131 | if ( ! $hasRelation) { |
| 132 | 132 | |
| 133 | - $result[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints); |
|
| 133 | + $result[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints); |
|
| 134 | 134 | |
| 135 | 135 | continue; |
| 136 | 136 | } |