Completed
Push — develop ( 8dee05 )
by Dmytro
20:08
created
core/vendor/agelxnash/modx-evo-database/tests/Real/MySqliQueryTest.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php namespace AgelxNash\Modx\Evo\Database\Tests\Real;
2 2
 
3
+use AgelxNash\Modx\Evo\Database\Drivers\MySqliDriver;
3 4
 use AgelxNash\Modx\Evo\Database\Tests\RealQueryTest;
4 5
 use mysqli;
5 6
 use mysqli_result;
6
-use AgelxNash\Modx\Evo\Database\Drivers\MySqliDriver;
7 7
 
8 8
 /**
9 9
  * @property MySqliDriver $instance
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function testDataSeek()
30 30
     {
31
-        $query = 'SELECT `id`, `alias` FROM ' . $this->table . ' WHERE id = 1';
31
+        $query = 'SELECT `id`, `alias` FROM '.$this->table.' WHERE id = 1';
32 32
 
33 33
         $result = $this->instance->query($query);
34 34
         $this->assertInstanceOf(
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $this->instance->getDriver()->dataSeek($result, 0);
66 66
 
67 67
         $this->assertEquals(
68
-            (object)['id' => 1, 'alias' => 'index'],
68
+            (object) ['id' => 1, 'alias' => 'index'],
69 69
             $this->instance->getRow($result, 'object')
70 70
         );
71 71
         $this->instance->getDriver()->dataSeek($result, 0);
Please login to merge, or discard this patch.
core/vendor/agelxnash/modx-evo-database/tests/Source/DatabaseTest.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php namespace AgelxNash\Modx\Evo\Database\Tests\Source;
2 2
 
3
-use PHPUnit\Framework\TestCase;
4 3
 use AgelxNash\Modx\Evo\Database;
4
+use PHPUnit\Framework\TestCase;
5 5
 
6 6
 class DatabaseTest extends TestCase
7 7
 {
Please login to merge, or discard this patch.
vendor/agelxnash/modx-evo-database/tests/Source/Traits/SupportTraitTest.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php namespace AgelxNash\Modx\Evo\Database\Tests\Traits\Source;
2 2
 
3
-use PHPUnit\Framework\TestCase;
4 3
 use AgelxNash\Modx\Evo\Database;
4
+use PHPUnit\Framework\TestCase;
5 5
 use ReflectionMethod;
6 6
 
7 7
 class SupportTraitTest extends TestCase
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -342,7 +342,7 @@
 block discarded – undo
342 342
                 $this->assertThat(
343 343
                     $method->invoke($this->instance, $item),
344 344
                     $this->isType($type),
345
-                    '[ STEP ' . ++$step . '] Check ' . $item . ' as ' . $type
345
+                    '[ STEP '.++$step.'] Check '.$item.' as '.$type
346 346
                 );
347 347
             }
348 348
         }
Please login to merge, or discard this patch.
core/vendor/composer/ClassLoader.php 2 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * appending or prepending to the ones previously set for this prefix.
104 104
      *
105 105
      * @param string       $prefix  The prefix
106
-     * @param array|string $paths   The PSR-0 root directories
106
+     * @param string $paths   The PSR-0 root directories
107 107
      * @param bool         $prepend Whether to prepend the directories
108 108
      */
109 109
     public function add($prefix, $paths, $prepend = false)
@@ -367,6 +367,10 @@  discard block
 block discarded – undo
367 367
         return $file;
368 368
     }
369 369
 
370
+    /**
371
+     * @param string $class
372
+     * @param string $ext
373
+     */
370 374
     private function findFileWithExtension($class, $ext)
371 375
     {
372 376
         // PSR-4 lookup
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
     private function findFileWithExtension($class, $ext)
371 371
     {
372 372
         // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
373
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
374 374
 
375 375
         $first = $class[0];
376 376
         if (isset($this->prefixLengthsPsr4[$first])) {
377 377
             $subPath = $class;
378 378
             while (false !== $lastPos = strrpos($subPath, '\\')) {
379 379
                 $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
380
+                $search = $subPath.'\\';
381 381
                 if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382
+                    $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1);
383 383
                     foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
384
+                        if (file_exists($file = $dir.$pathEnd)) {
385 385
                             return $file;
386 386
                         }
387 387
                     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         // PSR-4 fallback dirs
393 393
         foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
394
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
395 395
                 return $file;
396 396
             }
397 397
         }
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404 404
         } else {
405 405
             // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
406
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
407 407
         }
408 408
 
409 409
         if (isset($this->prefixesPsr0[$first])) {
410 410
             foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 411
                 if (0 === strpos($class, $prefix)) {
412 412
                     foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
413
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
414 414
                             return $file;
415 415
                         }
416 416
                     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         // PSR-0 fallback dirs
422 422
         foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
423
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
424 424
                 return $file;
425 425
             }
426 426
         }
Please login to merge, or discard this patch.
core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
      *
230 230
      * @param string $id The id of the cache entry to fetch.
231 231
      *
232
-     * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id.
232
+     * @return string The cached data or FALSE, if no cache entry exists for the given id.
233 233
      */
234 234
     abstract protected function doFetch($id);
235 235
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         // no internal array function supports this sort of mapping: needs to be iterative
78 78
         // this filters and combines keys in one pass
79 79
         foreach ($namespacedKeys as $requestedKey => $namespacedKey) {
80
-            if (! isset($items[$namespacedKey]) && ! array_key_exists($namespacedKey, $items)) {
80
+            if (!isset($items[$namespacedKey]) && !array_key_exists($namespacedKey, $items)) {
81 81
                 continue;
82 82
             }
83 83
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
         foreach ($keys as $key) {
216 216
             $item = $this->doFetch($key);
217
-            if ($item === false && ! $this->doContains($key)) {
217
+            if ($item === false && !$this->doContains($key)) {
218 218
                 continue;
219 219
             }
220 220
 
Please login to merge, or discard this patch.
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,6 +49,7 @@  discard block
 block discarded – undo
49 49
     /**
50 50
      * @param int         $lifetime
51 51
      * @param string|null $cacheKey
52
+     * @param Cache $resultCache
52 53
      */
53 54
     public function __construct($lifetime = 0, $cacheKey = null, ?Cache $resultCache = null)
54 55
     {
@@ -95,7 +96,7 @@  discard block
 block discarded – undo
95 96
      * @param array  $types
96 97
      * @param array  $connectionParams
97 98
      *
98
-     * @return array
99
+     * @return string[]
99 100
      */
100 101
     public function generateCacheKeys($query, $params, $types, array $connectionParams = [])
101 102
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,10 +99,10 @@
 block discarded – undo
99 99
      */
100 100
     public function generateCacheKeys($query, $params, $types, array $connectionParams = [])
101 101
     {
102
-        $realCacheKey = 'query=' . $query .
103
-            '&params=' . serialize($params) .
104
-            '&types=' . serialize($types) .
105
-            '&connectionParams=' . hash('sha256', serialize($connectionParams));
102
+        $realCacheKey = 'query='.$query.
103
+            '&params='.serialize($params).
104
+            '&types='.serialize($types).
105
+            '&connectionParams='.hash('sha256', serialize($connectionParams));
106 106
 
107 107
         // should the key be automatically generated using the inputs or is the cache key set?
108 108
         if ($this->cacheKey === null) {
Please login to merge, or discard this patch.
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\DBAL;
21 21
 
22
-use Doctrine\DBAL\Logging\SQLLogger;
23 22
 use Doctrine\Common\Cache\Cache;
23
+use Doctrine\DBAL\Logging\SQLLogger;
24 24
 
25 25
 /**
26 26
  * Configuration container for the Doctrine DBAL.
Please login to merge, or discard this patch.
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
      * @param int    $column    The 0-indexed column number to retrieve.
602 602
      * @param array  $types     The query parameter types.
603 603
      *
604
-     * @return mixed|bool False is returned if no rows are found.
604
+     * @return string|boolean False is returned if no rows are found.
605 605
      *
606 606
      * @throws \Doctrine\DBAL\DBALException
607 607
      */
@@ -1251,7 +1251,7 @@  discard block
 block discarded – undo
1251 1251
      * Returns the savepoint name to use for nested transactions are false if they are not supported
1252 1252
      * "savepointFormat" parameter is not set
1253 1253
      *
1254
-     * @return mixed A string with the savepoint name or false.
1254
+     * @return string A string with the savepoint name or false.
1255 1255
      */
1256 1256
     protected function _getNestedTransactionSavePointName()
1257 1257
     {
Please login to merge, or discard this patch.
Unused Use Statements   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,20 +19,20 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\DBAL;
21 21
 
22
-use Doctrine\DBAL\Driver\ResultStatement;
23
-use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
24
-use Doctrine\DBAL\Exception\InvalidArgumentException;
25 22
 use Closure;
26
-use Exception;
27
-use Doctrine\DBAL\Types\Type;
28
-use Doctrine\DBAL\Driver\Connection as DriverConnection;
29
-use Doctrine\DBAL\Driver\Statement as DriverStatement;
30 23
 use Doctrine\Common\EventManager;
31
-use Doctrine\DBAL\Cache\ResultCacheStatement;
32
-use Doctrine\DBAL\Cache\QueryCacheProfile;
33 24
 use Doctrine\DBAL\Cache\ArrayStatement;
34 25
 use Doctrine\DBAL\Cache\CacheException;
26
+use Doctrine\DBAL\Cache\QueryCacheProfile;
27
+use Doctrine\DBAL\Cache\ResultCacheStatement;
28
+use Doctrine\DBAL\Driver\Connection as DriverConnection;
35 29
 use Doctrine\DBAL\Driver\PingableConnection;
30
+use Doctrine\DBAL\Driver\ResultStatement;
31
+use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
32
+use Doctrine\DBAL\Driver\Statement as DriverStatement;
33
+use Doctrine\DBAL\Exception\InvalidArgumentException;
34
+use Doctrine\DBAL\Types\Type;
35
+use Exception;
36 36
 use Throwable;
37 37
 use function assert;
38 38
 use function array_key_exists;
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         }
230 230
 
231 231
         if (isset($params["platform"])) {
232
-            if ( ! $params['platform'] instanceof Platforms\AbstractPlatform) {
232
+            if (!$params['platform'] instanceof Platforms\AbstractPlatform) {
233 233
                 throw DBALException::invalidPlatformType($params['platform']);
234 234
             }
235 235
 
@@ -238,11 +238,11 @@  discard block
 block discarded – undo
238 238
         }
239 239
 
240 240
         // Create default config and event manager if none given
241
-        if ( ! $config) {
241
+        if (!$config) {
242 242
             $config = new Configuration();
243 243
         }
244 244
 
245
-        if ( ! $eventManager) {
245
+        if (!$eventManager) {
246 246
             $eventManager = new EventManager();
247 247
         }
248 248
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
     private function getDatabasePlatformVersion()
439 439
     {
440 440
         // Driver does not support version specific platforms.
441
-        if ( ! $this->_driver instanceof VersionAwarePlatformDriver) {
441
+        if (!$this->_driver instanceof VersionAwarePlatformDriver) {
442 442
             return null;
443 443
         }
444 444
 
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
     {
497 497
         // Automatic platform version detection.
498 498
         if ($this->_conn instanceof ServerInfoAwareConnection &&
499
-            ! $this->_conn->requiresQueryForServerVersion()
499
+            !$this->_conn->requiresQueryForServerVersion()
500 500
         ) {
501 501
             return $this->_conn->getServerVersion();
502 502
         }
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 
655 655
             $columns[] = $columnName;
656 656
             $values[] = $value;
657
-            $conditions[] = $columnName . ' = ?';
657
+            $conditions[] = $columnName.' = ?';
658 658
         }
659 659
 
660 660
         return [$columns, $values, $conditions];
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
         list($columns, $values, $conditions) = $this->gatherConditions($identifier);
684 684
 
685 685
         return $this->executeUpdate(
686
-            'DELETE FROM ' . $tableExpression . ' WHERE ' . implode(' AND ', $conditions),
686
+            'DELETE FROM '.$tableExpression.' WHERE '.implode(' AND ', $conditions),
687 687
             $values,
688 688
             is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types
689 689
         );
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
         foreach ($data as $columnName => $value) {
753 753
             $setColumns[] = $columnName;
754 754
             $setValues[] = $value;
755
-            $set[] = $columnName . ' = ?';
755
+            $set[] = $columnName.' = ?';
756 756
         }
757 757
 
758 758
         list($conditionColumns, $conditionValues, $conditions) = $this->gatherConditions($identifier);
@@ -763,8 +763,8 @@  discard block
 block discarded – undo
763 763
             $types = $this->extractTypeValues($columns, $types);
764 764
         }
765 765
 
766
-        $sql  = 'UPDATE ' . $tableExpression . ' SET ' . implode(', ', $set)
767
-                . ' WHERE ' . implode(' AND ', $conditions);
766
+        $sql = 'UPDATE '.$tableExpression.' SET '.implode(', ', $set)
767
+                . ' WHERE '.implode(' AND ', $conditions);
768 768
 
769 769
         return $this->executeUpdate($sql, $values, $types);
770 770
     }
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
     public function insert($tableExpression, array $data, array $types = [])
786 786
     {
787 787
         if (empty($data)) {
788
-            return $this->executeUpdate('INSERT INTO ' . $tableExpression . ' ()' . ' VALUES ()');
788
+            return $this->executeUpdate('INSERT INTO '.$tableExpression.' ()'.' VALUES ()');
789 789
         }
790 790
 
791 791
         $columns = [];
@@ -799,8 +799,8 @@  discard block
 block discarded – undo
799 799
         }
800 800
 
801 801
         return $this->executeUpdate(
802
-            'INSERT INTO ' . $tableExpression . ' (' . implode(', ', $columns) . ')' .
803
-            ' VALUES (' . implode(', ', $set) . ')',
802
+            'INSERT INTO '.$tableExpression.' ('.implode(', ', $columns).')'.
803
+            ' VALUES ('.implode(', ', $set).')',
804 804
             $values,
805 805
             is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types
806 806
         );
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
     public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qcp)
968 968
     {
969 969
         $resultCache = $qcp->getResultCacheDriver() ?: $this->_config->getResultCacheImpl();
970
-        if ( ! $resultCache) {
970
+        if (!$resultCache) {
971 971
             throw CacheException::noResultDriverConfigured();
972 972
         }
973 973
 
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
             throw ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction();
1231 1231
         }
1232 1232
 
1233
-        if ( ! $this->getDatabasePlatform()->supportsSavepoints()) {
1233
+        if (!$this->getDatabasePlatform()->supportsSavepoints()) {
1234 1234
             throw ConnectionException::savepointsNotSupported();
1235 1235
         }
1236 1236
 
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
      */
1410 1410
     public function createSavepoint($savepoint)
1411 1411
     {
1412
-        if ( ! $this->getDatabasePlatform()->supportsSavepoints()) {
1412
+        if (!$this->getDatabasePlatform()->supportsSavepoints()) {
1413 1413
             throw ConnectionException::savepointsNotSupported();
1414 1414
         }
1415 1415
 
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
      */
1428 1428
     public function releaseSavepoint($savepoint)
1429 1429
     {
1430
-        if ( ! $this->getDatabasePlatform()->supportsSavepoints()) {
1430
+        if (!$this->getDatabasePlatform()->supportsSavepoints()) {
1431 1431
             throw ConnectionException::savepointsNotSupported();
1432 1432
         }
1433 1433
 
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
      */
1448 1448
     public function rollbackSavepoint($savepoint)
1449 1449
     {
1450
-        if ( ! $this->getDatabasePlatform()->supportsSavepoints()) {
1450
+        if (!$this->getDatabasePlatform()->supportsSavepoints()) {
1451 1451
             throw ConnectionException::savepointsNotSupported();
1452 1452
         }
1453 1453
 
@@ -1474,7 +1474,7 @@  discard block
 block discarded – undo
1474 1474
      */
1475 1475
     public function getSchemaManager()
1476 1476
     {
1477
-        if ( ! $this->_schemaManager) {
1477
+        if (!$this->_schemaManager) {
1478 1478
             $this->_schemaManager = $this->_driver->getSchemaManager($this);
1479 1479
         }
1480 1480
 
Please login to merge, or discard this patch.
doctrine/dbal/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -142,6 +142,7 @@
 block discarded – undo
142 142
 
143 143
     /**
144 144
      * {@inheritDoc}
145
+     * @param string $connectionName
145 146
      */
146 147
     public function connect($connectionName = null)
147 148
     {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\DBAL\Connections;
21 21
 
22
+use Doctrine\Common\EventManager;
23
+use Doctrine\DBAL\Configuration;
22 24
 use Doctrine\DBAL\Connection;
23 25
 use Doctrine\DBAL\Driver;
24 26
 use Doctrine\DBAL\Driver\Connection as DriverConnection;
25
-use Doctrine\DBAL\Configuration;
26
-use Doctrine\Common\EventManager;
27 27
 use Doctrine\DBAL\Event\ConnectionEventArgs;
28 28
 use Doctrine\DBAL\Events;
29 29
 use function array_rand;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null)
115 115
     {
116
-        if (! isset($params['slaves'], $params['master'])) {
116
+        if (!isset($params['slaves'], $params['master'])) {
117 117
             throw new \InvalidArgumentException('master or slaves configuration missing');
118 118
         }
119 119
         if (count($params['slaves']) == 0) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         if (isset($this->connections[$connectionName]) && $this->connections[$connectionName]) {
170 170
             $this->_conn = $this->connections[$connectionName];
171 171
 
172
-            if ($forceMasterAsSlave && ! $this->keepSlave) {
172
+            if ($forceMasterAsSlave && !$this->keepSlave) {
173 173
                 $this->connections['slave'] = $this->_conn;
174 174
             }
175 175
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             $this->connections['master'] = $this->_conn = $this->connectTo($connectionName);
181 181
 
182 182
             // Set slave connection to master to avoid invalid reads
183
-            if ( ! $this->keepSlave) {
183
+            if (!$this->keepSlave) {
184 184
                 $this->connections['slave'] = $this->connections['master'];
185 185
             }
186 186
         } else {
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
         $config = $params['slaves'][array_rand($params['slaves'])];
232 232
 
233
-        if ( ! isset($config['charset']) && isset($params['master']['charset'])) {
233
+        if (!isset($config['charset']) && isset($params['master']['charset'])) {
234 234
             $config['charset'] = $params['master']['charset'];
235 235
         }
236 236
 
Please login to merge, or discard this patch.