@@ -225,8 +225,8 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | public function transactional($func) |
| 227 | 227 | { |
| 228 | - if (!is_callable($func)) { |
|
| 229 | - throw new \InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"'); |
|
| 228 | + if ( ! is_callable($func)) { |
|
| 229 | + throw new \InvalidArgumentException('Expected argument of type "callable", got "'.gettype($func).'"'); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | $this->conn->beginTransaction(); |
@@ -762,7 +762,7 @@ discard block |
||
| 762 | 762 | */ |
| 763 | 763 | public function isOpen() |
| 764 | 764 | { |
| 765 | - return (!$this->closed); |
|
| 765 | + return ( ! $this->closed); |
|
| 766 | 766 | } |
| 767 | 767 | |
| 768 | 768 | /** |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | sprintf( |
| 874 | 874 | 'Invalid $connection argument of type %s given%s.', |
| 875 | 875 | is_object($connection) ? get_class($connection) : gettype($connection), |
| 876 | - is_object($connection) ? '' : ': "' . $connection . '"' |
|
| 876 | + is_object($connection) ? '' : ': "'.$connection.'"' |
|
| 877 | 877 | ) |
| 878 | 878 | ); |
| 879 | 879 | } |
@@ -923,13 +923,13 @@ discard block |
||
| 923 | 923 | { |
| 924 | 924 | switch ($lockMode) { |
| 925 | 925 | case LockMode::OPTIMISTIC: |
| 926 | - if (!$class->isVersioned) { |
|
| 926 | + if ( ! $class->isVersioned) { |
|
| 927 | 927 | throw OptimisticLockException::notVersioned($class->name); |
| 928 | 928 | } |
| 929 | 929 | // Intentional fallthrough |
| 930 | 930 | case LockMode::PESSIMISTIC_READ: |
| 931 | 931 | case LockMode::PESSIMISTIC_WRITE: |
| 932 | - if (!$this->getConnection()->isTransactionActive()) { |
|
| 932 | + if ( ! $this->getConnection()->isTransactionActive()) { |
|
| 933 | 933 | throw TransactionRequiredException::transactionRequired(); |
| 934 | 934 | } |
| 935 | 935 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $this->addToAssertionCount(1); |
| 28 | 28 | } catch (QueryException $e) { |
| 29 | 29 | if ($debug) { |
| 30 | - echo $e->getTraceAsString() . PHP_EOL; |
|
| 30 | + echo $e->getTraceAsString().PHP_EOL; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | $this->fail($e->getMessage()); |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | $this->fail('No syntax errors were detected, when syntax errors were expected'); |
| 43 | 43 | } catch (QueryException $e) { |
| 44 | 44 | if ($debug) { |
| 45 | - echo $e->getMessage() . PHP_EOL; |
|
| 46 | - echo $e->getTraceAsString() . PHP_EOL; |
|
| 45 | + echo $e->getMessage().PHP_EOL; |
|
| 46 | + echo $e->getTraceAsString().PHP_EOL; |
|
| 47 | 47 | } |
| 48 | 48 | $this->addToAssertionCount(1); |
| 49 | 49 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'], |
| 113 | 113 | |
| 114 | 114 | /* Checks for invalid AbstractSchemaName */ |
| 115 | - ['SELECT u FROM UnknownClass u'], // unknown |
|
| 115 | + ['SELECT u FROM UnknownClass u'], // unknown |
|
| 116 | 116 | ['SELECT u FROM Unknown\Class u'], // unknown with namespace |
| 117 | 117 | ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash |
| 118 | 118 | ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\) |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | */ |
| 586 | 586 | public function testDQLKeywordInJoinIsAllowed() |
| 587 | 587 | { |
| 588 | - $this->assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g'); |
|
| 588 | + $this->assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g'); |
|
| 589 | 589 | } |
| 590 | 590 | |
| 591 | 591 | /** |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | */ |
| 594 | 594 | public function testDQLKeywordInConditionIsAllowed() |
| 595 | 595 | { |
| 596 | - $this->assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
| 596 | + $this->assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | /* The exception is currently thrown in the SQLWalker, not earlier. |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | */ |
| 699 | 699 | public function testNewLiteralExpression() |
| 700 | 700 | { |
| 701 | - $this->assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 701 | + $this->assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 702 | 702 | } |
| 703 | 703 | |
| 704 | 704 | /** |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | */ |
| 707 | 707 | public function testNewLiteralWithSubselectExpression() |
| 708 | 708 | { |
| 709 | - $this->assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 709 | + $this->assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 710 | 710 | } |
| 711 | 711 | |
| 712 | 712 | public function testStringPrimaryAcceptsAggregateExpression() : void |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $query = $this->_em->createQuery( |
| 38 | 38 | 'SELECT CONCAT(e.type, MIN(e.version)) pair' |
| 39 | - . ' FROM ' . GH7286Entity::class . ' e' |
|
| 39 | + . ' FROM '.GH7286Entity::class.' e' |
|
| 40 | 40 | . ' WHERE e.type IS NOT NULL' |
| 41 | 41 | . ' GROUP BY e.type' |
| 42 | 42 | . ' ORDER BY e.type' |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | $query = $this->_em->createQuery( |
| 62 | 62 | 'SELECT CC(e.type, MIN(e.version)) pair' |
| 63 | - . ' FROM ' . GH7286Entity::class . ' e' |
|
| 63 | + . ' FROM '.GH7286Entity::class.' e' |
|
| 64 | 64 | . ' WHERE e.type IS NOT NULL AND e.type != :type' |
| 65 | 65 | . ' GROUP BY e.type' |
| 66 | 66 | ); |