@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $conn = static::$sharedConn; |
347 | 347 | |
348 | 348 | // In case test is skipped, tearDown is called, but no setup may have run |
349 | - if (! $conn) { |
|
349 | + if ( ! $conn) { |
|
350 | 350 | return; |
351 | 351 | } |
352 | 352 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | if (isset($this->usedModelSets['directorytree'])) { |
423 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file')); |
|
423 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file')); |
|
424 | 424 | // MySQL doesn't know deferred deletions therefore only executing the second query gives errors. |
425 | 425 | $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL'); |
426 | 426 | $conn->executeUpdate('DELETE FROM Directory'); |
@@ -513,12 +513,12 @@ discard block |
||
513 | 513 | ) |
514 | 514 | ); |
515 | 515 | |
516 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups')); |
|
517 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group')); |
|
518 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone')); |
|
519 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user')); |
|
520 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address')); |
|
521 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city')); |
|
516 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups')); |
|
517 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group')); |
|
518 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone')); |
|
519 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user')); |
|
520 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address')); |
|
521 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city')); |
|
522 | 522 | } |
523 | 523 | |
524 | 524 | if (isset($this->usedModelSets['vct_onetoone'])) { |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | $classes = []; |
631 | 631 | |
632 | 632 | foreach ($classNames as $className) { |
633 | - if (! isset(static::$entityTablesCreated[$className])) { |
|
633 | + if ( ! isset(static::$entityTablesCreated[$className])) { |
|
634 | 634 | static::$entityTablesCreated[$className] = true; |
635 | 635 | $classes[] = $this->em->getClassMetadata($className); |
636 | 636 | } |
@@ -649,25 +649,25 @@ discard block |
||
649 | 649 | { |
650 | 650 | $this->setUpDBALTypes(); |
651 | 651 | |
652 | - if (! isset(static::$sharedConn)) { |
|
652 | + if ( ! isset(static::$sharedConn)) { |
|
653 | 653 | static::$sharedConn = TestUtil::getConnection(); |
654 | 654 | } |
655 | 655 | |
656 | 656 | if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) { |
657 | 657 | if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) { |
658 | - static::$sharedConn->executeQuery('SELECT 1 /*' . static::class . '*/'); |
|
658 | + static::$sharedConn->executeQuery('SELECT 1 /*'.static::class.'*/'); |
|
659 | 659 | } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') { |
660 | - static::$sharedConn->executeQuery('SELECT 1 /*' . static::class . '*/ FROM dual'); |
|
660 | + static::$sharedConn->executeQuery('SELECT 1 /*'.static::class.'*/ FROM dual'); |
|
661 | 661 | } |
662 | 662 | } |
663 | 663 | |
664 | - if (! $this->em) { |
|
664 | + if ( ! $this->em) { |
|
665 | 665 | $this->em = $this->getEntityManager(); |
666 | 666 | $this->schemaTool = new SchemaTool($this->em); |
667 | 667 | } |
668 | 668 | |
669 | 669 | foreach ($this->usedModelSets as $setName => $bool) { |
670 | - if (! isset(static::$tablesCreated[$setName])) { |
|
670 | + if ( ! isset(static::$tablesCreated[$setName])) { |
|
671 | 671 | $this->setUpEntitySchema(static::$modelSets[$setName]); |
672 | 672 | |
673 | 673 | static::$tablesCreated[$setName] = true; |
@@ -742,8 +742,8 @@ discard block |
||
742 | 742 | |
743 | 743 | $config->setMetadataDriverImpl( |
744 | 744 | $mappingDriver ?? $config->newDefaultAnnotationDriver([ |
745 | - realpath(__DIR__ . '/Models/Cache'), |
|
746 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
745 | + realpath(__DIR__.'/Models/Cache'), |
|
746 | + realpath(__DIR__.'/Models/GeoNames'), |
|
747 | 747 | ]) |
748 | 748 | ); |
749 | 749 | |
@@ -791,13 +791,13 @@ discard block |
||
791 | 791 | |
792 | 792 | foreach ($last25queries as $i => $query) { |
793 | 793 | $params = array_map( |
794 | - static function ($p) { |
|
794 | + static function($p) { |
|
795 | 795 | return is_object($p) ? get_class($p) : var_export($p, true); |
796 | 796 | }, |
797 | 797 | $query['params'] ?: [] |
798 | 798 | ); |
799 | 799 | |
800 | - $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL; |
|
800 | + $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL; |
|
801 | 801 | } |
802 | 802 | |
803 | 803 | $trace = $e->getTrace(); |
@@ -810,11 +810,11 @@ discard block |
||
810 | 810 | break; |
811 | 811 | } |
812 | 812 | |
813 | - $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL; |
|
813 | + $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL; |
|
814 | 814 | } |
815 | 815 | } |
816 | 816 | |
817 | - $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg; |
|
817 | + $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg; |
|
818 | 818 | |
819 | 819 | throw new Exception($message, (int) $e->getCode(), $e); |
820 | 820 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | foreach ($data as $columnName => $value) { |
112 | - if (! is_array($id) || ! isset($id[$columnName])) { |
|
112 | + if ( ! is_array($id) || ! isset($id[$columnName])) { |
|
113 | 113 | $type = $this->columns[$columnName]->getType(); |
114 | 114 | |
115 | 115 | $stmt->bindValue($paramIndex++, $value, $type); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | $updateData = $this->prepareUpdateData($entity); |
135 | 135 | |
136 | - if (! $updateData) { |
|
136 | + if ( ! $updateData) { |
|
137 | 137 | return; |
138 | 138 | } |
139 | 139 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $versionedClass = $this->class->versionProperty->getDeclaringClass(); |
152 | 152 | $versionedTable = $versionedClass->getTableName(); |
153 | 153 | |
154 | - if (! isset($updateData[$versionedTable])) { |
|
154 | + if ( ! isset($updateData[$versionedTable])) { |
|
155 | 155 | $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform); |
156 | 156 | |
157 | 157 | $this->updateTable($entity, $tableName, [], true); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | if ($filterSql) { |
234 | 234 | $conditionSql .= $conditionSql |
235 | - ? ' AND ' . $filterSql |
|
235 | + ? ' AND '.$filterSql |
|
236 | 236 | : $filterSql; |
237 | 237 | } |
238 | 238 | |
@@ -240,26 +240,26 @@ discard block |
||
240 | 240 | |
241 | 241 | switch ($lockMode) { |
242 | 242 | case LockMode::PESSIMISTIC_READ: |
243 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
243 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
244 | 244 | break; |
245 | 245 | |
246 | 246 | case LockMode::PESSIMISTIC_WRITE: |
247 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
247 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
248 | 248 | break; |
249 | 249 | } |
250 | 250 | |
251 | 251 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
252 | - $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; |
|
253 | - $where = $conditionSql !== '' ? ' WHERE ' . $conditionSql : ''; |
|
252 | + $from = ' FROM '.$tableName.' '.$baseTableAlias; |
|
253 | + $where = $conditionSql !== '' ? ' WHERE '.$conditionSql : ''; |
|
254 | 254 | $lock = $this->platform->appendLockHint($from, $lockMode); |
255 | 255 | $columnList = $this->getSelectColumnsSQL(); |
256 | - $query = 'SELECT ' . $columnList |
|
256 | + $query = 'SELECT '.$columnList |
|
257 | 257 | . $lock |
258 | 258 | . $joinSql |
259 | 259 | . $where |
260 | 260 | . $orderBySql; |
261 | 261 | |
262 | - return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql; |
|
262 | + return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql; |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |
@@ -281,14 +281,14 @@ discard block |
||
281 | 281 | |
282 | 282 | if ($filterSql !== '') { |
283 | 283 | $conditionSql = $conditionSql |
284 | - ? $conditionSql . ' AND ' . $filterSql |
|
284 | + ? $conditionSql.' AND '.$filterSql |
|
285 | 285 | : $filterSql; |
286 | 286 | } |
287 | 287 | |
288 | 288 | return 'SELECT COUNT(*) ' |
289 | - . 'FROM ' . $tableName . ' ' . $baseTableAlias |
|
289 | + . 'FROM '.$tableName.' '.$baseTableAlias |
|
290 | 290 | . $joinSql |
291 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
291 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
@@ -307,18 +307,18 @@ discard block |
||
307 | 307 | $conditions = []; |
308 | 308 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
309 | 309 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
310 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
310 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
311 | 311 | |
312 | 312 | foreach ($identifierColumns as $idColumn) { |
313 | 313 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
314 | 314 | |
315 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
315 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | $joinSql .= implode(' AND ', $conditions); |
319 | 319 | } |
320 | 320 | |
321 | - return parent::getLockTablesSql($lockMode) . $joinSql; |
|
321 | + return parent::getLockTablesSql($lockMode).$joinSql; |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | /** |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | continue; |
346 | 346 | } |
347 | 347 | |
348 | - if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
348 | + if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
349 | 349 | continue; |
350 | 350 | } |
351 | 351 | |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | /** @var JoinColumnMetadata $joinColumn */ |
356 | 356 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
357 | 357 | |
358 | - if (! $joinColumn->getType()) { |
|
358 | + if ( ! $joinColumn->getType()) { |
|
359 | 359 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
360 | 360 | } |
361 | 361 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
375 | 375 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
376 | 376 | |
377 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
377 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
378 | 378 | |
379 | 379 | // sub tables |
380 | 380 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | /** @var JoinColumnMetadata $joinColumn */ |
399 | 399 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
400 | 400 | |
401 | - if (! $joinColumn->getType()) { |
|
401 | + if ( ! $joinColumn->getType()) { |
|
402 | 402 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
403 | 403 | } |
404 | 404 | |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | $columnName = $joinColumn->getColumnName(); |
449 | 449 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
450 | 450 | |
451 | - if (! $joinColumn->getType()) { |
|
451 | + if ( ! $joinColumn->getType()) { |
|
452 | 452 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
453 | 453 | } |
454 | 454 | |
@@ -504,12 +504,12 @@ discard block |
||
504 | 504 | $conditions = []; |
505 | 505 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
506 | 506 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
507 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
507 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
508 | 508 | |
509 | 509 | foreach ($identifierColumns as $idColumn) { |
510 | 510 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
511 | 511 | |
512 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
512 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
513 | 513 | } |
514 | 514 | |
515 | 515 | $joinSql .= implode(' AND ', $conditions); |
@@ -521,12 +521,12 @@ discard block |
||
521 | 521 | $subClass = $this->em->getClassMetadata($subClassName); |
522 | 522 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
523 | 523 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName()); |
524 | - $joinSql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
524 | + $joinSql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
525 | 525 | |
526 | 526 | foreach ($identifierColumns as $idColumn) { |
527 | 527 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
528 | 528 | |
529 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
529 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
530 | 530 | } |
531 | 531 | |
532 | 532 | $joinSql .= implode(' AND ', $conditions); |
@@ -33,13 +33,13 @@ |
||
33 | 33 | protected function configure() |
34 | 34 | { |
35 | 35 | $this->setName('orm:run-dql') |
36 | - ->setDescription('Executes arbitrary DQL directly from the command line') |
|
37 | - ->addArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.') |
|
38 | - ->addOption('hydrate', null, InputOption::VALUE_REQUIRED, 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', 'object') |
|
39 | - ->addOption('first-result', null, InputOption::VALUE_REQUIRED, 'The first result in the result set.') |
|
40 | - ->addOption('max-result', null, InputOption::VALUE_REQUIRED, 'The maximum number of results in the result set.') |
|
41 | - ->addOption('show-sql', null, InputOption::VALUE_NONE, 'Dump generated SQL instead of executing query') |
|
42 | - ->setHelp('Executes arbitrary DQL directly from the command line.'); |
|
36 | + ->setDescription('Executes arbitrary DQL directly from the command line') |
|
37 | + ->addArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.') |
|
38 | + ->addOption('hydrate', null, InputOption::VALUE_REQUIRED, 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', 'object') |
|
39 | + ->addOption('first-result', null, InputOption::VALUE_REQUIRED, 'The first result in the result set.') |
|
40 | + ->addOption('max-result', null, InputOption::VALUE_REQUIRED, 'The maximum number of results in the result set.') |
|
41 | + ->addOption('show-sql', null, InputOption::VALUE_NONE, 'Dump generated SQL instead of executing query') |
|
42 | + ->setHelp('Executes arbitrary DQL directly from the command line.'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | $hydrationModeName = $input->getOption('hydrate'); |
61 | - $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationModeName)); |
|
61 | + $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_'.strtoupper(str_replace('-', '_', $hydrationModeName)); |
|
62 | 62 | |
63 | - if (! defined($hydrationMode)) { |
|
63 | + if ( ! defined($hydrationMode)) { |
|
64 | 64 | throw new RuntimeException(sprintf( |
65 | 65 | "Hydration mode '%s' does not exist. It should be either: object. array, scalar or single-scalar.", |
66 | 66 | $hydrationModeName |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $firstResult = $input->getOption('first-result'); |
72 | 72 | |
73 | 73 | if ($firstResult !== null) { |
74 | - if (! is_numeric($firstResult)) { |
|
74 | + if ( ! is_numeric($firstResult)) { |
|
75 | 75 | throw new LogicException("Option 'first-result' must contain an integer value"); |
76 | 76 | } |
77 | 77 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $maxResult = $input->getOption('max-result'); |
82 | 82 | |
83 | 83 | if ($maxResult !== null) { |
84 | - if (! is_numeric($maxResult)) { |
|
84 | + if ( ! is_numeric($maxResult)) { |
|
85 | 85 | throw new LogicException("Option 'max-result' must contain an integer value"); |
86 | 86 | } |
87 | 87 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $resultSet = $query->execute([], constant($hydrationMode)); |
97 | 97 | |
98 | - $dumper = new CliDumper(static function (string $payload) use ($output) : void { |
|
98 | + $dumper = new CliDumper(static function(string $payload) use ($output) : void { |
|
99 | 99 | $output->write($payload); |
100 | 100 | }); |
101 | 101 | $dumper->dump((new VarCloner())->cloneVar($resultSet)); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | $cache = self::createCacheInstance($isDevMode, $cache); |
88 | 88 | |
89 | - if (! $cache instanceof CacheProvider) { |
|
89 | + if ( ! $cache instanceof CacheProvider) { |
|
90 | 90 | return $cache; |
91 | 91 | } |
92 | 92 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $namespace .= ':'; |
97 | 97 | } |
98 | 98 | |
99 | - $cache->setNamespace($namespace . 'dc2_' . md5($proxyDir) . '_'); // to avoid collisions |
|
99 | + $cache->setNamespace($namespace.'dc2_'.md5($proxyDir).'_'); // to avoid collisions |
|
100 | 100 | |
101 | 101 | return $cache; |
102 | 102 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function tearDown() : void |
37 | 37 | { |
38 | - if (! $this->originalIncludePath) { |
|
38 | + if ( ! $this->originalIncludePath) { |
|
39 | 39 | return; |
40 | 40 | } |
41 | 41 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $config = Setup::createConfiguration(false, __DIR__); |
75 | 75 | $cache = $config->getMetadataCacheImpl(); |
76 | 76 | |
77 | - self::assertSame('dc2_' . md5(__DIR__) . '_', $cache->getNamespace()); |
|
77 | + self::assertSame('dc2_'.md5(__DIR__).'_', $cache->getNamespace()); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $config = Setup::createConfiguration(false, __DIR__, new ArrayCache()); |
86 | 86 | $cache = $config->getMetadataCacheImpl(); |
87 | 87 | |
88 | - self::assertSame('dc2_' . md5(__DIR__) . '_', $cache->getNamespace()); |
|
88 | + self::assertSame('dc2_'.md5(__DIR__).'_', $cache->getNamespace()); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $cache = $config->getMetadataCacheImpl(); |
101 | 101 | |
102 | 102 | self::assertSame($originalCache, $cache); |
103 | - self::assertSame('foo:dc2_' . md5(__DIR__) . '_', $cache->getNamespace()); |
|
103 | + self::assertSame('foo:dc2_'.md5(__DIR__).'_', $cache->getNamespace()); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -57,8 +57,8 @@ |
||
57 | 57 | $this->parsedQueryWithDeclaredParameterType = $entityManager->createQuery($dql); |
58 | 58 | |
59 | 59 | foreach (range(1, 10) as $index) { |
60 | - $this->parsedQueryWithInferredParameterType->setParameter('parameter' . $index, new DateTime()); |
|
61 | - $this->parsedQueryWithDeclaredParameterType->setParameter('parameter' . $index, new DateTime(), DateTimeType::DATETIME); |
|
60 | + $this->parsedQueryWithInferredParameterType->setParameter('parameter'.$index, new DateTime()); |
|
61 | + $this->parsedQueryWithDeclaredParameterType->setParameter('parameter'.$index, new DateTime(), DateTimeType::DATETIME); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | // Force parsing upfront - we don't benchmark that bit in this scenario |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function getDatabasePlatform() |
36 | 36 | { |
37 | - if (! $this->platformMock) { |
|
37 | + if ( ! $this->platformMock) { |
|
38 | 38 | $this->platformMock = new DatabasePlatformMock(); |
39 | 39 | } |
40 | 40 |
@@ -116,7 +116,7 @@ |
||
116 | 116 | public function quote($input, $type = null) |
117 | 117 | { |
118 | 118 | if (is_string($input)) { |
119 | - return "'" . $input . "'"; |
|
119 | + return "'".$input."'"; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | return $input; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | while ($worker->work()) { |
38 | 38 | if ($worker->returnCode() !== GEARMAN_SUCCESS) { |
39 | - echo 'return_code: ' . $worker->returnCode() . "\n"; |
|
39 | + echo 'return_code: '.$worker->returnCode()."\n"; |
|
40 | 40 | break; |
41 | 41 | } |
42 | 42 | } |
@@ -61,14 +61,14 @@ discard block |
||
61 | 61 | |
62 | 62 | public function findWithLock($job) |
63 | 63 | { |
64 | - return $this->process($job, static function ($fixture, $em) { |
|
64 | + return $this->process($job, static function($fixture, $em) { |
|
65 | 65 | $entity = $em->find($fixture['entityName'], $fixture['entityId'], $fixture['lockMode']); |
66 | 66 | }); |
67 | 67 | } |
68 | 68 | |
69 | 69 | public function dqlWithLock($job) |
70 | 70 | { |
71 | - return $this->process($job, static function ($fixture, $em) { |
|
71 | + return $this->process($job, static function($fixture, $em) { |
|
72 | 72 | /** @var Doctrine\ORM\Query $query */ |
73 | 73 | $query = $em->createQuery($fixture['dql']); |
74 | 74 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | public function lock($job) |
82 | 82 | { |
83 | - return $this->process($job, static function ($fixture, $em) { |
|
83 | + return $this->process($job, static function($fixture, $em) { |
|
84 | 84 | $entity = $em->find($fixture['entityName'], $fixture['entityId']); |
85 | 85 | |
86 | 86 | $em->lock($entity, $fixture['lockMode']); |
@@ -89,18 +89,18 @@ discard block |
||
89 | 89 | |
90 | 90 | protected function processWorkload($job) |
91 | 91 | { |
92 | - echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n"; |
|
92 | + echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n"; |
|
93 | 93 | |
94 | 94 | $workload = $job->workload(); |
95 | 95 | $workload = unserialize($workload); |
96 | 96 | |
97 | - if (! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
97 | + if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
98 | 98 | throw new InvalidArgumentException('Missing Database parameters'); |
99 | 99 | } |
100 | 100 | |
101 | 101 | $this->em = $this->createEntityManager($workload['conn']); |
102 | 102 | |
103 | - if (! isset($workload['fixture'])) { |
|
103 | + if ( ! isset($workload['fixture'])) { |
|
104 | 104 | throw new InvalidArgumentException('Missing Fixture parameters'); |
105 | 105 | } |
106 | 106 | |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | protected function createEntityManager($conn) |
111 | 111 | { |
112 | 112 | $config = new Configuration(); |
113 | - $config->setProxyDir(__DIR__ . '/../../../Proxies'); |
|
113 | + $config->setProxyDir(__DIR__.'/../../../Proxies'); |
|
114 | 114 | $config->setProxyNamespace('MyProject\Proxies'); |
115 | 115 | $config->setAutoGenerateProxyClasses(true); |
116 | 116 | |
117 | - $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']); |
|
117 | + $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']); |
|
118 | 118 | $config->setMetadataDriverImpl($annotDriver); |
119 | 119 | |
120 | 120 | $cache = new ArrayCache(); |