@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
| 6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function testIssue2059() |
| 32 | 32 | { |
| 33 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 33 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 34 | 34 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | public function testLoadMetadataFromDatabase() |
| 54 | 54 | { |
| 55 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 55 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 56 | 56 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | public function testLoadMetadataWithForeignKeyFromDatabase() |
| 92 | 92 | { |
| 93 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 93 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 94 | 94 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | public function testDetectManyToManyTables() |
| 125 | 125 | { |
| 126 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 126 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 127 | 127 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 128 | 128 | } |
| 129 | 129 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | public function testLoadMetadataFromDatabaseDetail() |
| 165 | 165 | { |
| 166 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 166 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 167 | 167 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 168 | 168 | } |
| 169 | 169 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | // FIXME: Condition here is fugly. |
| 204 | 204 | // NOTE: PostgreSQL and SQL SERVER do not support UNSIGNED integer |
| 205 | - if (! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform and |
|
| 205 | + if ( ! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform and |
|
| 206 | 206 | ! $this->em->getConnection()->getDatabasePlatform() instanceof SQLServerPlatform) { |
| 207 | 207 | self::assertNotNull($metadata->getProperty('columnUnsigned')); |
| 208 | 208 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | self::assertNotEmpty($indexes['index1']['columns']); |
| 246 | 246 | self::assertEquals( |
| 247 | - ['column_index1','column_index2'], |
|
| 247 | + ['column_index1', 'column_index2'], |
|
| 248 | 248 | $indexes['index1']['columns'] |
| 249 | 249 | ); |
| 250 | 250 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
| 6 | 6 | |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | public function testCanRetrieveRepositoryFromClassNameWithLeadingBackslash() |
| 612 | 612 | { |
| 613 | 613 | self::assertSame( |
| 614 | - $this->em->getRepository('\\' . CmsUser::class), |
|
| 614 | + $this->em->getRepository('\\'.CmsUser::class), |
|
| 615 | 615 | $this->em->getRepository(CmsUser::class) |
| 616 | 616 | ); |
| 617 | 617 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Mapping; |
| 6 | 6 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | use Doctrine\Tests\OrmTestCase; |
| 29 | 29 | use DoctrineGlobal_Article; |
| 30 | 30 | |
| 31 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 31 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 32 | 32 | |
| 33 | 33 | class ClassMetadataTest extends OrmTestCase |
| 34 | 34 | { |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function testMapAssociationInGlobalNamespace() |
| 175 | 175 | { |
| 176 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 176 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 177 | 177 | |
| 178 | 178 | $cm = new ClassMetadata(DoctrineGlobal_Article::class, $this->metadataBuildingContext); |
| 179 | 179 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_article')); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | */ |
| 270 | 270 | public function testSetDiscriminatorMapInGlobalNamespace() |
| 271 | 271 | { |
| 272 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 272 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 273 | 273 | |
| 274 | 274 | $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext); |
| 275 | 275 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | */ |
| 286 | 286 | public function testSetSubClassesInGlobalNamespace() |
| 287 | 287 | { |
| 288 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 288 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 289 | 289 | |
| 290 | 290 | $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext); |
| 291 | 291 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -799,7 +799,7 @@ discard block |
||
| 799 | 799 | public function testEmptyFieldNameThrowsException() |
| 800 | 800 | { |
| 801 | 801 | $this->expectException(MappingException::class); |
| 802 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
| 802 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
| 803 | 803 | |
| 804 | 804 | $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
| 805 | 805 | $cm->setTable(new Mapping\TableMetadata('cms_users')); |
@@ -1093,7 +1093,7 @@ discard block |
||
| 1093 | 1093 | $cm->addLifecycleCallback('notfound', 'postLoad'); |
| 1094 | 1094 | |
| 1095 | 1095 | $this->expectException(MappingException::class); |
| 1096 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback."); |
|
| 1096 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback."); |
|
| 1097 | 1097 | |
| 1098 | 1098 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
| 1099 | 1099 | } |
@@ -1113,7 +1113,7 @@ discard block |
||
| 1113 | 1113 | $cm->addProperty($association); |
| 1114 | 1114 | |
| 1115 | 1115 | $this->expectException(MappingException::class); |
| 1116 | - $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
| 1116 | + $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'."); |
|
| 1117 | 1117 | |
| 1118 | 1118 | $cm->validateAssociations(); |
| 1119 | 1119 | } |
@@ -1382,6 +1382,6 @@ discard block |
||
| 1382 | 1382 | */ |
| 1383 | 1383 | public function propertyToColumnName($propertyName, $className = null) |
| 1384 | 1384 | { |
| 1385 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
| 1385 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
| 1386 | 1386 | } |
| 1387 | 1387 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\Models\DDC3231; |
| 6 | 6 | use Doctrine\ORM\EntityRepository; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests; |
| 6 | 6 | |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | $conn = static::$sharedConn; |
| 335 | 335 | |
| 336 | 336 | // In case test is skipped, tearDown is called, but no setup may have run |
| 337 | - if (! $conn) { |
|
| 337 | + if ( ! $conn) { |
|
| 338 | 338 | return; |
| 339 | 339 | } |
| 340 | 340 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | } |
| 409 | 409 | |
| 410 | 410 | if (isset($this->usedModelSets['directorytree'])) { |
| 411 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file')); |
|
| 411 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file')); |
|
| 412 | 412 | // MySQL doesn't know deferred deletions therefore only executing the second query gives errors. |
| 413 | 413 | $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL'); |
| 414 | 414 | $conn->executeUpdate('DELETE FROM Directory'); |
@@ -501,12 +501,12 @@ discard block |
||
| 501 | 501 | ) |
| 502 | 502 | ); |
| 503 | 503 | |
| 504 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups')); |
|
| 505 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group')); |
|
| 506 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone')); |
|
| 507 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user')); |
|
| 508 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address')); |
|
| 509 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city')); |
|
| 504 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups')); |
|
| 505 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group')); |
|
| 506 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone')); |
|
| 507 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user')); |
|
| 508 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address')); |
|
| 509 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city')); |
|
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | if (isset($this->usedModelSets['vct_onetoone'])) { |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | $classes = []; |
| 620 | 620 | |
| 621 | 621 | foreach ($classNames as $className) { |
| 622 | - if (! isset(static::$entityTablesCreated[$className])) { |
|
| 622 | + if ( ! isset(static::$entityTablesCreated[$className])) { |
|
| 623 | 623 | static::$entityTablesCreated[$className] = true; |
| 624 | 624 | $classes[] = $this->em->getClassMetadata($className); |
| 625 | 625 | } |
@@ -639,25 +639,25 @@ discard block |
||
| 639 | 639 | { |
| 640 | 640 | $this->setUpDBALTypes(); |
| 641 | 641 | |
| 642 | - if (! isset(static::$sharedConn)) { |
|
| 642 | + if ( ! isset(static::$sharedConn)) { |
|
| 643 | 643 | static::$sharedConn = TestUtil::getConnection(); |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) { |
| 647 | 647 | if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) { |
| 648 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/'); |
|
| 648 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/'); |
|
| 649 | 649 | } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') { |
| 650 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual'); |
|
| 650 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/ FROM dual'); |
|
| 651 | 651 | } |
| 652 | 652 | } |
| 653 | 653 | |
| 654 | - if (! $this->em) { |
|
| 654 | + if ( ! $this->em) { |
|
| 655 | 655 | $this->em = $this->getEntityManager(); |
| 656 | 656 | $this->schemaTool = new SchemaTool($this->em); |
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | foreach ($this->usedModelSets as $setName => $bool) { |
| 660 | - if (! isset(static::$tablesCreated[$setName])) { |
|
| 660 | + if ( ! isset(static::$tablesCreated[$setName])) { |
|
| 661 | 661 | $this->setUpEntitySchema(static::$modelSets[$setName]); |
| 662 | 662 | |
| 663 | 663 | static::$tablesCreated[$setName] = true; |
@@ -732,8 +732,8 @@ discard block |
||
| 732 | 732 | |
| 733 | 733 | $config->setMetadataDriverImpl( |
| 734 | 734 | $mappingDriver ?? $config->newDefaultAnnotationDriver([ |
| 735 | - realpath(__DIR__ . '/Models/Cache'), |
|
| 736 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
| 735 | + realpath(__DIR__.'/Models/Cache'), |
|
| 736 | + realpath(__DIR__.'/Models/GeoNames'), |
|
| 737 | 737 | ]) |
| 738 | 738 | ); |
| 739 | 739 | |
@@ -783,13 +783,13 @@ discard block |
||
| 783 | 783 | |
| 784 | 784 | foreach ($last25queries as $i => $query) { |
| 785 | 785 | $params = array_map( |
| 786 | - function ($p) { |
|
| 786 | + function($p) { |
|
| 787 | 787 | return is_object($p) ? get_class($p) : var_export($p, true); |
| 788 | 788 | }, |
| 789 | 789 | $query['params'] ?: [] |
| 790 | 790 | ); |
| 791 | 791 | |
| 792 | - $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL; |
|
| 792 | + $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL; |
|
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | $trace = $e->getTrace(); |
@@ -802,11 +802,11 @@ discard block |
||
| 802 | 802 | break; |
| 803 | 803 | } |
| 804 | 804 | |
| 805 | - $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL; |
|
| 805 | + $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL; |
|
| 806 | 806 | } |
| 807 | 807 | } |
| 808 | 808 | |
| 809 | - $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg; |
|
| 809 | + $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg; |
|
| 810 | 810 | |
| 811 | 811 | throw new \Exception($message, (int) $e->getCode(), $e); |
| 812 | 812 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Mapping; |
| 6 | 6 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | protected function loadDriver() |
| 21 | 21 | { |
| 22 | - return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml'); |
|
| 22 | + return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function testClassTableInheritanceDiscriminatorMap() |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | public function testValidateXmlSchema($xmlMappingFile) |
| 164 | 164 | { |
| 165 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
| 165 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
| 166 | 166 | $dom = new \DOMDocument('UTF-8'); |
| 167 | 167 | |
| 168 | 168 | $dom->load($xmlMappingFile); |
@@ -172,14 +172,14 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | public static function dataValidSchema() |
| 174 | 174 | { |
| 175 | - $list = glob(__DIR__ . '/xml/*.xml'); |
|
| 175 | + $list = glob(__DIR__.'/xml/*.xml'); |
|
| 176 | 176 | $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm']; |
| 177 | 177 | |
| 178 | - $list = array_filter($list, function ($item) use ($invalid) { |
|
| 178 | + $list = array_filter($list, function($item) use ($invalid) { |
|
| 179 | 179 | return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true); |
| 180 | 180 | }); |
| 181 | 181 | |
| 182 | - return array_map(function ($item) { |
|
| 182 | + return array_map(function($item) { |
|
| 183 | 183 | return [$item]; |
| 184 | 184 | }, $list); |
| 185 | 185 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional\Locking; |
| 6 | 6 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | while ($worker->work()) { |
| 30 | 30 | if ($worker->returnCode() != GEARMAN_SUCCESS) { |
| 31 | - echo 'return_code: ' . $worker->returnCode() . "\n"; |
|
| 31 | + echo 'return_code: '.$worker->returnCode()."\n"; |
|
| 32 | 32 | break; |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -53,14 +53,14 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function findWithLock($job) |
| 55 | 55 | { |
| 56 | - return $this->process($job, function ($fixture, $em) { |
|
| 56 | + return $this->process($job, function($fixture, $em) { |
|
| 57 | 57 | $entity = $em->find($fixture['entityName'], $fixture['entityId'], $fixture['lockMode']); |
| 58 | 58 | }); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public function dqlWithLock($job) |
| 62 | 62 | { |
| 63 | - return $this->process($job, function ($fixture, $em) { |
|
| 63 | + return $this->process($job, function($fixture, $em) { |
|
| 64 | 64 | /* @var $query Doctrine\ORM\Query */ |
| 65 | 65 | $query = $em->createQuery($fixture['dql']); |
| 66 | 66 | $query->setLockMode($fixture['lockMode']); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | public function lock($job) |
| 73 | 73 | { |
| 74 | - return $this->process($job, function ($fixture, $em) { |
|
| 74 | + return $this->process($job, function($fixture, $em) { |
|
| 75 | 75 | $entity = $em->find($fixture['entityName'], $fixture['entityId']); |
| 76 | 76 | $em->lock($entity, $fixture['lockMode']); |
| 77 | 77 | }); |
@@ -79,18 +79,18 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | protected function processWorkload($job) |
| 81 | 81 | { |
| 82 | - echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n"; |
|
| 82 | + echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n"; |
|
| 83 | 83 | |
| 84 | 84 | $workload = $job->workload(); |
| 85 | 85 | $workload = unserialize($workload); |
| 86 | 86 | |
| 87 | - if (! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
| 87 | + if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
| 88 | 88 | throw new \InvalidArgumentException('Missing Database parameters'); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $this->em = $this->createEntityManager($workload['conn']); |
| 92 | 92 | |
| 93 | - if (! isset($workload['fixture'])) { |
|
| 93 | + if ( ! isset($workload['fixture'])) { |
|
| 94 | 94 | throw new \InvalidArgumentException('Missing Fixture parameters'); |
| 95 | 95 | } |
| 96 | 96 | return $workload['fixture']; |
@@ -99,11 +99,11 @@ discard block |
||
| 99 | 99 | protected function createEntityManager($conn) |
| 100 | 100 | { |
| 101 | 101 | $config = new Configuration(); |
| 102 | - $config->setProxyDir(__DIR__ . '/../../../Proxies'); |
|
| 102 | + $config->setProxyDir(__DIR__.'/../../../Proxies'); |
|
| 103 | 103 | $config->setProxyNamespace('MyProject\Proxies'); |
| 104 | 104 | $config->setAutoGenerateProxyClasses(true); |
| 105 | 105 | |
| 106 | - $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']); |
|
| 106 | + $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']); |
|
| 107 | 107 | $config->setMetadataDriverImpl($annotDriver); |
| 108 | 108 | |
| 109 | 109 | $cache = new ArrayCache(); |
@@ -40,6 +40,6 @@ |
||
| 40 | 40 | public function assertCollectionEquals(Collection $first, Collection $second) |
| 41 | 41 | { |
| 42 | 42 | return $first->forAll(function ($k, $e) use ($second) { |
| 43 | - return $second->contains($e); }); |
|
| 43 | + return $second->contains($e); }); |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
| 6 | 6 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function assertCollectionEquals(Collection $first, Collection $second) |
| 41 | 41 | { |
| 42 | - return $first->forAll(function ($k, $e) use ($second) { |
|
| 42 | + return $first->forAll(function($k, $e) use ($second) { |
|
| 43 | 43 | return $second->contains($e); }); |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
| 6 | 6 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use Doctrine\Tests\Models\CMS\CmsUser; |
| 14 | 14 | use Doctrine\Tests\OrmFunctionalTestCase; |
| 15 | 15 | |
| 16 | -require_once __DIR__ . '/../../TestInit.php'; |
|
| 16 | +require_once __DIR__.'/../../TestInit.php'; |
|
| 17 | 17 | |
| 18 | 18 | class CustomFunctionsTest extends OrmFunctionalTestCase |
| 19 | 19 | { |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | $this->em->flush(); |
| 34 | 34 | |
| 35 | 35 | // Instead of defining the function with the class name, we use a callback |
| 36 | - $this->em->getConfiguration()->addCustomStringFunction('FOO', function ($funcName) { |
|
| 36 | + $this->em->getConfiguration()->addCustomStringFunction('FOO', function($funcName) { |
|
| 37 | 37 | return new NoOp($funcName); |
| 38 | 38 | }); |
| 39 | - $this->em->getConfiguration()->addCustomNumericFunction('BAR', function ($funcName) { |
|
| 39 | + $this->em->getConfiguration()->addCustomNumericFunction('BAR', function($funcName) { |
|
| 40 | 40 | return new NoOp($funcName); |
| 41 | 41 | }); |
| 42 | 42 | |