@@ -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 | } |