Failed Conditions
Pull Request — 2.7 (#7857)
by Luís
08:08
created
lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 [$pathExpression]
109 109
             );
110 110
             $expression = new InExpression($arithmeticExpression);
111
-            $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS);
111
+            $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS);
112 112
 
113 113
             $this->convertWhereInIdentifiersToDatabaseValue(
114 114
                 PersisterHelper::getTypeOfField(
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             ->getEntityManager()
178 178
             ->getConnection();
179 179
 
180
-        $query->setParameter(self::PAGINATOR_ID_ALIAS, array_map(static function ($id) use ($connection, $type) {
180
+        $query->setParameter(self::PAGINATOR_ID_ALIAS, array_map(static function($id) use ($connection, $type) {
181 181
             return $connection->convertToDatabaseValue($id, $type);
182 182
         }, $identifiers));
183 183
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/GH5988Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         parent::setUp();
23 23
 
24
-        if (! DBALType::hasType(GH5988CustomIdObjectHashType::class)) {
24
+        if ( ! DBALType::hasType(GH5988CustomIdObjectHashType::class)) {
25 25
             DBALType::addType(GH5988CustomIdObjectHashType::class, GH5988CustomIdObjectHashType::class);
26 26
         }
27 27
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
56 56
     {
57
-        return $value->id . '_test';
57
+        return $value->id.'_test';
58 58
     }
59 59
     /**
60 60
      * {@inheritdoc}
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2138Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function testForeignKeyOnSTIWithMultipleMapping()
15 15
     {
16 16
         $em = $this->_em;
17
-        if (! $em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
17
+        if ( ! $em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
18 18
             $this->markTestSkipped('Platform does not support foreign keys.');
19 19
         }
20 20
         $schemaTool = new SchemaTool($em);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaTool.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                             $targetEntity = current(
226 226
                                 array_filter(
227 227
                                     $classes,
228
-                                    function (ClassMetadata $class) use ($idMapping) : bool {
228
+                                    function(ClassMetadata $class) use ($idMapping) : bool {
229 229
                                         return $class->name === $idMapping['targetEntity'];
230 230
                                     }
231 231
                                 )
@@ -645,8 +645,8 @@  discard block
 block discarded – undo
645 645
 
646 646
             if ( ! $definingClass) {
647 647
                 throw new \Doctrine\ORM\ORMException(
648
-                    'Column name `' . $joinColumn['referencedColumnName'] . '` referenced for relation from '
649
-                    . $mapping['sourceEntity'] . ' towards ' . $mapping['targetEntity'] . ' does not exist.'
648
+                    'Column name `'.$joinColumn['referencedColumnName'].'` referenced for relation from '
649
+                    . $mapping['sourceEntity'].' towards '.$mapping['targetEntity'].' does not exist.'
650 650
                 );
651 651
             }
652 652
 
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 
711 711
         $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns);
712 712
 
713
-        if (! $this->platform->supportsForeignKeyConstraints()) {
713
+        if ( ! $this->platform->supportsForeignKeyConstraints()) {
714 714
             return;
715 715
         }
716 716
 
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
      */
747 747
     private function gatherColumnOptions(array $mapping) : array
748 748
     {
749
-        if (! isset($mapping['options'])) {
749
+        if ( ! isset($mapping['options'])) {
750 750
             return [];
751 751
         }
752 752
 
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
                 if ($table->hasPrimaryKey()) {
853 853
                     $columns = $table->getPrimaryKey()->getColumns();
854 854
                     if (count($columns) == 1) {
855
-                        $checkSequence = $table->getName() . '_' . $columns[0] . '_seq';
855
+                        $checkSequence = $table->getName().'_'.$columns[0].'_seq';
856 856
                         if ($fullSchema->hasSequence($checkSequence)) {
857 857
                             $visitor->acceptSequence($fullSchema->getSequence($checkSequence));
858 858
                         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     protected function setUp() {
14 14
         parent::setUp();
15 15
         if ($this->_em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') {
16
-            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mysql.');
16
+            $this->markTestSkipped('The '.__CLASS__.' requires the use of mysql.');
17 17
         }
18 18
     }
19 19
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
         $sql = $tool->getCreateSchemaSql($classes);
33 33
         $collation = $this->getColumnCollationDeclarationSQL('utf8_unicode_ci');
34 34
 
35
-        $this->assertEquals('CREATE TABLE cms_groups (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(50) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[0]);
36
-        $this->assertEquals('CREATE TABLE cms_users (id INT AUTO_INCREMENT NOT NULL, email_id INT DEFAULT NULL, status VARCHAR(50) DEFAULT NULL, username VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_3AF03EC5F85E0677 (username), UNIQUE INDEX UNIQ_3AF03EC5A832C1C9 (email_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[1]);
37
-        $this->assertEquals('CREATE TABLE cms_users_groups (user_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_7EA9409AA76ED395 (user_id), INDEX IDX_7EA9409AFE54D947 (group_id), PRIMARY KEY(user_id, group_id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[2]);
38
-        $this->assertEquals('CREATE TABLE cms_users_tags (user_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_93F5A1ADA76ED395 (user_id), INDEX IDX_93F5A1ADBAD26311 (tag_id), PRIMARY KEY(user_id, tag_id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[3]);
39
-        $this->assertEquals('CREATE TABLE cms_tags (id INT AUTO_INCREMENT NOT NULL, tag_name VARCHAR(50) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[4]);
40
-        $this->assertEquals('CREATE TABLE cms_addresses (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, UNIQUE INDEX UNIQ_ACAC157BA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[5]);
41
-        $this->assertEquals('CREATE TABLE cms_emails (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(250) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[6]);
42
-        $this->assertEquals('CREATE TABLE cms_phonenumbers (phonenumber VARCHAR(50) NOT NULL, user_id INT DEFAULT NULL, INDEX IDX_F21F790FA76ED395 (user_id), PRIMARY KEY(phonenumber)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[7]);
35
+        $this->assertEquals('CREATE TABLE cms_groups (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(50) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[0]);
36
+        $this->assertEquals('CREATE TABLE cms_users (id INT AUTO_INCREMENT NOT NULL, email_id INT DEFAULT NULL, status VARCHAR(50) DEFAULT NULL, username VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_3AF03EC5F85E0677 (username), UNIQUE INDEX UNIQ_3AF03EC5A832C1C9 (email_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[1]);
37
+        $this->assertEquals('CREATE TABLE cms_users_groups (user_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_7EA9409AA76ED395 (user_id), INDEX IDX_7EA9409AFE54D947 (group_id), PRIMARY KEY(user_id, group_id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[2]);
38
+        $this->assertEquals('CREATE TABLE cms_users_tags (user_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_93F5A1ADA76ED395 (user_id), INDEX IDX_93F5A1ADBAD26311 (tag_id), PRIMARY KEY(user_id, tag_id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[3]);
39
+        $this->assertEquals('CREATE TABLE cms_tags (id INT AUTO_INCREMENT NOT NULL, tag_name VARCHAR(50) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[4]);
40
+        $this->assertEquals('CREATE TABLE cms_addresses (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, UNIQUE INDEX UNIQ_ACAC157BA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[5]);
41
+        $this->assertEquals('CREATE TABLE cms_emails (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(250) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[6]);
42
+        $this->assertEquals('CREATE TABLE cms_phonenumbers (phonenumber VARCHAR(50) NOT NULL, user_id INT DEFAULT NULL, INDEX IDX_F21F790FA76ED395 (user_id), PRIMARY KEY(phonenumber)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[7]);
43 43
         $this->assertEquals("ALTER TABLE cms_users ADD CONSTRAINT FK_3AF03EC5A832C1C9 FOREIGN KEY (email_id) REFERENCES cms_emails (id)", $sql[8]);
44 44
         $this->assertEquals("ALTER TABLE cms_users_groups ADD CONSTRAINT FK_7EA9409AA76ED395 FOREIGN KEY (user_id) REFERENCES cms_users (id)", $sql[9]);
45 45
         $this->assertEquals("ALTER TABLE cms_users_groups ADD CONSTRAINT FK_7EA9409AFE54D947 FOREIGN KEY (group_id) REFERENCES cms_groups (id)", $sql[10]);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $collation = $this->getColumnCollationDeclarationSQL('utf8_unicode_ci');
72 72
 
73 73
         $this->assertEquals(1, count($sql));
74
-        $this->assertEquals('CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, `decimal` NUMERIC(5, 2) NOT NULL, `high_scale` NUMERIC(14, 4) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[0]);
74
+        $this->assertEquals('CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, `decimal` NUMERIC(5, 2) NOT NULL, `high_scale` NUMERIC(14, 4) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[0]);
75 75
     }
76 76
 
77 77
     public function testGetCreateSchemaSql3()
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $collation = $this->getColumnCollationDeclarationSQL('utf8_unicode_ci');
86 86
 
87 87
         $this->assertEquals(1, count($sql));
88
-        $this->assertEquals('CREATE TABLE boolean_model (id INT AUTO_INCREMENT NOT NULL, booleanField TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[0]);
88
+        $this->assertEquals('CREATE TABLE boolean_model (id INT AUTO_INCREMENT NOT NULL, booleanField TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[0]);
89 89
     }
90 90
 
91 91
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2182Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
         );
22 22
         $collation = $this->getColumnCollationDeclarationSQL('utf8_unicode_ci');
23 23
 
24
-        $this->assertEquals('CREATE TABLE DDC2182OptionParent (id INT UNSIGNED NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[0]);
25
-        $this->assertEquals('CREATE TABLE DDC2182OptionChild (id VARCHAR(255) NOT NULL, parent_id INT UNSIGNED DEFAULT NULL, INDEX IDX_B314D4AD727ACA70 (parent_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ' . $collation . ' ENGINE = InnoDB', $sql[1]);
24
+        $this->assertEquals('CREATE TABLE DDC2182OptionParent (id INT UNSIGNED NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[0]);
25
+        $this->assertEquals('CREATE TABLE DDC2182OptionChild (id VARCHAR(255) NOT NULL, parent_id INT UNSIGNED DEFAULT NULL, INDEX IDX_B314D4AD727ACA70 (parent_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 '.$collation.' ENGINE = InnoDB', $sql[1]);
26 26
         $this->assertEquals("ALTER TABLE DDC2182OptionChild ADD CONSTRAINT FK_B314D4AD727ACA70 FOREIGN KEY (parent_id) REFERENCES DDC2182OptionParent (id)", $sql[2]);
27 27
     }
28 28
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH7684Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     public function testIssue() : void
18 18
     {
19
-        if (! $this->_em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
19
+        if ( ! $this->_em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
20 20
             $this->markTestSkipped('Platform does not support foreign keys.');
21 21
         }
22 22
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH7820Test.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
     {
50 50
         parent::setUp();
51 51
 
52
-        if (! Type::hasType(GH7820LineTextType::class)) {
52
+        if ( ! Type::hasType(GH7820LineTextType::class)) {
53 53
             Type::addType(GH7820LineTextType::class, GH7820LineTextType::class);
54 54
         }
55 55
 
56 56
         $this->setUpEntitySchema([GH7820Line::class]);
57 57
 
58
-        $this->_em->createQuery('DELETE FROM ' . GH7820Line::class . ' l')
58
+        $this->_em->createQuery('DELETE FROM '.GH7820Line::class.' l')
59 59
             ->execute();
60 60
 
61 61
         foreach (self::SONG as $index => $line) {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         self::assertSame(
75 75
             self::SONG,
76
-            array_map(static function (GH7820Line $line) : string {
76
+            array_map(static function(GH7820Line $line) : string {
77 77
                 return $line->toString();
78 78
             }, iterator_to_array(new Paginator($query)))
79 79
         );
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
         self::assertSame(
97 97
             self::SONG,
98
-            array_map(static function (GH7820Line $line) : string {
98
+            array_map(static function(GH7820Line $line) : string {
99 99
                 return $line->toString();
100 100
             }, iterator_to_array(new Paginator($query))),
101 101
             'Expected to return expected data before query cache is populated with DQL -> SQL translation. Were SQL parameters translated?'
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         self::assertSame(
109 109
             self::SONG,
110
-            array_map(static function (GH7820Line $line) : string {
110
+            array_map(static function(GH7820Line $line) : string {
111 111
                 return $line->toString();
112 112
             }, iterator_to_array(new Paginator($query))),
113 113
             'Expected to return expected data even when DQL -> SQL translation is present in cache. Were SQL parameters translated again?'
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
     public function __toString() : string
167 167
     {
168
-        return 'Line: ' . $this->text;
168
+        return 'Line: '.$this->text;
169 169
     }
170 170
 }
171 171
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     {
176 176
         $text = parent::convertToPHPValue($value, $platform);
177 177
 
178
-        if (! is_string($text)) {
178
+        if ( ! is_string($text)) {
179 179
             return $text;
180 180
         }
181 181
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
186 186
     {
187
-        if (! $value instanceof GH7820LineText) {
187
+        if ( ! $value instanceof GH7820LineText) {
188 188
             return parent::convertToDatabaseValue($value, $platform);
189 189
         }
190 190
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManager.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
      */
227 227
     public function transactional($func)
228 228
     {
229
-        if (!is_callable($func)) {
230
-            throw new \InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"');
229
+        if ( ! is_callable($func)) {
230
+            throw new \InvalidArgumentException('Expected argument of type "callable", got "'.gettype($func).'"');
231 231
         }
232 232
 
233 233
         $this->conn->beginTransaction();
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
     {
358 358
         if ($entity !== null) {
359 359
             @trigger_error(
360
-                'Calling ' . __METHOD__ . '() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine 3.0.',
360
+                'Calling '.__METHOD__.'() with any arguments to flush specific entities is deprecated and will not be supported in Doctrine 3.0.',
361 361
                 E_USER_DEPRECATED
362 362
             );
363 363
         }
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
      */
663 663
     public function detach($entity)
664 664
     {
665
-        @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
665
+        @trigger_error('Method '.__METHOD__.'() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
666 666
 
667 667
         if ( ! is_object($entity)) {
668 668
             throw ORMInvalidArgumentException::invalidObject('EntityManager#detach()', $entity);
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
      */
688 688
     public function merge($entity)
689 689
     {
690
-        @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
690
+        @trigger_error('Method '.__METHOD__.'() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
691 691
 
692 692
         if ( ! is_object($entity)) {
693 693
             throw ORMInvalidArgumentException::invalidObject('EntityManager#merge()', $entity);
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
      */
704 704
     public function copy($entity, $deep = false)
705 705
     {
706
-        @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
706
+        @trigger_error('Method '.__METHOD__.'() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
707 707
 
708 708
         throw new \BadMethodCallException("Not implemented.");
709 709
     }
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
      */
778 778
     public function isOpen()
779 779
     {
780
-        return (!$this->closed);
780
+        return ( ! $this->closed);
781 781
     }
782 782
 
783 783
     /**
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
                 sprintf(
889 889
                     'Invalid $connection argument of type %s given%s.',
890 890
                     is_object($connection) ? get_class($connection) : gettype($connection),
891
-                    is_object($connection) ? '' : ': "' . $connection . '"'
891
+                    is_object($connection) ? '' : ': "'.$connection.'"'
892 892
                 )
893 893
             );
894 894
         }
@@ -938,13 +938,13 @@  discard block
 block discarded – undo
938 938
     {
939 939
         switch ($lockMode) {
940 940
             case LockMode::OPTIMISTIC:
941
-                if (!$class->isVersioned) {
941
+                if ( ! $class->isVersioned) {
942 942
                     throw OptimisticLockException::notVersioned($class->name);
943 943
                 }
944 944
                 break;
945 945
             case LockMode::PESSIMISTIC_READ:
946 946
             case LockMode::PESSIMISTIC_WRITE:
947
-                if (!$this->getConnection()->isTransactionActive()) {
947
+                if ( ! $this->getConnection()->isTransactionActive()) {
948 948
                     throw TransactionRequiredException::transactionRequired();
949 949
                 }
950 950
         }
Please login to merge, or discard this patch.