Completed
Push — develop ( 8dee05 )
by Dmytro
20:08
created
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php 2 patches
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\Driver\PDOPgSql;
21 21
 
22
+use Doctrine\DBAL\DBALException;
22 23
 use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;
23 24
 use Doctrine\DBAL\Driver\PDOConnection;
24
-use Doctrine\DBAL\DBALException;
25
-use PDOException;
26 25
 use PDO;
26
+use PDOException;
27 27
 use function defined;
28 28
 
29 29
 /**
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             );
48 48
 
49 49
             if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')
50
-                && (! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])
50
+                && (!isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])
51 51
                     || true === $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES]
52 52
                 )
53 53
             ) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
              * - passing client_encoding via the 'options' param breaks pgbouncer support
60 60
              */
61 61
             if (isset($params['charset'])) {
62
-                $pdo->exec('SET NAMES \'' . $params['charset'] . '\'');
62
+                $pdo->exec('SET NAMES \''.$params['charset'].'\'');
63 63
             }
64 64
 
65 65
             return $pdo;
@@ -80,46 +80,46 @@  discard block
 block discarded – undo
80 80
         $dsn = 'pgsql:';
81 81
 
82 82
         if (isset($params['host']) && $params['host'] != '') {
83
-            $dsn .= 'host=' . $params['host'] . ';';
83
+            $dsn .= 'host='.$params['host'].';';
84 84
         }
85 85
 
86 86
         if (isset($params['port']) && $params['port'] != '') {
87
-            $dsn .= 'port=' . $params['port'] . ';';
87
+            $dsn .= 'port='.$params['port'].';';
88 88
         }
89 89
 
90 90
         if (isset($params['dbname'])) {
91
-            $dsn .= 'dbname=' . $params['dbname'] . ';';
91
+            $dsn .= 'dbname='.$params['dbname'].';';
92 92
         } elseif (isset($params['default_dbname'])) {
93
-            $dsn .= 'dbname=' . $params['default_dbname'] . ';';
93
+            $dsn .= 'dbname='.$params['default_dbname'].';';
94 94
         } else {
95 95
             // Used for temporary connections to allow operations like dropping the database currently connected to.
96 96
             // Connecting without an explicit database does not work, therefore "postgres" database is used
97 97
             // as it is mostly present in every server setup.
98
-            $dsn .= 'dbname=postgres' . ';';
98
+            $dsn .= 'dbname=postgres'.';';
99 99
         }
100 100
 
101 101
         if (isset($params['sslmode'])) {
102
-            $dsn .= 'sslmode=' . $params['sslmode'] . ';';
102
+            $dsn .= 'sslmode='.$params['sslmode'].';';
103 103
         }
104 104
 
105 105
         if (isset($params['sslrootcert'])) {
106
-            $dsn .= 'sslrootcert=' . $params['sslrootcert'] . ';';
106
+            $dsn .= 'sslrootcert='.$params['sslrootcert'].';';
107 107
         }
108 108
 
109 109
         if (isset($params['sslcert'])) {
110
-            $dsn .= 'sslcert=' . $params['sslcert'] . ';';
110
+            $dsn .= 'sslcert='.$params['sslcert'].';';
111 111
         }
112 112
 
113 113
         if (isset($params['sslkey'])) {
114
-            $dsn .= 'sslkey=' . $params['sslkey'] . ';';
114
+            $dsn .= 'sslkey='.$params['sslkey'].';';
115 115
         }
116 116
 
117 117
         if (isset($params['sslcrl'])) {
118
-            $dsn .= 'sslcrl=' . $params['sslcrl'] . ';';
118
+            $dsn .= 'sslcrl='.$params['sslcrl'].';';
119 119
         }
120 120
 
121 121
         if (isset($params['application_name'])) {
122
-            $dsn .= 'application_name=' . $params['application_name'] . ';';
122
+            $dsn .= 'application_name='.$params['application_name'].';';
123 123
         }
124 124
 
125 125
         return $dsn;
Please login to merge, or discard this patch.
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\DBAL\Event\Listeners;
21 21
 
22
+use Doctrine\Common\EventSubscriber;
22 23
 use Doctrine\DBAL\Event\ConnectionEventArgs;
23 24
 use Doctrine\DBAL\Events;
24
-use Doctrine\Common\EventSubscriber;
25 25
 
26 26
 /**
27 27
  * MySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection.
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public function postConnect(ConnectionEventArgs $args)
68 68
     {
69 69
         $collation = ($this->_collation) ? " COLLATE ".$this->_collation : "";
70
-        $args->getConnection()->executeUpdate("SET NAMES ".$this->_charset . $collation);
70
+        $args->getConnection()->executeUpdate("SET NAMES ".$this->_charset.$collation);
71 71
     }
72 72
 
73 73
     /**
Please login to merge, or discard this patch.
doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\DBAL\Event\Listeners;
21 21
 
22
+use Doctrine\Common\EventSubscriber;
22 23
 use Doctrine\DBAL\Event\ConnectionEventArgs;
23 24
 use Doctrine\DBAL\Events;
24
-use Doctrine\Common\EventSubscriber;
25 25
 use function array_change_key_case;
26 26
 use function array_merge;
27 27
 use function count;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
             $vars = [];
75 75
             foreach ($this->_defaultSessionVars as $option => $value) {
76 76
                 if ($option === 'CURRENT_SCHEMA') {
77
-                    $vars[] = $option . " = " . $value;
77
+                    $vars[] = $option." = ".$value;
78 78
                 } else {
79
-                    $vars[] = $option . " = '" . $value . "'";
79
+                    $vars[] = $option." = '".$value."'";
80 80
                 }
81 81
             }
82 82
             $sql = "ALTER SESSION SET ".implode(" ", $vars);
Please login to merge, or discard this patch.
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
     /**
538 538
      * Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.
539 539
      *
540
-     * @param string|\Doctrine\DBAL\Types\Type $doctrineType
540
+     * @param Type $doctrineType
541 541
      *
542 542
      * @return void
543 543
      */
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
     /**
662 662
      * Gets all SQL wildcard characters of the platform.
663 663
      *
664
-     * @return array
664
+     * @return string[]
665 665
      */
666 666
     public function getWildcards()
667 667
     {
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
      * @param array  $columns
1700 1700
      * @param array  $options
1701 1701
      *
1702
-     * @return array
1702
+     * @return string[]
1703 1703
      */
1704 1704
     protected function _getCreateTableSQL($tableName, array $columns, array $options = [])
1705 1705
     {
@@ -1882,7 +1882,7 @@  discard block
 block discarded – undo
1882 1882
      * Returns the SQL to create an unnamed primary key constraint.
1883 1883
      *
1884 1884
      * @param \Doctrine\DBAL\Schema\Index        $index
1885
-     * @param \Doctrine\DBAL\Schema\Table|string $table
1885
+     * @param string $table
1886 1886
      *
1887 1887
      * @return string
1888 1888
      */
@@ -2180,7 +2180,7 @@  discard block
 block discarded – undo
2180 2180
      * @param \Doctrine\DBAL\Schema\Index $index        The definition of the index to rename to.
2181 2181
      * @param string                      $tableName    The table to rename the given index on.
2182 2182
      *
2183
-     * @return array The sequence of SQL statements for renaming the given index.
2183
+     * @return string[] The sequence of SQL statements for renaming the given index.
2184 2184
      */
2185 2185
     protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)
2186 2186
     {
Please login to merge, or discard this patch.
Spacing   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      */
296 296
     public function getVarcharTypeDeclarationSQL(array $field)
297 297
     {
298
-        if ( !isset($field['length'])) {
298
+        if (!isset($field['length'])) {
299 299
             $field['length'] = $this->getVarcharDefaultLength();
300 300
         }
301 301
 
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
      */
322 322
     public function getBinaryTypeDeclarationSQL(array $field)
323 323
     {
324
-        if ( ! isset($field['length'])) {
324
+        if (!isset($field['length'])) {
325 325
             $field['length'] = $this->getBinaryDefaultLength();
326 326
         }
327 327
 
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
         $dbType = strtolower($dbType);
477 477
 
478 478
         if (!isset($this->doctrineTypeMapping[$dbType])) {
479
-            throw new \Doctrine\DBAL\DBALException("Unknown database type ".$dbType." requested, " . get_class($this) . " may not support it.");
479
+            throw new \Doctrine\DBAL\DBALException("Unknown database type ".$dbType." requested, ".get_class($this)." may not support it.");
480 480
         }
481 481
 
482 482
         return $this->doctrineTypeMapping[$dbType];
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
      */
560 560
     public function getDoctrineTypeComment(Type $doctrineType)
561 561
     {
562
-        return '(DC2Type:' . $doctrineType->getName() . ')';
562
+        return '(DC2Type:'.$doctrineType->getName().')';
563 563
     }
564 564
 
565 565
     /**
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
      */
704 704
     public function getAvgExpression($column)
705 705
     {
706
-        return 'AVG(' . $column . ')';
706
+        return 'AVG('.$column.')';
707 707
     }
708 708
 
709 709
     /**
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
      */
718 718
     public function getCountExpression($column)
719 719
     {
720
-        return 'COUNT(' . $column . ')';
720
+        return 'COUNT('.$column.')';
721 721
     }
722 722
 
723 723
     /**
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
      */
730 730
     public function getMaxExpression($column)
731 731
     {
732
-        return 'MAX(' . $column . ')';
732
+        return 'MAX('.$column.')';
733 733
     }
734 734
 
735 735
     /**
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
      */
742 742
     public function getMinExpression($column)
743 743
     {
744
-        return 'MIN(' . $column . ')';
744
+        return 'MIN('.$column.')';
745 745
     }
746 746
 
747 747
     /**
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
      */
754 754
     public function getSumExpression($column)
755 755
     {
756
-        return 'SUM(' . $column . ')';
756
+        return 'SUM('.$column.')';
757 757
     }
758 758
 
759 759
     // scalar functions
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      */
770 770
     public function getMd5Expression($column)
771 771
     {
772
-        return 'MD5(' . $column . ')';
772
+        return 'MD5('.$column.')';
773 773
     }
774 774
 
775 775
     /**
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
      */
782 782
     public function getLengthExpression($column)
783 783
     {
784
-        return 'LENGTH(' . $column . ')';
784
+        return 'LENGTH('.$column.')';
785 785
     }
786 786
 
787 787
     /**
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
      */
794 794
     public function getSqrtExpression($column)
795 795
     {
796
-        return 'SQRT(' . $column . ')';
796
+        return 'SQRT('.$column.')';
797 797
     }
798 798
 
799 799
     /**
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
      */
807 807
     public function getRoundExpression($column, $decimals = 0)
808 808
     {
809
-        return 'ROUND(' . $column . ', ' . $decimals . ')';
809
+        return 'ROUND('.$column.', '.$decimals.')';
810 810
     }
811 811
 
812 812
     /**
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
      */
820 820
     public function getModExpression($expression1, $expression2)
821 821
     {
822
-        return 'MOD(' . $expression1 . ', ' . $expression2 . ')';
822
+        return 'MOD('.$expression1.', '.$expression2.')';
823 823
     }
824 824
 
825 825
     /**
@@ -850,14 +850,14 @@  discard block
 block discarded – undo
850 850
         }
851 851
 
852 852
         if ($char !== false) {
853
-            $expression .= $char . ' ';
853
+            $expression .= $char.' ';
854 854
         }
855 855
 
856 856
         if ($mode || $char !== false) {
857 857
             $expression .= 'FROM ';
858 858
         }
859 859
 
860
-        return 'TRIM(' . $expression . $str . ')';
860
+        return 'TRIM('.$expression.$str.')';
861 861
     }
862 862
 
863 863
     /**
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
      */
870 870
     public function getRtrimExpression($str)
871 871
     {
872
-        return 'RTRIM(' . $str . ')';
872
+        return 'RTRIM('.$str.')';
873 873
     }
874 874
 
875 875
     /**
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
      */
882 882
     public function getLtrimExpression($str)
883 883
     {
884
-        return 'LTRIM(' . $str . ')';
884
+        return 'LTRIM('.$str.')';
885 885
     }
886 886
 
887 887
     /**
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
      */
895 895
     public function getUpperExpression($str)
896 896
     {
897
-        return 'UPPER(' . $str . ')';
897
+        return 'UPPER('.$str.')';
898 898
     }
899 899
 
900 900
     /**
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
      */
908 908
     public function getLowerExpression($str)
909 909
     {
910
-        return 'LOWER(' . $str . ')';
910
+        return 'LOWER('.$str.')';
911 911
     }
912 912
 
913 913
     /**
@@ -952,10 +952,10 @@  discard block
 block discarded – undo
952 952
     public function getSubstringExpression($value, $from, $length = null)
953 953
     {
954 954
         if ($length === null) {
955
-            return 'SUBSTRING(' . $value . ' FROM ' . $from . ')';
955
+            return 'SUBSTRING('.$value.' FROM '.$from.')';
956 956
         }
957 957
 
958
-        return 'SUBSTRING(' . $value . ' FROM ' . $from . ' FOR ' . $length . ')';
958
+        return 'SUBSTRING('.$value.' FROM '.$from.' FOR '.$length.')';
959 959
     }
960 960
 
961 961
     /**
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
      */
988 988
     public function getNotExpression($expression)
989 989
     {
990
-        return 'NOT(' . $expression . ')';
990
+        return 'NOT('.$expression.')';
991 991
     }
992 992
 
993 993
     /**
@@ -999,7 +999,7 @@  discard block
 block discarded – undo
999 999
      */
1000 1000
     public function getIsNullExpression($expression)
1001 1001
     {
1002
-        return $expression . ' IS NULL';
1002
+        return $expression.' IS NULL';
1003 1003
     }
1004 1004
 
1005 1005
     /**
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
      */
1012 1012
     public function getIsNotNullExpression($expression)
1013 1013
     {
1014
-        return $expression . ' IS NOT NULL';
1014
+        return $expression.' IS NOT NULL';
1015 1015
     }
1016 1016
 
1017 1017
     /**
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
      */
1032 1032
     public function getBetweenExpression($expression, $value1, $value2)
1033 1033
     {
1034
-        return $expression . ' BETWEEN ' .$value1 . ' AND ' . $value2;
1034
+        return $expression.' BETWEEN '.$value1.' AND '.$value2;
1035 1035
     }
1036 1036
 
1037 1037
     /**
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
      */
1044 1044
     public function getAcosExpression($value)
1045 1045
     {
1046
-        return 'ACOS(' . $value . ')';
1046
+        return 'ACOS('.$value.')';
1047 1047
     }
1048 1048
 
1049 1049
     /**
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
      */
1056 1056
     public function getSinExpression($value)
1057 1057
     {
1058
-        return 'SIN(' . $value . ')';
1058
+        return 'SIN('.$value.')';
1059 1059
     }
1060 1060
 
1061 1061
     /**
@@ -1077,7 +1077,7 @@  discard block
 block discarded – undo
1077 1077
      */
1078 1078
     public function getCosExpression($value)
1079 1079
     {
1080
-        return 'COS(' . $value . ')';
1080
+        return 'COS('.$value.')';
1081 1081
     }
1082 1082
 
1083 1083
     /**
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
      */
1366 1366
     public function getBitAndComparisonExpression($value1, $value2)
1367 1367
     {
1368
-        return '(' . $value1 . ' & ' . $value2 . ')';
1368
+        return '('.$value1.' & '.$value2.')';
1369 1369
     }
1370 1370
 
1371 1371
     /**
@@ -1378,7 +1378,7 @@  discard block
 block discarded – undo
1378 1378
      */
1379 1379
     public function getBitOrComparisonExpression($value1, $value2)
1380 1380
     {
1381
-        return '(' . $value1 . ' | ' . $value2 . ')';
1381
+        return '('.$value1.' | '.$value2.')';
1382 1382
     }
1383 1383
 
1384 1384
     /**
@@ -1439,7 +1439,7 @@  discard block
 block discarded – undo
1439 1439
      */
1440 1440
     public function getDropDatabaseSQL($database)
1441 1441
     {
1442
-        return 'DROP DATABASE ' . $database;
1442
+        return 'DROP DATABASE '.$database;
1443 1443
     }
1444 1444
 
1445 1445
     /**
@@ -1470,7 +1470,7 @@  discard block
 block discarded – undo
1470 1470
             }
1471 1471
         }
1472 1472
 
1473
-        return 'DROP TABLE ' . $table;
1473
+        return 'DROP TABLE '.$table;
1474 1474
     }
1475 1475
 
1476 1476
     /**
@@ -1503,7 +1503,7 @@  discard block
 block discarded – undo
1503 1503
             throw new \InvalidArgumentException('AbstractPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.');
1504 1504
         }
1505 1505
 
1506
-        return 'DROP INDEX ' . $index;
1506
+        return 'DROP INDEX '.$index;
1507 1507
     }
1508 1508
 
1509 1509
     /**
@@ -1516,18 +1516,18 @@  discard block
 block discarded – undo
1516 1516
      */
1517 1517
     public function getDropConstraintSQL($constraint, $table)
1518 1518
     {
1519
-        if (! $constraint instanceof Constraint) {
1519
+        if (!$constraint instanceof Constraint) {
1520 1520
             $constraint = new Identifier($constraint);
1521 1521
         }
1522 1522
 
1523
-        if (! $table instanceof Table) {
1523
+        if (!$table instanceof Table) {
1524 1524
             $table = new Identifier($table);
1525 1525
         }
1526 1526
 
1527 1527
         $constraint = $constraint->getQuotedName($this);
1528 1528
         $table = $table->getQuotedName($this);
1529 1529
 
1530
-        return 'ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $constraint;
1530
+        return 'ALTER TABLE '.$table.' DROP CONSTRAINT '.$constraint;
1531 1531
     }
1532 1532
 
1533 1533
     /**
@@ -1540,18 +1540,18 @@  discard block
 block discarded – undo
1540 1540
      */
1541 1541
     public function getDropForeignKeySQL($foreignKey, $table)
1542 1542
     {
1543
-        if (! $foreignKey instanceof ForeignKeyConstraint) {
1543
+        if (!$foreignKey instanceof ForeignKeyConstraint) {
1544 1544
             $foreignKey = new Identifier($foreignKey);
1545 1545
         }
1546 1546
 
1547
-        if (! $table instanceof Table) {
1547
+        if (!$table instanceof Table) {
1548 1548
             $table = new Identifier($table);
1549 1549
         }
1550 1550
 
1551 1551
         $foreignKey = $foreignKey->getQuotedName($this);
1552 1552
         $table = $table->getQuotedName($this);
1553 1553
 
1554
-        return 'ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $foreignKey;
1554
+        return 'ALTER TABLE '.$table.' DROP FOREIGN KEY '.$foreignKey;
1555 1555
     }
1556 1556
 
1557 1557
     /**
@@ -1568,7 +1568,7 @@  discard block
 block discarded – undo
1568 1568
      */
1569 1569
     public function getCreateTableSQL(Table $table, $createFlags = self::CREATE_INDEXES)
1570 1570
     {
1571
-        if ( ! is_int($createFlags)) {
1571
+        if (!is_int($createFlags)) {
1572 1572
             throw new \InvalidArgumentException("Second argument of AbstractPlatform::getCreateTableSQL() has to be integer.");
1573 1573
         }
1574 1574
 
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
         $options['indexes'] = [];
1583 1583
         $options['primary'] = [];
1584 1584
 
1585
-        if (($createFlags&self::CREATE_INDEXES) > 0) {
1585
+        if (($createFlags & self::CREATE_INDEXES) > 0) {
1586 1586
             foreach ($table->getIndexes() as $index) {
1587 1587
                 /* @var $index Index */
1588 1588
                 if ($index->isPrimary()) {
@@ -1627,7 +1627,7 @@  discard block
 block discarded – undo
1627 1627
             $columns[$columnData['name']] = $columnData;
1628 1628
         }
1629 1629
 
1630
-        if (($createFlags&self::CREATE_FOREIGNKEYS) > 0) {
1630
+        if (($createFlags & self::CREATE_FOREIGNKEYS) > 0) {
1631 1631
             $options['foreignKeys'] = [];
1632 1632
             foreach ($table->getForeignKeys() as $fkConstraint) {
1633 1633
                 $options['foreignKeys'][] = $fkConstraint;
@@ -1670,8 +1670,8 @@  discard block
 block discarded – undo
1670 1670
         $columnName = new Identifier($columnName);
1671 1671
         $comment = $this->quoteStringLiteral($comment);
1672 1672
 
1673
-        return "COMMENT ON COLUMN " . $tableName->getQuotedName($this) . "." . $columnName->getQuotedName($this) .
1674
-            " IS " . $comment;
1673
+        return "COMMENT ON COLUMN ".$tableName->getQuotedName($this).".".$columnName->getQuotedName($this).
1674
+            " IS ".$comment;
1675 1675
     }
1676 1676
 
1677 1677
     /**
@@ -1685,11 +1685,11 @@  discard block
 block discarded – undo
1685 1685
      */
1686 1686
     public function getInlineColumnCommentSQL($comment)
1687 1687
     {
1688
-        if (! $this->supportsInlineColumnComments()) {
1688
+        if (!$this->supportsInlineColumnComments()) {
1689 1689
             throw DBALException::notSupported(__METHOD__);
1690 1690
         }
1691 1691
 
1692
-        return "COMMENT " . $this->quoteStringLiteral($comment);
1692
+        return "COMMENT ".$this->quoteStringLiteral($comment);
1693 1693
     }
1694 1694
 
1695 1695
     /**
@@ -1705,27 +1705,27 @@  discard block
 block discarded – undo
1705 1705
     {
1706 1706
         $columnListSql = $this->getColumnDeclarationListSQL($columns);
1707 1707
 
1708
-        if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) {
1708
+        if (isset($options['uniqueConstraints']) && !empty($options['uniqueConstraints'])) {
1709 1709
             foreach ($options['uniqueConstraints'] as $name => $definition) {
1710
-                $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition);
1710
+                $columnListSql .= ', '.$this->getUniqueConstraintDeclarationSQL($name, $definition);
1711 1711
             }
1712 1712
         }
1713 1713
 
1714
-        if (isset($options['primary']) && ! empty($options['primary'])) {
1715
-            $columnListSql .= ', PRIMARY KEY(' . implode(', ', array_unique(array_values($options['primary']))) . ')';
1714
+        if (isset($options['primary']) && !empty($options['primary'])) {
1715
+            $columnListSql .= ', PRIMARY KEY('.implode(', ', array_unique(array_values($options['primary']))).')';
1716 1716
         }
1717 1717
 
1718
-        if (isset($options['indexes']) && ! empty($options['indexes'])) {
1718
+        if (isset($options['indexes']) && !empty($options['indexes'])) {
1719 1719
             foreach ($options['indexes'] as $index => $definition) {
1720
-                $columnListSql .= ', ' . $this->getIndexDeclarationSQL($index, $definition);
1720
+                $columnListSql .= ', '.$this->getIndexDeclarationSQL($index, $definition);
1721 1721
             }
1722 1722
         }
1723 1723
 
1724
-        $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql;
1724
+        $query = 'CREATE TABLE '.$tableName.' ('.$columnListSql;
1725 1725
 
1726 1726
         $check = $this->getCheckDeclarationSQL($columns);
1727
-        if ( ! empty($check)) {
1728
-            $query .= ', ' . $check;
1727
+        if (!empty($check)) {
1728
+            $query .= ', '.$check;
1729 1729
         }
1730 1730
         $query .= ')';
1731 1731
 
@@ -1792,9 +1792,9 @@  discard block
 block discarded – undo
1792 1792
             $table = $table->getQuotedName($this);
1793 1793
         }
1794 1794
 
1795
-        $query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $constraint->getQuotedName($this);
1795
+        $query = 'ALTER TABLE '.$table.' ADD CONSTRAINT '.$constraint->getQuotedName($this);
1796 1796
 
1797
-        $columnList = '('. implode(', ', $constraint->getQuotedColumns($this)) . ')';
1797
+        $columnList = '('.implode(', ', $constraint->getQuotedColumns($this)).')';
1798 1798
 
1799 1799
         $referencesClause = '';
1800 1800
         if ($constraint instanceof Index) {
@@ -1810,8 +1810,8 @@  discard block
 block discarded – undo
1810 1810
         } elseif ($constraint instanceof ForeignKeyConstraint) {
1811 1811
             $query .= ' FOREIGN KEY';
1812 1812
 
1813
-            $referencesClause = ' REFERENCES ' . $constraint->getQuotedForeignTableName($this) .
1814
-                ' (' . implode(', ', $constraint->getQuotedForeignColumns($this)) . ')';
1813
+            $referencesClause = ' REFERENCES '.$constraint->getQuotedForeignTableName($this).
1814
+                ' ('.implode(', ', $constraint->getQuotedForeignColumns($this)).')';
1815 1815
         }
1816 1816
         $query .= ' '.$columnList.$referencesClause;
1817 1817
 
@@ -1844,8 +1844,8 @@  discard block
 block discarded – undo
1844 1844
             return $this->getCreatePrimaryKeySQL($index, $table);
1845 1845
         }
1846 1846
 
1847
-        $query = 'CREATE ' . $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name . ' ON ' . $table;
1848
-        $query .= ' (' . $this->getIndexFieldDeclarationListSQL($columns) . ')' . $this->getPartialIndexSQL($index);
1847
+        $query = 'CREATE '.$this->getCreateIndexSQLFlags($index).'INDEX '.$name.' ON '.$table;
1848
+        $query .= ' ('.$this->getIndexFieldDeclarationListSQL($columns).')'.$this->getPartialIndexSQL($index);
1849 1849
 
1850 1850
         return $query;
1851 1851
     }
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
     protected function getPartialIndexSQL(Index $index)
1861 1861
     {
1862 1862
         if ($this->supportsPartialIndexes() && $index->hasOption('where')) {
1863
-            return  ' WHERE ' . $index->getOption('where');
1863
+            return  ' WHERE '.$index->getOption('where');
1864 1864
         }
1865 1865
 
1866 1866
         return '';
@@ -1888,7 +1888,7 @@  discard block
 block discarded – undo
1888 1888
      */
1889 1889
     public function getCreatePrimaryKeySQL(Index $index, $table)
1890 1890
     {
1891
-        return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')';
1891
+        return 'ALTER TABLE '.$table.' ADD PRIMARY KEY ('.$this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)).')';
1892 1892
     }
1893 1893
 
1894 1894
     /**
@@ -1939,7 +1939,7 @@  discard block
 block discarded – undo
1939 1939
     {
1940 1940
         $c = $this->getIdentifierQuoteCharacter();
1941 1941
 
1942
-        return $c . str_replace($c, $c.$c, $str) . $c;
1942
+        return $c.str_replace($c, $c.$c, $str).$c;
1943 1943
     }
1944 1944
 
1945 1945
     /**
@@ -1956,7 +1956,7 @@  discard block
 block discarded – undo
1956 1956
             $table = $table->getQuotedName($this);
1957 1957
         }
1958 1958
 
1959
-        $query = 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclarationSQL($foreignKey);
1959
+        $query = 'ALTER TABLE '.$table.' ADD '.$this->getForeignKeyDeclarationSQL($foreignKey);
1960 1960
 
1961 1961
         return $query;
1962 1962
     }
@@ -1990,7 +1990,7 @@  discard block
 block discarded – undo
1990 1990
             return false;
1991 1991
         }
1992 1992
 
1993
-        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableAddColumn)) {
1993
+        if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableAddColumn)) {
1994 1994
             return false;
1995 1995
         }
1996 1996
 
@@ -2015,7 +2015,7 @@  discard block
 block discarded – undo
2015 2015
             return false;
2016 2016
         }
2017 2017
 
2018
-        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRemoveColumn)) {
2018
+        if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableRemoveColumn)) {
2019 2019
             return false;
2020 2020
         }
2021 2021
 
@@ -2040,7 +2040,7 @@  discard block
 block discarded – undo
2040 2040
             return false;
2041 2041
         }
2042 2042
 
2043
-        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableChangeColumn)) {
2043
+        if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableChangeColumn)) {
2044 2044
             return false;
2045 2045
         }
2046 2046
 
@@ -2066,7 +2066,7 @@  discard block
 block discarded – undo
2066 2066
             return false;
2067 2067
         }
2068 2068
 
2069
-        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRenameColumn)) {
2069
+        if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableRenameColumn)) {
2070 2070
             return false;
2071 2071
         }
2072 2072
 
@@ -2090,7 +2090,7 @@  discard block
 block discarded – undo
2090 2090
             return false;
2091 2091
         }
2092 2092
 
2093
-        if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTable)) {
2093
+        if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTable)) {
2094 2094
             return false;
2095 2095
         }
2096 2096
 
@@ -2283,28 +2283,28 @@  discard block
 block discarded – undo
2283 2283
             $default = $this->getDefaultValueDeclarationSQL($field);
2284 2284
 
2285 2285
             $charset = (isset($field['charset']) && $field['charset']) ?
2286
-                ' ' . $this->getColumnCharsetDeclarationSQL($field['charset']) : '';
2286
+                ' '.$this->getColumnCharsetDeclarationSQL($field['charset']) : '';
2287 2287
 
2288 2288
             $collation = (isset($field['collation']) && $field['collation']) ?
2289
-                ' ' . $this->getColumnCollationDeclarationSQL($field['collation']) : '';
2289
+                ' '.$this->getColumnCollationDeclarationSQL($field['collation']) : '';
2290 2290
 
2291 2291
             $notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';
2292 2292
 
2293 2293
             $unique = (isset($field['unique']) && $field['unique']) ?
2294
-                ' ' . $this->getUniqueFieldDeclarationSQL() : '';
2294
+                ' '.$this->getUniqueFieldDeclarationSQL() : '';
2295 2295
 
2296 2296
             $check = (isset($field['check']) && $field['check']) ?
2297
-                ' ' . $field['check'] : '';
2297
+                ' '.$field['check'] : '';
2298 2298
 
2299 2299
             $typeDecl = $field['type']->getSQLDeclaration($field, $this);
2300
-            $columnDef = $typeDecl . $charset . $default . $notnull . $unique . $check . $collation;
2300
+            $columnDef = $typeDecl.$charset.$default.$notnull.$unique.$check.$collation;
2301 2301
 
2302 2302
             if ($this->supportsInlineColumnComments() && isset($field['comment']) && $field['comment'] !== '') {
2303
-                $columnDef .= ' ' . $this->getInlineColumnCommentSQL($field['comment']);
2303
+                $columnDef .= ' '.$this->getInlineColumnCommentSQL($field['comment']);
2304 2304
             }
2305 2305
         }
2306 2306
 
2307
-        return $name . ' ' . $columnDef;
2307
+        return $name.' '.$columnDef;
2308 2308
     }
2309 2309
 
2310 2310
     /**
@@ -2316,12 +2316,12 @@  discard block
 block discarded – undo
2316 2316
      */
2317 2317
     public function getDecimalTypeDeclarationSQL(array $columnDef)
2318 2318
     {
2319
-        $columnDef['precision'] = ( ! isset($columnDef['precision']) || empty($columnDef['precision']))
2319
+        $columnDef['precision'] = (!isset($columnDef['precision']) || empty($columnDef['precision']))
2320 2320
             ? 10 : $columnDef['precision'];
2321
-        $columnDef['scale'] = ( ! isset($columnDef['scale']) || empty($columnDef['scale']))
2321
+        $columnDef['scale'] = (!isset($columnDef['scale']) || empty($columnDef['scale']))
2322 2322
             ? 0 : $columnDef['scale'];
2323 2323
 
2324
-        return 'NUMERIC(' . $columnDef['precision'] . ', ' . $columnDef['scale'] . ')';
2324
+        return 'NUMERIC('.$columnDef['precision'].', '.$columnDef['scale'].')';
2325 2325
     }
2326 2326
 
2327 2327
     /**
@@ -2334,39 +2334,39 @@  discard block
 block discarded – undo
2334 2334
      */
2335 2335
     public function getDefaultValueDeclarationSQL($field)
2336 2336
     {
2337
-        if ( ! isset($field['default'])) {
2337
+        if (!isset($field['default'])) {
2338 2338
             return empty($field['notnull']) ? ' DEFAULT NULL' : '';
2339 2339
         }
2340 2340
 
2341 2341
         $default = $field['default'];
2342 2342
 
2343
-        if ( ! isset($field['type'])) {
2344
-            return " DEFAULT '" . $default . "'";
2343
+        if (!isset($field['type'])) {
2344
+            return " DEFAULT '".$default."'";
2345 2345
         }
2346 2346
 
2347 2347
         $type = $field['type'];
2348 2348
 
2349 2349
         if ($type instanceof Types\PhpIntegerMappingType) {
2350
-            return ' DEFAULT ' . $default;
2350
+            return ' DEFAULT '.$default;
2351 2351
         }
2352 2352
 
2353 2353
         if ($type instanceof Types\PhpDateTimeMappingType && $default === $this->getCurrentTimestampSQL()) {
2354
-            return ' DEFAULT ' . $this->getCurrentTimestampSQL();
2354
+            return ' DEFAULT '.$this->getCurrentTimestampSQL();
2355 2355
         }
2356 2356
 
2357 2357
         if ($type instanceof Types\TimeType && $default === $this->getCurrentTimeSQL()) {
2358
-            return ' DEFAULT ' . $this->getCurrentTimeSQL();
2358
+            return ' DEFAULT '.$this->getCurrentTimeSQL();
2359 2359
         }
2360 2360
 
2361 2361
         if ($type instanceof Types\DateType && $default === $this->getCurrentDateSQL()) {
2362
-            return ' DEFAULT ' . $this->getCurrentDateSQL();
2362
+            return ' DEFAULT '.$this->getCurrentDateSQL();
2363 2363
         }
2364 2364
 
2365 2365
         if ($type instanceof Types\BooleanType) {
2366
-            return " DEFAULT '" . $this->convertBooleans($default) . "'";
2366
+            return " DEFAULT '".$this->convertBooleans($default)."'";
2367 2367
         }
2368 2368
 
2369
-        return " DEFAULT '" . $default . "'";
2369
+        return " DEFAULT '".$default."'";
2370 2370
     }
2371 2371
 
2372 2372
     /**
@@ -2382,14 +2382,14 @@  discard block
 block discarded – undo
2382 2382
         $constraints = [];
2383 2383
         foreach ($definition as $field => $def) {
2384 2384
             if (is_string($def)) {
2385
-                $constraints[] = 'CHECK (' . $def . ')';
2385
+                $constraints[] = 'CHECK ('.$def.')';
2386 2386
             } else {
2387 2387
                 if (isset($def['min'])) {
2388
-                    $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')';
2388
+                    $constraints[] = 'CHECK ('.$field.' >= '.$def['min'].')';
2389 2389
                 }
2390 2390
 
2391 2391
                 if (isset($def['max'])) {
2392
-                    $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')';
2392
+                    $constraints[] = 'CHECK ('.$field.' <= '.$def['max'].')';
2393 2393
                 }
2394 2394
             }
2395 2395
         }
@@ -2417,9 +2417,9 @@  discard block
 block discarded – undo
2417 2417
             throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
2418 2418
         }
2419 2419
 
2420
-        return 'CONSTRAINT ' . $name->getQuotedName($this) . ' UNIQUE ('
2420
+        return 'CONSTRAINT '.$name->getQuotedName($this).' UNIQUE ('
2421 2421
             . $this->getIndexFieldDeclarationListSQL($columns)
2422
-            . ')' . $this->getPartialIndexSQL($index);
2422
+            . ')'.$this->getPartialIndexSQL($index);
2423 2423
     }
2424 2424
 
2425 2425
     /**
@@ -2442,9 +2442,9 @@  discard block
 block discarded – undo
2442 2442
             throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
2443 2443
         }
2444 2444
 
2445
-        return $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name->getQuotedName($this) . ' ('
2445
+        return $this->getCreateIndexSQLFlags($index).'INDEX '.$name->getQuotedName($this).' ('
2446 2446
             . $this->getIndexFieldDeclarationListSQL($columns)
2447
-            . ')' . $this->getPartialIndexSQL($index);
2447
+            . ')'.$this->getPartialIndexSQL($index);
2448 2448
     }
2449 2449
 
2450 2450
     /**
@@ -2544,10 +2544,10 @@  discard block
 block discarded – undo
2544 2544
     {
2545 2545
         $query = '';
2546 2546
         if ($this->supportsForeignKeyOnUpdate() && $foreignKey->hasOption('onUpdate')) {
2547
-            $query .= ' ON UPDATE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onUpdate'));
2547
+            $query .= ' ON UPDATE '.$this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onUpdate'));
2548 2548
         }
2549 2549
         if ($foreignKey->hasOption('onDelete')) {
2550
-            $query .= ' ON DELETE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete'));
2550
+            $query .= ' ON DELETE '.$this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete'));
2551 2551
         }
2552 2552
 
2553 2553
         return $query;
@@ -2573,7 +2573,7 @@  discard block
 block discarded – undo
2573 2573
             case 'SET DEFAULT':
2574 2574
                 return $upper;
2575 2575
             default:
2576
-                throw new \InvalidArgumentException('Invalid foreign key action: ' . $upper);
2576
+                throw new \InvalidArgumentException('Invalid foreign key action: '.$upper);
2577 2577
         }
2578 2578
     }
2579 2579
 
@@ -2591,7 +2591,7 @@  discard block
 block discarded – undo
2591 2591
     {
2592 2592
         $sql = '';
2593 2593
         if (strlen($foreignKey->getName())) {
2594
-            $sql .= 'CONSTRAINT ' . $foreignKey->getQuotedName($this) . ' ';
2594
+            $sql .= 'CONSTRAINT '.$foreignKey->getQuotedName($this).' ';
2595 2595
         }
2596 2596
         $sql .= 'FOREIGN KEY (';
2597 2597
 
@@ -2607,8 +2607,8 @@  discard block
 block discarded – undo
2607 2607
 
2608 2608
         $sql .= implode(', ', $foreignKey->getQuotedLocalColumns($this))
2609 2609
             . ') REFERENCES '
2610
-            . $foreignKey->getQuotedForeignTableName($this) . ' ('
2611
-            . implode(', ', $foreignKey->getQuotedForeignColumns($this)) . ')';
2610
+            . $foreignKey->getQuotedForeignTableName($this).' ('
2611
+            . implode(', ', $foreignKey->getQuotedForeignColumns($this)).')';
2612 2612
 
2613 2613
         return $sql;
2614 2614
     }
@@ -2650,7 +2650,7 @@  discard block
 block discarded – undo
2650 2650
      */
2651 2651
     public function getColumnCollationDeclarationSQL($collation)
2652 2652
     {
2653
-        return $this->supportsColumnCollation() ? 'COLLATE ' . $collation : '';
2653
+        return $this->supportsColumnCollation() ? 'COLLATE '.$collation : '';
2654 2654
     }
2655 2655
 
2656 2656
     /**
@@ -2715,7 +2715,7 @@  discard block
 block discarded – undo
2715 2715
      */
2716 2716
     public function convertFromBoolean($item)
2717 2717
     {
2718
-        return null === $item ? null: (bool) $item ;
2718
+        return null === $item ? null: (bool) $item;
2719 2719
     }
2720 2720
 
2721 2721
     /**
@@ -2784,7 +2784,7 @@  discard block
 block discarded – undo
2784 2784
             case TransactionIsolationLevel::SERIALIZABLE:
2785 2785
                 return 'SERIALIZABLE';
2786 2786
             default:
2787
-                throw new \InvalidArgumentException('Invalid isolation level:' . $level);
2787
+                throw new \InvalidArgumentException('Invalid isolation level:'.$level);
2788 2788
         }
2789 2789
     }
2790 2790
 
@@ -3417,7 +3417,7 @@  discard block
 block discarded – undo
3417 3417
             ));
3418 3418
         }
3419 3419
 
3420
-        if ($offset > 0 && ! $this->supportsLimitOffset()) {
3420
+        if ($offset > 0 && !$this->supportsLimitOffset()) {
3421 3421
             throw new DBALException(sprintf(
3422 3422
                 'Platform %s does not support offset values in limit queries.',
3423 3423
                 $this->getName()
@@ -3439,11 +3439,11 @@  discard block
 block discarded – undo
3439 3439
     protected function doModifyLimitQuery($query, $limit, $offset)
3440 3440
     {
3441 3441
         if ($limit !== null) {
3442
-            $query .= ' LIMIT ' . $limit;
3442
+            $query .= ' LIMIT '.$limit;
3443 3443
         }
3444 3444
 
3445 3445
         if ($offset > 0) {
3446
-            $query .= ' OFFSET ' . $offset;
3446
+            $query .= ' OFFSET '.$offset;
3447 3447
         }
3448 3448
 
3449 3449
         return $query;
@@ -3504,7 +3504,7 @@  discard block
 block discarded – undo
3504 3504
      */
3505 3505
     public function getEmptyIdentityInsertSQL($tableName, $identifierColumnName)
3506 3506
     {
3507
-        return 'INSERT INTO ' . $tableName . ' (' . $identifierColumnName . ') VALUES (null)';
3507
+        return 'INSERT INTO '.$tableName.' ('.$identifierColumnName.') VALUES (null)';
3508 3508
     }
3509 3509
 
3510 3510
     /**
@@ -3522,7 +3522,7 @@  discard block
 block discarded – undo
3522 3522
     {
3523 3523
         $tableIdentifier = new Identifier($tableName);
3524 3524
 
3525
-        return 'TRUNCATE ' . $tableIdentifier->getQuotedName($this);
3525
+        return 'TRUNCATE '.$tableIdentifier->getQuotedName($this);
3526 3526
     }
3527 3527
 
3528 3528
     /**
@@ -3546,7 +3546,7 @@  discard block
 block discarded – undo
3546 3546
      */
3547 3547
     public function createSavePoint($savepoint)
3548 3548
     {
3549
-        return 'SAVEPOINT ' . $savepoint;
3549
+        return 'SAVEPOINT '.$savepoint;
3550 3550
     }
3551 3551
 
3552 3552
     /**
@@ -3558,7 +3558,7 @@  discard block
 block discarded – undo
3558 3558
      */
3559 3559
     public function releaseSavePoint($savepoint)
3560 3560
     {
3561
-        return 'RELEASE SAVEPOINT ' . $savepoint;
3561
+        return 'RELEASE SAVEPOINT '.$savepoint;
3562 3562
     }
3563 3563
 
3564 3564
     /**
@@ -3570,7 +3570,7 @@  discard block
 block discarded – undo
3570 3570
      */
3571 3571
     public function rollbackSavePoint($savepoint)
3572 3572
     {
3573
-        return 'ROLLBACK TO SAVEPOINT ' . $savepoint;
3573
+        return 'ROLLBACK TO SAVEPOINT '.$savepoint;
3574 3574
     }
3575 3575
 
3576 3576
     /**
@@ -3589,7 +3589,7 @@  discard block
 block discarded – undo
3589 3589
 
3590 3590
         $class = $this->getReservedKeywordsClass();
3591 3591
         $keywords = new $class;
3592
-        if ( ! $keywords instanceof \Doctrine\DBAL\Platforms\Keywords\KeywordList) {
3592
+        if (!$keywords instanceof \Doctrine\DBAL\Platforms\Keywords\KeywordList) {
3593 3593
             throw DBALException::notSupported(__METHOD__);
3594 3594
         }
3595 3595
 
@@ -3625,7 +3625,7 @@  discard block
 block discarded – undo
3625 3625
     {
3626 3626
         $c = $this->getStringLiteralQuoteCharacter();
3627 3627
 
3628
-        return $c . str_replace($c, $c . $c, $str) . $c;
3628
+        return $c.str_replace($c, $c.$c, $str).$c;
3629 3629
     }
3630 3630
 
3631 3631
     /**
@@ -3649,8 +3649,8 @@  discard block
 block discarded – undo
3649 3649
     final public function escapeStringForLike(string $inputString, string $escapeChar) : string
3650 3650
     {
3651 3651
         return preg_replace(
3652
-            '~([' . preg_quote($this->getLikeWildcardCharacters() . $escapeChar, '~') . '])~u',
3653
-            addcslashes($escapeChar, '\\') . '$1',
3652
+            '~(['.preg_quote($this->getLikeWildcardCharacters().$escapeChar, '~').'])~u',
3653
+            addcslashes($escapeChar, '\\').'$1',
3654 3654
             $inputString
3655 3655
         );
3656 3656
     }
Please login to merge, or discard this patch.
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -457,6 +457,7 @@
 block discarded – undo
457 457
 
458 458
     /**
459 459
      * {@inheritDoc}
460
+     * @param string $table
460 461
      */
461 462
     protected function getDropPrimaryKeySQL($table)
462 463
     {
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -350,9 +350,9 @@  discard block
 block discarded – undo
350 350
         }
351 351
 
352 352
         return "SELECT COLUMN_NAME, DATA_TYPE, COLUMN_COMMENT, IS_NULLABLE, IS_AUTO_INCREMENT, CHARACTER_MAXIMUM_LENGTH, COLUMN_DEFAULT," .
353
-               " NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME" .
354
-               " FROM DATA_DICTIONARY.COLUMNS" .
355
-               " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME = '" . $table . "'";
353
+                " NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME" .
354
+                " FROM DATA_DICTIONARY.COLUMNS" .
355
+                " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME = '" . $table . "'";
356 356
     }
357 357
 
358 358
     /**
@@ -367,8 +367,8 @@  discard block
 block discarded – undo
367 367
         }
368 368
 
369 369
         return "SELECT CONSTRAINT_NAME, CONSTRAINT_COLUMNS, REFERENCED_TABLE_NAME, REFERENCED_TABLE_COLUMNS, UPDATE_RULE, DELETE_RULE" .
370
-               " FROM DATA_DICTIONARY.FOREIGN_KEYS" .
371
-               " WHERE CONSTRAINT_SCHEMA=" . $database . " AND CONSTRAINT_TABLE='" . $table . "'";
370
+                " FROM DATA_DICTIONARY.FOREIGN_KEYS" .
371
+                " WHERE CONSTRAINT_SCHEMA=" . $database . " AND CONSTRAINT_TABLE='" . $table . "'";
372 372
     }
373 373
 
374 374
     /**
@@ -383,8 +383,8 @@  discard block
 block discarded – undo
383 383
         }
384 384
 
385 385
         return "SELECT INDEX_NAME AS 'key_name', COLUMN_NAME AS 'column_name', IS_USED_IN_PRIMARY AS 'primary', IS_UNIQUE=0 AS 'non_unique'" .
386
-               " FROM DATA_DICTIONARY.INDEX_PARTS" .
387
-               " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME='" . $table . "'";
386
+                " FROM DATA_DICTIONARY.INDEX_PARTS" .
387
+                " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME='" . $table . "'";
388 388
     }
389 389
 
390 390
     /**
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
                 }
602 602
             }
603 603
         } elseif (is_bool($item) || is_numeric($item)) {
604
-           $item = ($item) ? 'true' : 'false';
604
+            $item = ($item) ? 'true' : 'false';
605 605
         }
606 606
 
607 607
         return $item;
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $args = func_get_args();
70 70
 
71
-        return 'CONCAT(' . join(', ', (array) $args) . ')';
71
+        return 'CONCAT('.join(', ', (array) $args).')';
72 72
     }
73 73
 
74 74
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $function = '+' === $operator ? 'DATE_ADD' : 'DATE_SUB';
80 80
 
81
-        return $function . '(' . $date . ', INTERVAL ' . $interval . ' ' . $unit . ')';
81
+        return $function.'('.$date.', INTERVAL '.$interval.' '.$unit.')';
82 82
     }
83 83
 
84 84
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function getDateDiffExpression($date1, $date2)
88 88
     {
89
-        return 'DATEDIFF(' . $date1 . ', ' . $date2 . ')';
89
+        return 'DATEDIFF('.$date1.', '.$date2.')';
90 90
     }
91 91
 
92 92
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function getIntegerTypeDeclarationSQL(array $field)
104 104
     {
105
-        return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field);
105
+        return 'INT'.$this->_getCommonIntegerTypeDeclarationSQL($field);
106 106
     }
107 107
 
108 108
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
112 112
     {
113 113
         $autoinc = '';
114
-        if ( ! empty($columnDef['autoincrement'])) {
114
+        if (!empty($columnDef['autoincrement'])) {
115 115
             $autoinc = ' AUTO_INCREMENT';
116 116
         }
117 117
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function getBigIntTypeDeclarationSQL(array $field)
125 125
     {
126
-        return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field);
126
+        return 'BIGINT'.$this->_getCommonIntegerTypeDeclarationSQL($field);
127 127
     }
128 128
 
129 129
     /**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function getSmallIntTypeDeclarationSQL(array $field)
133 133
     {
134
-        return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field);
134
+        return 'INT'.$this->_getCommonIntegerTypeDeclarationSQL($field);
135 135
     }
136 136
 
137 137
     /**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
141 141
     {
142
-        return $length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)';
142
+        return $length ? 'VARCHAR('.$length.')' : 'VARCHAR(255)';
143 143
     }
144 144
 
145 145
     /**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed)
149 149
     {
150
-        return 'VARBINARY(' . ($length ?: 255) . ')';
150
+        return 'VARBINARY('.($length ?: 255).')';
151 151
     }
152 152
 
153 153
     /**
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function getCreateDatabaseSQL($name)
195 195
     {
196
-        return 'CREATE DATABASE ' . $name;
196
+        return 'CREATE DATABASE '.$name;
197 197
     }
198 198
 
199 199
     /**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function getDropDatabaseSQL($name)
203 203
     {
204
-        return 'DROP DATABASE ' . $name;
204
+        return 'DROP DATABASE '.$name;
205 205
     }
206 206
 
207 207
     /**
@@ -211,23 +211,23 @@  discard block
 block discarded – undo
211 211
     {
212 212
         $queryFields = $this->getColumnDeclarationListSQL($columns);
213 213
 
214
-        if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) {
214
+        if (isset($options['uniqueConstraints']) && !empty($options['uniqueConstraints'])) {
215 215
             foreach ($options['uniqueConstraints'] as $index => $definition) {
216
-                $queryFields .= ', ' . $this->getUniqueConstraintDeclarationSQL($index, $definition);
216
+                $queryFields .= ', '.$this->getUniqueConstraintDeclarationSQL($index, $definition);
217 217
             }
218 218
         }
219 219
 
220 220
         // add all indexes
221
-        if (isset($options['indexes']) && ! empty($options['indexes'])) {
221
+        if (isset($options['indexes']) && !empty($options['indexes'])) {
222 222
             foreach ($options['indexes'] as $index => $definition) {
223
-                $queryFields .= ', ' . $this->getIndexDeclarationSQL($index, $definition);
223
+                $queryFields .= ', '.$this->getIndexDeclarationSQL($index, $definition);
224 224
             }
225 225
         }
226 226
 
227 227
         // attach all primary keys
228
-        if (isset($options['primary']) && ! empty($options['primary'])) {
228
+        if (isset($options['primary']) && !empty($options['primary'])) {
229 229
             $keyColumns = array_unique(array_values($options['primary']));
230
-            $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')';
230
+            $queryFields .= ', PRIMARY KEY('.implode(', ', $keyColumns).')';
231 231
         }
232 232
 
233 233
         $query = 'CREATE ';
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             $query .= 'TEMPORARY ';
237 237
         }
238 238
 
239
-        $query .= 'TABLE ' . $tableName . ' (' . $queryFields . ') ';
239
+        $query .= 'TABLE '.$tableName.' ('.$queryFields.') ';
240 240
         $query .= $this->buildTableOptions($options);
241 241
         $query .= $this->buildPartitionOptions($options);
242 242
 
@@ -267,14 +267,14 @@  discard block
 block discarded – undo
267 267
         $tableOptions = [];
268 268
 
269 269
         // Collate
270
-        if ( ! isset($options['collate'])) {
270
+        if (!isset($options['collate'])) {
271 271
             $options['collate'] = 'utf8_unicode_ci';
272 272
         }
273 273
 
274 274
         $tableOptions[] = sprintf('COLLATE %s', $options['collate']);
275 275
 
276 276
         // Engine
277
-        if ( ! isset($options['engine'])) {
277
+        if (!isset($options['engine'])) {
278 278
             $options['engine'] = 'InnoDB';
279 279
         }
280 280
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     private function buildPartitionOptions(array $options)
311 311
     {
312 312
         return (isset($options['partition_options']))
313
-            ? ' ' . $options['partition_options']
313
+            ? ' '.$options['partition_options']
314 314
             : '';
315 315
     }
316 316
 
@@ -344,15 +344,15 @@  discard block
 block discarded – undo
344 344
     public function getListTableColumnsSQL($table, $database = null)
345 345
     {
346 346
         if ($database) {
347
-            $database = "'" . $database . "'";
347
+            $database = "'".$database."'";
348 348
         } else {
349 349
             $database = 'DATABASE()';
350 350
         }
351 351
 
352
-        return "SELECT COLUMN_NAME, DATA_TYPE, COLUMN_COMMENT, IS_NULLABLE, IS_AUTO_INCREMENT, CHARACTER_MAXIMUM_LENGTH, COLUMN_DEFAULT," .
353
-               " NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME" .
354
-               " FROM DATA_DICTIONARY.COLUMNS" .
355
-               " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME = '" . $table . "'";
352
+        return "SELECT COLUMN_NAME, DATA_TYPE, COLUMN_COMMENT, IS_NULLABLE, IS_AUTO_INCREMENT, CHARACTER_MAXIMUM_LENGTH, COLUMN_DEFAULT,".
353
+               " NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME".
354
+               " FROM DATA_DICTIONARY.COLUMNS".
355
+               " WHERE TABLE_SCHEMA=".$database." AND TABLE_NAME = '".$table."'";
356 356
     }
357 357
 
358 358
     /**
@@ -361,14 +361,14 @@  discard block
 block discarded – undo
361 361
     public function getListTableForeignKeysSQL($table, $database = null)
362 362
     {
363 363
         if ($database) {
364
-            $database = "'" . $database . "'";
364
+            $database = "'".$database."'";
365 365
         } else {
366 366
             $database = 'DATABASE()';
367 367
         }
368 368
 
369
-        return "SELECT CONSTRAINT_NAME, CONSTRAINT_COLUMNS, REFERENCED_TABLE_NAME, REFERENCED_TABLE_COLUMNS, UPDATE_RULE, DELETE_RULE" .
370
-               " FROM DATA_DICTIONARY.FOREIGN_KEYS" .
371
-               " WHERE CONSTRAINT_SCHEMA=" . $database . " AND CONSTRAINT_TABLE='" . $table . "'";
369
+        return "SELECT CONSTRAINT_NAME, CONSTRAINT_COLUMNS, REFERENCED_TABLE_NAME, REFERENCED_TABLE_COLUMNS, UPDATE_RULE, DELETE_RULE".
370
+               " FROM DATA_DICTIONARY.FOREIGN_KEYS".
371
+               " WHERE CONSTRAINT_SCHEMA=".$database." AND CONSTRAINT_TABLE='".$table."'";
372 372
     }
373 373
 
374 374
     /**
@@ -377,14 +377,14 @@  discard block
 block discarded – undo
377 377
     public function getListTableIndexesSQL($table, $database = null)
378 378
     {
379 379
         if ($database) {
380
-            $database = "'" . $database . "'";
380
+            $database = "'".$database."'";
381 381
         } else {
382 382
             $database = 'DATABASE()';
383 383
         }
384 384
 
385
-        return "SELECT INDEX_NAME AS 'key_name', COLUMN_NAME AS 'column_name', IS_USED_IN_PRIMARY AS 'primary', IS_UNIQUE=0 AS 'non_unique'" .
386
-               " FROM DATA_DICTIONARY.INDEX_PARTS" .
387
-               " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME='" . $table . "'";
385
+        return "SELECT INDEX_NAME AS 'key_name', COLUMN_NAME AS 'column_name', IS_USED_IN_PRIMARY AS 'primary', IS_UNIQUE=0 AS 'non_unique'".
386
+               " FROM DATA_DICTIONARY.INDEX_PARTS".
387
+               " WHERE TABLE_SCHEMA=".$database." AND TABLE_NAME='".$table."'";
388 388
     }
389 389
 
390 390
     /**
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     /**
431 431
      * {@inheritDoc}
432 432
      */
433
-    public function getDropIndexSQL($index, $table=null)
433
+    public function getDropIndexSQL($index, $table = null)
434 434
     {
435 435
         if ($index instanceof Index) {
436 436
             $indexName = $index->getQuotedName($this);
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
             return $this->getDropPrimaryKeySQL($table);
453 453
         }
454 454
 
455
-        return 'DROP INDEX ' . $indexName . ' ON ' . $table;
455
+        return 'DROP INDEX '.$indexName.' ON '.$table;
456 456
     }
457 457
 
458 458
     /**
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
      */
461 461
     protected function getDropPrimaryKeySQL($table)
462 462
     {
463
-        return 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY';
463
+        return 'ALTER TABLE '.$table.' DROP PRIMARY KEY';
464 464
     }
465 465
 
466 466
     /**
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
         $queryParts = [];
501 501
 
502 502
         if ($diff->newName !== false) {
503
-            $queryParts[] =  'RENAME TO ' . $diff->getNewName()->getQuotedName($this);
503
+            $queryParts[] = 'RENAME TO '.$diff->getNewName()->getQuotedName($this);
504 504
         }
505 505
 
506 506
         foreach ($diff->addedColumns as $column) {
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 
511 511
             $columnArray = $column->toArray();
512 512
             $columnArray['comment'] = $this->getColumnComment($column);
513
-            $queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray);
513
+            $queryParts[] = 'ADD '.$this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray);
514 514
         }
515 515
 
516 516
         foreach ($diff->removedColumns as $column) {
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
                 continue;
519 519
             }
520 520
 
521
-            $queryParts[] =  'DROP ' . $column->getQuotedName($this);
521
+            $queryParts[] = 'DROP '.$column->getQuotedName($this);
522 522
         }
523 523
 
524 524
         foreach ($diff->changedColumns as $columnDiff) {
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
             }
542 542
 
543 543
             $columnArray['comment'] = $this->getColumnComment($column);
544
-            $queryParts[] =  'CHANGE ' . ($columnDiff->getOldColumnName()->getQuotedName($this)) . ' '
544
+            $queryParts[] = 'CHANGE '.($columnDiff->getOldColumnName()->getQuotedName($this)).' '
545 545
                     . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray);
546 546
         }
547 547
 
@@ -554,16 +554,16 @@  discard block
 block discarded – undo
554 554
 
555 555
             $columnArray = $column->toArray();
556 556
             $columnArray['comment'] = $this->getColumnComment($column);
557
-            $queryParts[] =  'CHANGE ' . $oldColumnName->getQuotedName($this) . ' '
557
+            $queryParts[] = 'CHANGE '.$oldColumnName->getQuotedName($this).' '
558 558
                     . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray);
559 559
         }
560 560
 
561 561
         $sql = [];
562 562
         $tableSql = [];
563 563
 
564
-        if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
564
+        if (!$this->onSchemaAlterTable($diff, $tableSql)) {
565 565
             if (count($queryParts) > 0) {
566
-                $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . implode(", ", $queryParts);
566
+                $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' '.implode(", ", $queryParts);
567 567
             }
568 568
             $sql = array_merge(
569 569
                 $this->getPreAlterTableIndexForeignKeySQL($diff),
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
             throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
587 587
         }
588 588
 
589
-        return 'DROP TEMPORARY TABLE ' . $table;
589
+        return 'DROP TEMPORARY TABLE '.$table;
590 590
     }
591 591
 
592 592
     /**
@@ -613,10 +613,10 @@  discard block
 block discarded – undo
613 613
     public function getLocateExpression($str, $substr, $startPos = false)
614 614
     {
615 615
         if ($startPos == false) {
616
-            return 'LOCATE(' . $substr . ', ' . $str . ')';
616
+            return 'LOCATE('.$substr.', '.$str.')';
617 617
         }
618 618
 
619
-        return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')';
619
+        return 'LOCATE('.$substr.', '.$str.', '.$startPos.')';
620 620
     }
621 621
 
622 622
     /**
Please login to merge, or discard this patch.
dbal/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php 2 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\DBAL\Platforms\Keywords;
21 21
 
22
-use Doctrine\DBAL\Schema\Visitor\Visitor;
23
-use Doctrine\DBAL\Schema\Table;
24 22
 use Doctrine\DBAL\Schema\Column;
25 23
 use Doctrine\DBAL\Schema\ForeignKeyConstraint;
24
+use Doctrine\DBAL\Schema\Index;
26 25
 use Doctrine\DBAL\Schema\Schema;
27 26
 use Doctrine\DBAL\Schema\Sequence;
28
-use Doctrine\DBAL\Schema\Index;
27
+use Doctrine\DBAL\Schema\Table;
28
+use Doctrine\DBAL\Schema\Visitor\Visitor;
29 29
 use function implode;
30 30
 use function str_replace;
31 31
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
      */
87 87
     private function addViolation($asset, $violatedPlatforms)
88 88
     {
89
-        if ( ! $violatedPlatforms) {
89
+        if (!$violatedPlatforms) {
90 90
             return;
91 91
         }
92 92
 
93
-        $this->violations[] = $asset . ' keyword violations: ' . implode(', ', $violatedPlatforms);
93
+        $this->violations[] = $asset.' keyword violations: '.implode(', ', $violatedPlatforms);
94 94
     }
95 95
 
96 96
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     public function acceptColumn(Table $table, Column $column)
100 100
     {
101 101
         $this->addViolation(
102
-            'Table ' . $table->getName() . ' column ' . $column->getName(),
102
+            'Table '.$table->getName().' column '.$column->getName(),
103 103
             $this->isReservedWord($column->getName())
104 104
         );
105 105
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public function acceptTable(Table $table)
139 139
     {
140 140
         $this->addViolation(
141
-            'Table ' . $table->getName(),
141
+            'Table '.$table->getName(),
142 142
             $this->isReservedWord($table->getName())
143 143
         );
144 144
     }
Please login to merge, or discard this patch.
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/OraclePlatform.php 3 patches
Doc Comments   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
      * @param string $table
500 500
      * @param int    $start
501 501
      *
502
-     * @return array
502
+     * @return string[]
503 503
      */
504 504
     public function getCreateAutoincrementSql($name, $table, $start = 1)
505 505
     {
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
      *
564 564
      * @param string $table The table name to drop the autoincrement for.
565 565
      *
566
-     * @return array
566
+     * @return string[]
567 567
      */
568 568
     public function getDropAutoincrementSql($table)
569 569
     {
@@ -696,6 +696,7 @@  discard block
 block discarded – undo
696 696
 
697 697
     /**
698 698
      * {@inheritDoc}
699
+     * @param string $sequence
699 700
      */
700 701
     public function getDropSequenceSQL($sequence)
701 702
     {
@@ -893,6 +894,7 @@  discard block
 block discarded – undo
893 894
 
894 895
     /**
895 896
      * {@inheritdoc}
897
+     * @param string $name
896 898
      */
897 899
     public function getColumnDeclarationSQL($name, array $field)
898 900
     {
@@ -951,6 +953,8 @@  discard block
 block discarded – undo
951 953
 
952 954
     /**
953 955
      * {@inheritdoc}
956
+     * @param string $tableName
957
+     * @param string $columnName
954 958
      */
955 959
     public function getIdentitySequenceName($tableName, $columnName)
956 960
     {
@@ -1183,6 +1187,7 @@  discard block
 block discarded – undo
1183 1187
 
1184 1188
     /**
1185 1189
      * {@inheritdoc}
1190
+     * @param string $str
1186 1191
      */
1187 1192
     public function quoteStringLiteral($str)
1188 1193
     {
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -198,10 +198,10 @@  discard block
 block discarded – undo
198 198
     public function getCreateSequenceSQL(Sequence $sequence)
199 199
     {
200 200
         return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) .
201
-               ' START WITH ' . $sequence->getInitialValue() .
202
-               ' MINVALUE ' . $sequence->getInitialValue() .
203
-               ' INCREMENT BY ' . $sequence->getAllocationSize() .
204
-               $this->getSequenceCacheSQL($sequence);
201
+                ' START WITH ' . $sequence->getInitialValue() .
202
+                ' MINVALUE ' . $sequence->getInitialValue() .
203
+                ' INCREMENT BY ' . $sequence->getAllocationSize() .
204
+                $this->getSequenceCacheSQL($sequence);
205 205
     }
206 206
 
207 207
     /**
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
     public function getAlterSequenceSQL(Sequence $sequence)
211 211
     {
212 212
         return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) .
213
-               ' INCREMENT BY ' . $sequence->getAllocationSize()
214
-               . $this->getSequenceCacheSQL($sequence);
213
+                ' INCREMENT BY ' . $sequence->getAllocationSize()
214
+                . $this->getSequenceCacheSQL($sequence);
215 215
     }
216 216
 
217 217
     /**
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         $database = $this->quoteStringLiteral($database->getName());
391 391
 
392 392
         return "SELECT sequence_name, min_value, increment_by FROM sys.all_sequences ".
393
-               "WHERE SEQUENCE_OWNER = " . $database;
393
+                "WHERE SEQUENCE_OWNER = " . $database;
394 394
     }
395 395
 
396 396
     /**
Please login to merge, or discard this patch.
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public static function assertValidIdentifier($identifier)
65 65
     {
66
-        if ( ! preg_match('(^(([a-zA-Z]{1}[a-zA-Z0-9_$#]{0,})|("[^"]+"))$)', $identifier)) {
66
+        if (!preg_match('(^(([a-zA-Z]{1}[a-zA-Z0-9_$#]{0,})|("[^"]+"))$)', $identifier)) {
67 67
             throw new DBALException("Invalid Oracle identifier");
68 68
         }
69 69
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                         break;
136 136
                 }
137 137
 
138
-                return 'ADD_MONTHS(' . $date . ', ' . $operator . $interval . ')';
138
+                return 'ADD_MONTHS('.$date.', '.$operator.$interval.')';
139 139
 
140 140
             default:
141 141
                 $calculationClause = '';
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                         break;
159 159
                 }
160 160
 
161
-                return '(' . $date . $operator . $interval . $calculationClause . ')';
161
+                return '('.$date.$operator.$interval.$calculationClause.')';
162 162
         }
163 163
     }
164 164
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getBitAndComparisonExpression($value1, $value2)
177 177
     {
178
-        return 'BITAND('.$value1 . ', ' . $value2 . ')';
178
+        return 'BITAND('.$value1.', '.$value2.')';
179 179
     }
180 180
 
181 181
     /**
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
      */
184 184
     public function getBitOrComparisonExpression($value1, $value2)
185 185
     {
186
-        return '(' . $value1 . '-' .
186
+        return '('.$value1.'-'.
187 187
                 $this->getBitAndComparisonExpression($value1, $value2)
188
-                . '+' . $value2 . ')';
188
+                . '+'.$value2.')';
189 189
     }
190 190
 
191 191
     /**
@@ -197,10 +197,10 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public function getCreateSequenceSQL(Sequence $sequence)
199 199
     {
200
-        return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) .
201
-               ' START WITH ' . $sequence->getInitialValue() .
202
-               ' MINVALUE ' . $sequence->getInitialValue() .
203
-               ' INCREMENT BY ' . $sequence->getAllocationSize() .
200
+        return 'CREATE SEQUENCE '.$sequence->getQuotedName($this).
201
+               ' START WITH '.$sequence->getInitialValue().
202
+               ' MINVALUE '.$sequence->getInitialValue().
203
+               ' INCREMENT BY '.$sequence->getAllocationSize().
204 204
                $this->getSequenceCacheSQL($sequence);
205 205
     }
206 206
 
@@ -209,8 +209,8 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function getAlterSequenceSQL(Sequence $sequence)
211 211
     {
212
-        return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) .
213
-               ' INCREMENT BY ' . $sequence->getAllocationSize()
212
+        return 'ALTER SEQUENCE '.$sequence->getQuotedName($this).
213
+               ' INCREMENT BY '.$sequence->getAllocationSize()
214 214
                . $this->getSequenceCacheSQL($sequence);
215 215
     }
216 216
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         } else if ($sequence->getCache() === 1) {
229 229
             return ' NOCACHE';
230 230
         } else if ($sequence->getCache() > 1) {
231
-            return ' CACHE ' . $sequence->getCache();
231
+            return ' CACHE '.$sequence->getCache();
232 232
         }
233 233
 
234 234
         return '';
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     public function getSequenceNextValSQL($sequenceName)
241 241
     {
242
-        return 'SELECT ' . $sequenceName . '.nextval FROM DUAL';
242
+        return 'SELECT '.$sequenceName.'.nextval FROM DUAL';
243 243
     }
244 244
 
245 245
     /**
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function getSetTransactionIsolationSQL($level)
249 249
     {
250
-        return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level);
250
+        return 'SET TRANSACTION ISOLATION LEVEL '.$this->_getTransactionIsolationLevelSQL($level);
251 251
     }
252 252
 
253 253
     /**
@@ -345,8 +345,8 @@  discard block
 block discarded – undo
345 345
      */
346 346
     protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
347 347
     {
348
-        return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(2000)')
349
-                : ($length ? 'VARCHAR2(' . $length . ')' : 'VARCHAR2(4000)');
348
+        return $fixed ? ($length ? 'CHAR('.$length.')' : 'CHAR(2000)')
349
+                : ($length ? 'VARCHAR2('.$length.')' : 'VARCHAR2(4000)');
350 350
     }
351 351
 
352 352
     /**
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      */
355 355
     protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed)
356 356
     {
357
-        return 'RAW(' . ($length ?: $this->getBinaryMaxLength()) . ')';
357
+        return 'RAW('.($length ?: $this->getBinaryMaxLength()).')';
358 358
     }
359 359
 
360 360
     /**
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         $database = $this->quoteStringLiteral($database->getName());
391 391
 
392 392
         return "SELECT sequence_name, min_value, increment_by FROM sys.all_sequences ".
393
-               "WHERE SEQUENCE_OWNER = " . $database;
393
+               "WHERE SEQUENCE_OWNER = ".$database;
394 394
     }
395 395
 
396 396
     /**
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
             }
414 414
         }
415 415
 
416
-        if (isset($indexes) && ! empty($indexes)) {
416
+        if (isset($indexes) && !empty($indexes)) {
417 417
             foreach ($indexes as $index) {
418 418
                 $sql[] = $this->getCreateIndexSQL($index, $table);
419 419
             }
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
                            WHERE  ucon.index_name = uind_col.index_name
459 459
                        ) AS is_primary
460 460
              FROM      user_ind_columns uind_col
461
-             WHERE     uind_col.table_name = " . $table . "
461
+             WHERE     uind_col.table_name = " . $table."
462 462
              ORDER BY  uind_col.column_position ASC";
463 463
     }
464 464
 
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
      */
484 484
     public function getCreateViewSQL($name, $sql)
485 485
     {
486
-        return 'CREATE VIEW ' . $name . ' AS ' . $sql;
486
+        return 'CREATE VIEW '.$name.' AS '.$sql;
487 487
     }
488 488
 
489 489
     /**
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
      */
492 492
     public function getDropViewSQL($name)
493 493
     {
494
-        return 'DROP VIEW '. $name;
494
+        return 'DROP VIEW '.$name;
495 495
     }
496 496
 
497 497
     /**
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
         $sql[] = 'DECLARE
521 521
   constraints_Count NUMBER;
522 522
 BEGIN
523
-  SELECT COUNT(CONSTRAINT_NAME) INTO constraints_Count FROM USER_CONSTRAINTS WHERE TABLE_NAME = \'' . $unquotedTableName . '\' AND CONSTRAINT_TYPE = \'P\';
523
+  SELECT COUNT(CONSTRAINT_NAME) INTO constraints_Count FROM USER_CONSTRAINTS WHERE TABLE_NAME = \'' . $unquotedTableName.'\' AND CONSTRAINT_TYPE = \'P\';
524 524
   IF constraints_Count = 0 OR constraints_Count = \'\' THEN
525 525
     EXECUTE IMMEDIATE \''.$this->getCreateConstraintSQL($idx, $quotedTableName).'\';
526 526
   END IF;
@@ -533,24 +533,24 @@  discard block
 block discarded – undo
533 533
         $sequence = new Sequence($sequenceName, $start);
534 534
         $sql[] = $this->getCreateSequenceSQL($sequence);
535 535
 
536
-        $sql[] = 'CREATE TRIGGER ' . $autoincrementIdentifierName . '
536
+        $sql[] = 'CREATE TRIGGER '.$autoincrementIdentifierName.'
537 537
    BEFORE INSERT
538
-   ON ' . $quotedTableName . '
538
+   ON ' . $quotedTableName.'
539 539
    FOR EACH ROW
540 540
 DECLARE
541 541
    last_Sequence NUMBER;
542 542
    last_InsertID NUMBER;
543 543
 BEGIN
544
-   SELECT ' . $sequenceName . '.NEXTVAL INTO :NEW.' . $quotedName . ' FROM DUAL;
545
-   IF (:NEW.' . $quotedName . ' IS NULL OR :NEW.'.$quotedName.' = 0) THEN
546
-      SELECT ' . $sequenceName . '.NEXTVAL INTO :NEW.' . $quotedName . ' FROM DUAL;
544
+   SELECT ' . $sequenceName.'.NEXTVAL INTO :NEW.'.$quotedName.' FROM DUAL;
545
+   IF (:NEW.' . $quotedName.' IS NULL OR :NEW.'.$quotedName.' = 0) THEN
546
+      SELECT ' . $sequenceName.'.NEXTVAL INTO :NEW.'.$quotedName.' FROM DUAL;
547 547
    ELSE
548 548
       SELECT NVL(Last_Number, 0) INTO last_Sequence
549 549
         FROM User_Sequences
550
-       WHERE Sequence_Name = \'' . $sequence->getName() . '\';
551
-      SELECT :NEW.' . $quotedName . ' INTO last_InsertID FROM DUAL;
550
+       WHERE Sequence_Name = \'' . $sequence->getName().'\';
551
+      SELECT :NEW.' . $quotedName.' INTO last_InsertID FROM DUAL;
552 552
       WHILE (last_InsertID > last_Sequence) LOOP
553
-         SELECT ' . $sequenceName . '.NEXTVAL INTO last_Sequence FROM DUAL;
553
+         SELECT ' . $sequenceName.'.NEXTVAL INTO last_Sequence FROM DUAL;
554 554
       END LOOP;
555 555
    END IF;
556 556
 END;';
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
         );
576 576
 
577 577
         return [
578
-            'DROP TRIGGER ' . $autoincrementIdentifierName,
578
+            'DROP TRIGGER '.$autoincrementIdentifierName,
579 579
             $this->getDropSequenceSQL($identitySequenceName),
580 580
             $this->getDropConstraintSQL($autoincrementIdentifierName, $table->getQuotedName($this)),
581 581
         ];
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
      */
611 611
     private function getAutoincrementIdentifierName(Identifier $table)
612 612
     {
613
-        $identifierName = $table->getName() . '_AI_PK';
613
+        $identifierName = $table->getName().'_AI_PK';
614 614
 
615 615
         return $table->isQuoted()
616 616
             ? $this->quoteSingleIdentifier($identifierName)
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
      JOIN user_constraints alc
646 646
        ON alc.constraint_name = cols.constraint_name
647 647
       AND alc.constraint_type = 'R'
648
-      AND alc.table_name = " . $table . "
648
+      AND alc.table_name = " . $table."
649 649
     ORDER BY cols.constraint_name ASC, cols.position ASC";
650 650
     }
651 651
 
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
         $table = $this->normalizeIdentifier($table);
658 658
         $table = $this->quoteStringLiteral($table->getName());
659 659
 
660
-        return "SELECT * FROM user_constraints WHERE table_name = " . $table;
660
+        return "SELECT * FROM user_constraints WHERE table_name = ".$table;
661 661
     }
662 662
 
663 663
     /**
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
             $database = $this->quoteStringLiteral($database->getName());
679 679
             $tabColumnsTableName = "all_tab_columns";
680 680
             $colCommentsTableName = "all_col_comments";
681
-            $tabColumnsOwnerCondition = "AND c.owner = " . $database;
681
+            $tabColumnsOwnerCondition = "AND c.owner = ".$database;
682 682
             $colCommentsOwnerCondition = "AND d.OWNER = c.OWNER";
683 683
         }
684 684
 
@@ -686,11 +686,11 @@  discard block
 block discarded – undo
686 686
                          (
687 687
                              SELECT d.comments
688 688
                              FROM   $colCommentsTableName d
689
-                             WHERE  d.TABLE_NAME = c.TABLE_NAME " . $colCommentsOwnerCondition . "
689
+                             WHERE  d.TABLE_NAME = c.TABLE_NAME ".$colCommentsOwnerCondition."
690 690
                              AND    d.COLUMN_NAME = c.COLUMN_NAME
691 691
                          ) AS comments
692 692
                 FROM     $tabColumnsTableName c
693
-                WHERE    c.table_name = " . $table . " $tabColumnsOwnerCondition
693
+                WHERE    c.table_name = ".$table." $tabColumnsOwnerCondition
694 694
                 ORDER BY c.column_id";
695 695
     }
696 696
 
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
             $sequence = $sequence->getQuotedName($this);
704 704
         }
705 705
 
706
-        return 'DROP SEQUENCE ' . $sequence;
706
+        return 'DROP SEQUENCE '.$sequence;
707 707
     }
708 708
 
709 709
     /**
@@ -711,18 +711,18 @@  discard block
 block discarded – undo
711 711
      */
712 712
     public function getDropForeignKeySQL($foreignKey, $table)
713 713
     {
714
-        if (! $foreignKey instanceof ForeignKeyConstraint) {
714
+        if (!$foreignKey instanceof ForeignKeyConstraint) {
715 715
             $foreignKey = new Identifier($foreignKey);
716 716
         }
717 717
 
718
-        if (! $table instanceof Table) {
718
+        if (!$table instanceof Table) {
719 719
             $table = new Identifier($table);
720 720
         }
721 721
 
722 722
         $foreignKey = $foreignKey->getQuotedName($this);
723 723
         $table = $table->getQuotedName($this);
724 724
 
725
-        return 'ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $foreignKey;
725
+        return 'ALTER TABLE '.$table.' DROP CONSTRAINT '.$foreignKey;
726 726
     }
727 727
 
728 728
     /**
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
             $referentialAction = $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete'));
737 737
         }
738 738
 
739
-        return $referentialAction ? ' ON DELETE ' . $referentialAction : '';
739
+        return $referentialAction ? ' ON DELETE '.$referentialAction : '';
740 740
     }
741 741
 
742 742
     /**
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 
760 760
             default:
761 761
                 // SET DEFAULT is not supported, throw exception instead.
762
-                throw new \InvalidArgumentException('Invalid foreign key action: ' . $action);
762
+                throw new \InvalidArgumentException('Invalid foreign key action: '.$action);
763 763
         }
764 764
     }
765 765
 
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
      */
769 769
     public function getDropDatabaseSQL($database)
770 770
     {
771
-        return 'DROP USER ' . $database . ' CASCADE';
771
+        return 'DROP USER '.$database.' CASCADE';
772 772
     }
773 773
 
774 774
     /**
@@ -798,7 +798,7 @@  discard block
 block discarded – undo
798 798
         }
799 799
 
800 800
         if (count($fields)) {
801
-            $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ADD (' . implode(', ', $fields) . ')';
801
+            $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' ADD ('.implode(', ', $fields).')';
802 802
         }
803 803
 
804 804
         $fields = [];
@@ -825,14 +825,14 @@  discard block
 block discarded – undo
825 825
             /**
826 826
              * Do not add query part if only comment has changed
827 827
              */
828
-            if ( ! ($columnHasChangedComment && count($columnDiff->changedProperties) === 1)) {
828
+            if (!($columnHasChangedComment && count($columnDiff->changedProperties) === 1)) {
829 829
                 $columnInfo = $column->toArray();
830 830
 
831
-                if ( ! $columnDiff->hasChanged('notnull')) {
831
+                if (!$columnDiff->hasChanged('notnull')) {
832 832
                     unset($columnInfo['notnull']);
833 833
                 }
834 834
 
835
-                $fields[] = $column->getQuotedName($this) . $this->getColumnDeclarationSQL('', $columnInfo);
835
+                $fields[] = $column->getQuotedName($this).$this->getColumnDeclarationSQL('', $columnInfo);
836 836
             }
837 837
 
838 838
             if ($columnHasChangedComment) {
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
         }
846 846
 
847 847
         if (count($fields)) {
848
-            $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' MODIFY (' . implode(', ', $fields) . ')';
848
+            $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' MODIFY ('.implode(', ', $fields).')';
849 849
         }
850 850
 
851 851
         foreach ($diff->renamedColumns as $oldColumnName => $column) {
@@ -855,8 +855,8 @@  discard block
 block discarded – undo
855 855
 
856 856
             $oldColumnName = new Identifier($oldColumnName);
857 857
 
858
-            $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) .
859
-                ' RENAME COLUMN ' . $oldColumnName->getQuotedName($this) .' TO ' . $column->getQuotedName($this);
858
+            $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).
859
+                ' RENAME COLUMN '.$oldColumnName->getQuotedName($this).' TO '.$column->getQuotedName($this);
860 860
         }
861 861
 
862 862
         $fields = [];
@@ -869,16 +869,16 @@  discard block
 block discarded – undo
869 869
         }
870 870
 
871 871
         if (count($fields)) {
872
-            $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' DROP (' . implode(', ', $fields).')';
872
+            $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' DROP ('.implode(', ', $fields).')';
873 873
         }
874 874
 
875 875
         $tableSql = [];
876 876
 
877
-        if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
877
+        if (!$this->onSchemaAlterTable($diff, $tableSql)) {
878 878
             $sql = array_merge($sql, $commentsSQL);
879 879
 
880 880
             if ($diff->newName !== false) {
881
-                $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' RENAME TO ' . $diff->getNewName()->getQuotedName($this);
881
+                $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' RENAME TO '.$diff->getNewName()->getQuotedName($this);
882 882
             }
883 883
 
884 884
             $sql = array_merge(
@@ -908,16 +908,16 @@  discard block
 block discarded – undo
908 908
             }
909 909
 
910 910
             $unique = (isset($field['unique']) && $field['unique']) ?
911
-                ' ' . $this->getUniqueFieldDeclarationSQL() : '';
911
+                ' '.$this->getUniqueFieldDeclarationSQL() : '';
912 912
 
913 913
             $check = (isset($field['check']) && $field['check']) ?
914
-                ' ' . $field['check'] : '';
914
+                ' '.$field['check'] : '';
915 915
 
916 916
             $typeDecl = $field['type']->getSQLDeclaration($field, $this);
917
-            $columnDef = $typeDecl . $default . $notnull . $unique . $check;
917
+            $columnDef = $typeDecl.$default.$notnull.$unique.$check;
918 918
         }
919 919
 
920
-        return $name . ' ' . $columnDef;
920
+        return $name.' '.$columnDef;
921 921
     }
922 922
 
923 923
     /**
@@ -927,10 +927,10 @@  discard block
 block discarded – undo
927 927
     {
928 928
         if (strpos($tableName, '.') !== false) {
929 929
             list($schema) = explode('.', $tableName);
930
-            $oldIndexName = $schema . '.' . $oldIndexName;
930
+            $oldIndexName = $schema.'.'.$oldIndexName;
931 931
         }
932 932
 
933
-        return ['ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)];
933
+        return ['ALTER INDEX '.$oldIndexName.' RENAME TO '.$index->getQuotedName($this)];
934 934
     }
935 935
 
936 936
     /**
@@ -957,10 +957,10 @@  discard block
 block discarded – undo
957 957
         $table = new Identifier($tableName);
958 958
 
959 959
         // No usage of column name to preserve BC compatibility with <2.5
960
-        $identitySequenceName = $table->getName() . '_SEQ';
960
+        $identitySequenceName = $table->getName().'_SEQ';
961 961
 
962 962
         if ($table->isQuoted()) {
963
-            $identitySequenceName = '"' . $identitySequenceName . '"';
963
+            $identitySequenceName = '"'.$identitySequenceName.'"';
964 964
         }
965 965
 
966 966
         $identitySequenceIdentifier = $this->normalizeIdentifier($identitySequenceName);
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
     {
1113 1113
         $tableIdentifier = new Identifier($tableName);
1114 1114
 
1115
-        return 'TRUNCATE TABLE ' . $tableIdentifier->getQuotedName($this);
1115
+        return 'TRUNCATE TABLE '.$tableIdentifier->getQuotedName($this);
1116 1116
     }
1117 1117
 
1118 1118
     /**
Please login to merge, or discard this patch.
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php 4 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -100,6 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
     /**
102 102
      * {@inheritDoc}
103
+     * @param boolean $from
103 104
      */
104 105
     public function getSubstringExpression($value, $from, $length = null)
105 106
     {
@@ -211,6 +212,8 @@  discard block
 block discarded – undo
211 212
 
212 213
     /**
213 214
      * {@inheritdoc}
215
+     * @param string $tableName
216
+     * @param string $columnName
214 217
      */
215 218
     public function getIdentitySequenceName($tableName, $columnName)
216 219
     {
@@ -691,6 +694,9 @@  discard block
 block discarded – undo
691 694
 
692 695
     /**
693 696
      * {@inheritdoc}
697
+     * @param string $tableName
698
+     * @param string $columnName
699
+     * @param string|null $comment
694 700
      */
695 701
     public function getCommentOnColumnSQL($tableName, $columnName, $comment)
696 702
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
 use Doctrine\DBAL\Schema\Index;
26 26
 use Doctrine\DBAL\Schema\Sequence;
27 27
 use Doctrine\DBAL\Schema\TableDiff;
28
-use Doctrine\DBAL\Types\BinaryType;
29 28
 use Doctrine\DBAL\Types\BigIntType;
29
+use Doctrine\DBAL\Types\BinaryType;
30 30
 use Doctrine\DBAL\Types\BlobType;
31 31
 use Doctrine\DBAL\Types\IntegerType;
32 32
 use Doctrine\DBAL\Types\Type;
Please login to merge, or discard this patch.
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
     public function getSubstringExpression($value, $from, $length = null)
105 105
     {
106 106
         if ($length === null) {
107
-            return 'SUBSTRING(' . $value . ' FROM ' . $from . ')';
107
+            return 'SUBSTRING('.$value.' FROM '.$from.')';
108 108
         }
109 109
 
110
-        return 'SUBSTRING(' . $value . ' FROM ' . $from . ' FOR ' . $length . ')';
110
+        return 'SUBSTRING('.$value.' FROM '.$from.' FOR '.$length.')';
111 111
     }
112 112
 
113 113
     /**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         if ($startPos !== false) {
135 135
             $str = $this->getSubstringExpression($str, $startPos);
136 136
 
137
-            return 'CASE WHEN (POSITION('.$substr.' IN '.$str.') = 0) THEN 0 ELSE (POSITION('.$substr.' IN '.$str.') + '.($startPos-1).') END';
137
+            return 'CASE WHEN (POSITION('.$substr.' IN '.$str.') = 0) THEN 0 ELSE (POSITION('.$substr.' IN '.$str.') + '.($startPos - 1).') END';
138 138
         }
139 139
 
140 140
         return 'POSITION('.$substr.' IN '.$str.')';
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             $unit      = DateIntervalUnit::MONTH;
151 151
         }
152 152
 
153
-        return "(" . $date ." " . $operator . " (" . $interval . " || ' " . $unit . "')::interval)";
153
+        return "(".$date." ".$operator." (".$interval." || ' ".$unit."')::interval)";
154 154
     }
155 155
 
156 156
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function getDateDiffExpression($date1, $date2)
160 160
     {
161
-        return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))';
161
+        return '(DATE('.$date1.')-DATE('.$date2.'))';
162 162
     }
163 163
 
164 164
     /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function getIdentitySequenceName($tableName, $columnName)
216 216
     {
217
-        return $tableName . '_' . $columnName . '_seq';
217
+        return $tableName.'_'.$columnName.'_seq';
218 218
     }
219 219
 
220 220
     /**
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                   (
311 311
                       SELECT c.oid
312 312
                       FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
313
-                      WHERE " .$this->getTableWhereClause($table) ." AND n.oid = c.relnamespace
313
+                      WHERE " .$this->getTableWhereClause($table)." AND n.oid = c.relnamespace
314 314
                   )
315 315
                   AND r.contype = 'f'";
316 316
     }
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      */
321 321
     public function getCreateViewSQL($name, $sql)
322 322
     {
323
-        return 'CREATE VIEW ' . $name . ' AS ' . $sql;
323
+        return 'CREATE VIEW '.$name.' AS '.$sql;
324 324
     }
325 325
 
326 326
     /**
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
      */
329 329
     public function getDropViewSQL($name)
330 330
     {
331
-        return 'DROP VIEW '. $name;
331
+        return 'DROP VIEW '.$name;
332 332
     }
333 333
 
334 334
     /**
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
         $table = new Identifier($table);
392 392
         $table = $this->quoteStringLiteral($table->getName());
393
-        $whereClause .= "$classAlias.relname = " . $table . " AND $namespaceAlias.nspname = $schema";
393
+        $whereClause .= "$classAlias.relname = ".$table." AND $namespaceAlias.nspname = $schema";
394 394
 
395 395
         return $whereClause;
396 396
     }
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
                         FROM pg_description WHERE pg_description.objoid = c.oid AND a.attnum = pg_description.objsubid
425 425
                     ) AS comment
426 426
                     FROM pg_attribute a, pg_class c, pg_type t, pg_namespace n
427
-                    WHERE ".$this->getTableWhereClause($table, 'c', 'n') ."
427
+                    WHERE ".$this->getTableWhereClause($table, 'c', 'n')."
428 428
                         AND a.attnum > 0
429 429
                         AND a.attrelid = c.oid
430 430
                         AND a.atttypid = t.oid
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      */
438 438
     public function getCreateDatabaseSQL($name)
439 439
     {
440
-        return 'CREATE DATABASE ' . $name;
440
+        return 'CREATE DATABASE '.$name;
441 441
     }
442 442
 
443 443
     /**
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
         $query = '';
479 479
 
480 480
         if ($foreignKey->hasOption('match')) {
481
-            $query .= ' MATCH ' . $foreignKey->getOption('match');
481
+            $query .= ' MATCH '.$foreignKey->getOption('match');
482 482
         }
483 483
 
484 484
         $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey);
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
                 continue;
515 515
             }
516 516
 
517
-            $query = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());
518
-            $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query;
517
+            $query = 'ADD '.$this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());
518
+            $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' '.$query;
519 519
 
520 520
             $comment = $this->getColumnComment($column);
521 521
 
@@ -533,8 +533,8 @@  discard block
 block discarded – undo
533 533
                 continue;
534 534
             }
535 535
 
536
-            $query = 'DROP ' . $column->getQuotedName($this);
537
-            $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query;
536
+            $query = 'DROP '.$column->getQuotedName($this);
537
+            $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' '.$query;
538 538
         }
539 539
 
540 540
         foreach ($diff->changedColumns as $columnDiff) {
@@ -558,21 +558,21 @@  discard block
 block discarded – undo
558 558
                 $columnDefinition['autoincrement'] = false;
559 559
 
560 560
                 // here was a server version check before, but DBAL API does not support this anymore.
561
-                $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $type->getSQLDeclaration($columnDefinition, $this);
562
-                $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query;
561
+                $query = 'ALTER '.$oldColumnName.' TYPE '.$type->getSQLDeclaration($columnDefinition, $this);
562
+                $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' '.$query;
563 563
             }
564 564
 
565 565
             if ($columnDiff->hasChanged('default') || $this->typeChangeBreaksDefaultValue($columnDiff)) {
566 566
                 $defaultClause = null === $column->getDefault()
567 567
                     ? ' DROP DEFAULT'
568
-                    : ' SET' . $this->getDefaultValueDeclarationSQL($column->toArray());
569
-                $query = 'ALTER ' . $oldColumnName . $defaultClause;
570
-                $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query;
568
+                    : ' SET'.$this->getDefaultValueDeclarationSQL($column->toArray());
569
+                $query = 'ALTER '.$oldColumnName.$defaultClause;
570
+                $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' '.$query;
571 571
             }
572 572
 
573 573
             if ($columnDiff->hasChanged('notnull')) {
574
-                $query = 'ALTER ' . $oldColumnName . ' ' . ($column->getNotnull() ? 'SET' : 'DROP') . ' NOT NULL';
575
-                $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query;
574
+                $query = 'ALTER '.$oldColumnName.' '.($column->getNotnull() ? 'SET' : 'DROP').' NOT NULL';
575
+                $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' '.$query;
576 576
             }
577 577
 
578 578
             if ($columnDiff->hasChanged('autoincrement')) {
@@ -580,14 +580,14 @@  discard block
 block discarded – undo
580 580
                     // add autoincrement
581 581
                     $seqName = $this->getIdentitySequenceName($diff->name, $oldColumnName);
582 582
 
583
-                    $sql[] = "CREATE SEQUENCE " . $seqName;
584
-                    $sql[] = "SELECT setval('" . $seqName . "', (SELECT MAX(" . $oldColumnName . ") FROM " . $diff->getName($this)->getQuotedName($this) . "))";
585
-                    $query = "ALTER " . $oldColumnName . " SET DEFAULT nextval('" . $seqName . "')";
586
-                    $sql[] = "ALTER TABLE " . $diff->getName($this)->getQuotedName($this) . " " . $query;
583
+                    $sql[] = "CREATE SEQUENCE ".$seqName;
584
+                    $sql[] = "SELECT setval('".$seqName."', (SELECT MAX(".$oldColumnName.") FROM ".$diff->getName($this)->getQuotedName($this)."))";
585
+                    $query = "ALTER ".$oldColumnName." SET DEFAULT nextval('".$seqName."')";
586
+                    $sql[] = "ALTER TABLE ".$diff->getName($this)->getQuotedName($this)." ".$query;
587 587
                 } else {
588 588
                     // Drop autoincrement, but do NOT drop the sequence. It might be re-used by other tables or have
589
-                    $query = "ALTER " . $oldColumnName . " " . "DROP DEFAULT";
590
-                    $sql[] = "ALTER TABLE " . $diff->getName($this)->getQuotedName($this) . " " . $query;
589
+                    $query = "ALTER ".$oldColumnName." "."DROP DEFAULT";
590
+                    $sql[] = "ALTER TABLE ".$diff->getName($this)->getQuotedName($this)." ".$query;
591 591
                 }
592 592
             }
593 593
 
@@ -600,8 +600,8 @@  discard block
 block discarded – undo
600 600
             }
601 601
 
602 602
             if ($columnDiff->hasChanged('length')) {
603
-                $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $column->getType()->getSQLDeclaration($column->toArray(), $this);
604
-                $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query;
603
+                $query = 'ALTER '.$oldColumnName.' TYPE '.$column->getType()->getSQLDeclaration($column->toArray(), $this);
604
+                $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' '.$query;
605 605
             }
606 606
         }
607 607
 
@@ -612,17 +612,17 @@  discard block
 block discarded – undo
612 612
 
613 613
             $oldColumnName = new Identifier($oldColumnName);
614 614
 
615
-            $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) .
616
-                ' RENAME COLUMN ' . $oldColumnName->getQuotedName($this) . ' TO ' . $column->getQuotedName($this);
615
+            $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).
616
+                ' RENAME COLUMN '.$oldColumnName->getQuotedName($this).' TO '.$column->getQuotedName($this);
617 617
         }
618 618
 
619 619
         $tableSql = [];
620 620
 
621
-        if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
621
+        if (!$this->onSchemaAlterTable($diff, $tableSql)) {
622 622
             $sql = array_merge($sql, $commentsSQL);
623 623
 
624 624
             if ($diff->newName !== false) {
625
-                $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' RENAME TO ' . $diff->getNewName()->getQuotedName($this);
625
+                $sql[] = 'ALTER TABLE '.$diff->getName($this)->getQuotedName($this).' RENAME TO '.$diff->getNewName()->getQuotedName($this);
626 626
             }
627 627
 
628 628
             $sql = array_merge(
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
     {
654 654
         $columnType = $columnDiff->column->getType();
655 655
 
656
-        if ( ! $columnType instanceof BinaryType && ! $columnType instanceof BlobType) {
656
+        if (!$columnType instanceof BinaryType && !$columnType instanceof BlobType) {
657 657
             return false;
658 658
         }
659 659
 
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
         if ($fromColumn) {
663 663
             $fromColumnType = $fromColumn->getType();
664 664
 
665
-            if ( ! $fromColumnType instanceof BinaryType && ! $fromColumnType instanceof BlobType) {
665
+            if (!$fromColumnType instanceof BinaryType && !$fromColumnType instanceof BlobType) {
666 666
                 return false;
667 667
             }
668 668
 
@@ -683,10 +683,10 @@  discard block
 block discarded – undo
683 683
     {
684 684
         if (strpos($tableName, '.') !== false) {
685 685
             list($schema) = explode('.', $tableName);
686
-            $oldIndexName = $schema . '.' . $oldIndexName;
686
+            $oldIndexName = $schema.'.'.$oldIndexName;
687 687
         }
688 688
 
689
-        return ['ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)];
689
+        return ['ALTER INDEX '.$oldIndexName.' RENAME TO '.$index->getQuotedName($this)];
690 690
     }
691 691
 
692 692
     /**
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
         $columnName = new Identifier($columnName);
699 699
         $comment = $comment === null ? 'NULL' : $this->quoteStringLiteral($comment);
700 700
 
701
-        return "COMMENT ON COLUMN " . $tableName->getQuotedName($this) . "." . $columnName->getQuotedName($this) .
701
+        return "COMMENT ON COLUMN ".$tableName->getQuotedName($this).".".$columnName->getQuotedName($this).
702 702
             " IS $comment";
703 703
     }
704 704
 
@@ -707,10 +707,10 @@  discard block
 block discarded – undo
707 707
      */
708 708
     public function getCreateSequenceSQL(Sequence $sequence)
709 709
     {
710
-        return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) .
711
-            ' INCREMENT BY ' . $sequence->getAllocationSize() .
712
-            ' MINVALUE ' . $sequence->getInitialValue() .
713
-            ' START ' . $sequence->getInitialValue() .
710
+        return 'CREATE SEQUENCE '.$sequence->getQuotedName($this).
711
+            ' INCREMENT BY '.$sequence->getAllocationSize().
712
+            ' MINVALUE '.$sequence->getInitialValue().
713
+            ' START '.$sequence->getInitialValue().
714 714
             $this->getSequenceCacheSQL($sequence);
715 715
     }
716 716
 
@@ -719,8 +719,8 @@  discard block
 block discarded – undo
719 719
      */
720 720
     public function getAlterSequenceSQL(Sequence $sequence)
721 721
     {
722
-        return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) .
723
-            ' INCREMENT BY ' . $sequence->getAllocationSize() .
722
+        return 'ALTER SEQUENCE '.$sequence->getQuotedName($this).
723
+            ' INCREMENT BY '.$sequence->getAllocationSize().
724 724
             $this->getSequenceCacheSQL($sequence);
725 725
     }
726 726
 
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
     private function getSequenceCacheSQL(Sequence $sequence)
735 735
     {
736 736
         if ($sequence->getCache() > 1) {
737
-            return ' CACHE ' . $sequence->getCache();
737
+            return ' CACHE '.$sequence->getCache();
738 738
         }
739 739
 
740 740
         return '';
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
             $sequence = $sequence->getQuotedName($this);
750 750
         }
751 751
 
752
-        return 'DROP SEQUENCE ' . $sequence . ' CASCADE';
752
+        return 'DROP SEQUENCE '.$sequence.' CASCADE';
753 753
     }
754 754
 
755 755
     /**
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
      */
758 758
     public function getCreateSchemaSQL($schemaName)
759 759
     {
760
-        return 'CREATE SCHEMA ' . $schemaName;
760
+        return 'CREATE SCHEMA '.$schemaName;
761 761
     }
762 762
 
763 763
     /**
@@ -775,16 +775,16 @@  discard block
 block discarded – undo
775 775
     {
776 776
         $queryFields = $this->getColumnDeclarationListSQL($columns);
777 777
 
778
-        if (isset($options['primary']) && ! empty($options['primary'])) {
778
+        if (isset($options['primary']) && !empty($options['primary'])) {
779 779
             $keyColumns = array_unique(array_values($options['primary']));
780
-            $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')';
780
+            $queryFields .= ', PRIMARY KEY('.implode(', ', $keyColumns).')';
781 781
         }
782 782
 
783
-        $query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')';
783
+        $query = 'CREATE TABLE '.$tableName.' ('.$queryFields.')';
784 784
 
785 785
         $sql = [$query];
786 786
 
787
-        if (isset($options['indexes']) && ! empty($options['indexes'])) {
787
+        if (isset($options['indexes']) && !empty($options['indexes'])) {
788 788
             foreach ($options['indexes'] as $index) {
789 789
                 $sql[] = $this->getCreateIndexSQL($index, $tableName);
790 790
             }
@@ -872,13 +872,13 @@  discard block
 block discarded – undo
872 872
      */
873 873
     public function convertBooleans($item)
874 874
     {
875
-        if ( ! $this->useBooleanTrueFalseStrings) {
875
+        if (!$this->useBooleanTrueFalseStrings) {
876 876
             return parent::convertBooleans($item);
877 877
         }
878 878
 
879 879
         return $this->doConvertBooleans(
880 880
             $item,
881
-            function ($boolean) {
881
+            function($boolean){
882 882
                 if (null === $boolean) {
883 883
                     return 'NULL';
884 884
                 }
@@ -893,13 +893,13 @@  discard block
 block discarded – undo
893 893
      */
894 894
     public function convertBooleansToDatabaseValue($item)
895 895
     {
896
-        if ( ! $this->useBooleanTrueFalseStrings) {
896
+        if (!$this->useBooleanTrueFalseStrings) {
897 897
             return parent::convertBooleansToDatabaseValue($item);
898 898
         }
899 899
 
900 900
         return $this->doConvertBooleans(
901 901
             $item,
902
-            function ($boolean) {
902
+            function($boolean){
903 903
                 return null === $boolean ? null : (int) $boolean;
904 904
             }
905 905
         );
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
      */
923 923
     public function getSequenceNextValSQL($sequenceName)
924 924
     {
925
-        return "SELECT NEXTVAL('" . $sequenceName . "')";
925
+        return "SELECT NEXTVAL('".$sequenceName."')";
926 926
     }
927 927
 
928 928
     /**
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
      */
948 948
     public function getIntegerTypeDeclarationSQL(array $field)
949 949
     {
950
-        if ( ! empty($field['autoincrement'])) {
950
+        if (!empty($field['autoincrement'])) {
951 951
             return 'SERIAL';
952 952
         }
953 953
 
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
      */
960 960
     public function getBigIntTypeDeclarationSQL(array $field)
961 961
     {
962
-        if ( ! empty($field['autoincrement'])) {
962
+        if (!empty($field['autoincrement'])) {
963 963
             return 'BIGSERIAL';
964 964
         }
965 965
 
@@ -1037,8 +1037,8 @@  discard block
 block discarded – undo
1037 1037
      */
1038 1038
     protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
1039 1039
     {
1040
-        return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)')
1041
-            : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)');
1040
+        return $fixed ? ($length ? 'CHAR('.$length.')' : 'CHAR(255)')
1041
+            : ($length ? 'VARCHAR('.$length.')' : 'VARCHAR(255)');
1042 1042
     }
1043 1043
 
1044 1044
     /**
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
      */
1089 1089
     public function getEmptyIdentityInsertSQL($quotedTableName, $quotedIdentifierColumnName)
1090 1090
     {
1091
-        return 'INSERT INTO ' . $quotedTableName . ' (' . $quotedIdentifierColumnName . ') VALUES (DEFAULT)';
1091
+        return 'INSERT INTO '.$quotedTableName.' ('.$quotedIdentifierColumnName.') VALUES (DEFAULT)';
1092 1092
     }
1093 1093
 
1094 1094
     /**
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
     public function getTruncateTableSQL($tableName, $cascade = false)
1098 1098
     {
1099 1099
         $tableIdentifier = new Identifier($tableName);
1100
-        $sql = 'TRUNCATE ' . $tableIdentifier->getQuotedName($this);
1100
+        $sql = 'TRUNCATE '.$tableIdentifier->getQuotedName($this);
1101 1101
 
1102 1102
         if ($cascade) {
1103 1103
             $sql .= ' CASCADE';
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
      */
1239 1239
     private function typeChangeBreaksDefaultValue(ColumnDiff $columnDiff) : bool
1240 1240
     {
1241
-        if (! $columnDiff->fromColumn) {
1241
+        if (!$columnDiff->fromColumn) {
1242 1242
             return $columnDiff->hasChanged('type');
1243 1243
         }
1244 1244
 
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
 
1248 1248
         // default should not be changed when switching between numeric types and the default comes from a sequence
1249 1249
         return $columnDiff->hasChanged('type')
1250
-            && ! ($oldTypeIsNumeric && $newTypeIsNumeric && $columnDiff->column->getAutoincrement());
1250
+            && !($oldTypeIsNumeric && $newTypeIsNumeric && $columnDiff->column->getAutoincrement());
1251 1251
     }
1252 1252
 
1253 1253
     private function isNumericType(Type $type) : bool
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
 
879 879
         return $this->doConvertBooleans(
880 880
             $item,
881
-            function ($boolean) {
881
+            function ($boolean){
882 882
                 if (null === $boolean) {
883 883
                     return 'NULL';
884 884
                 }
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
 
900 900
         return $this->doConvertBooleans(
901 901
             $item,
902
-            function ($boolean) {
902
+            function ($boolean){
903 903
                 return null === $boolean ? null : (int) $boolean;
904 904
             }
905 905
         );
Please login to merge, or discard this patch.
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -380,6 +380,9 @@
 block discarded – undo
380 380
 
381 381
     /**
382 382
      * {@inheritdoc}
383
+     * @param string $tableName
384
+     * @param string $columnName
385
+     * @param string|null $comment
383 386
      */
384 387
     public function getCommentOnColumnSQL($tableName, $columnName, $comment)
385 388
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -413,7 +413,7 @@
 block discarded – undo
413 413
         }
414 414
 
415 415
         return 'ALTER TABLE ' . $table .
416
-               ' ADD ' . $this->getTableConstraintDeclarationSQL($constraint, $constraint->getQuotedName($this));
416
+                ' ADD ' . $this->getTableConstraintDeclarationSQL($constraint, $constraint->getQuotedName($this));
417 417
     }
418 418
 
419 419
     /**
Please login to merge, or discard this patch.
Spacing   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
     {
80 80
         switch (true) {
81 81
             case $lockMode === LockMode::NONE:
82
-                return $fromClause . ' WITH (NOLOCK)';
82
+                return $fromClause.' WITH (NOLOCK)';
83 83
 
84 84
             case $lockMode === LockMode::PESSIMISTIC_READ:
85
-                return $fromClause . ' WITH (UPDLOCK)';
85
+                return $fromClause.' WITH (UPDLOCK)';
86 86
 
87 87
             case $lockMode === LockMode::PESSIMISTIC_WRITE:
88
-                return $fromClause . ' WITH (XLOCK)';
88
+                return $fromClause.' WITH (XLOCK)';
89 89
 
90 90
             default:
91 91
                 return $fromClause;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $query = '';
117 117
 
118 118
         if ($foreignKey->hasOption('match')) {
119
-            $query = ' MATCH ' . $this->getForeignKeyMatchClauseSQL($foreignKey->getOption('match'));
119
+            $query = ' MATCH '.$this->getForeignKeyMatchClauseSQL($foreignKey->getOption('match'));
120 120
         }
121 121
 
122 122
         $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey);
@@ -203,19 +203,19 @@  discard block
 block discarded – undo
203 203
                 continue;
204 204
             }
205 205
 
206
-            $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' .
206
+            $sql[] = $this->getAlterTableClause($diff->getName($this)).' '.
207 207
                 $this->getAlterTableRenameColumnClause($oldColumnName, $column);
208 208
         }
209 209
 
210
-        if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
211
-            if ( ! empty($alterClauses)) {
212
-                $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' . implode(", ", $alterClauses);
210
+        if (!$this->onSchemaAlterTable($diff, $tableSql)) {
211
+            if (!empty($alterClauses)) {
212
+                $sql[] = $this->getAlterTableClause($diff->getName($this)).' '.implode(", ", $alterClauses);
213 213
             }
214 214
 
215 215
             $sql = array_merge($sql, $commentsSQL);
216 216
 
217 217
             if ($diff->newName !== false) {
218
-                $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' .
218
+                $sql[] = $this->getAlterTableClause($diff->getName($this)).' '.
219 219
                     $this->getAlterTableRenameTableClause($diff->getNewName());
220 220
             }
221 221
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     protected function getAlterTableAddColumnClause(Column $column)
240 240
     {
241
-        return 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());
241
+        return 'ADD '.$this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());
242 242
     }
243 243
 
244 244
     /**
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     protected function getAlterTableClause(Identifier $tableName)
252 252
     {
253
-        return 'ALTER TABLE ' . $tableName->getQuotedName($this);
253
+        return 'ALTER TABLE '.$tableName->getQuotedName($this);
254 254
     }
255 255
 
256 256
     /**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     protected function getAlterTableRemoveColumnClause(Column $column)
264 264
     {
265
-        return 'DROP ' . $column->getQuotedName($this);
265
+        return 'DROP '.$column->getQuotedName($this);
266 266
     }
267 267
 
268 268
     /**
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     {
278 278
         $oldColumnName = new Identifier($oldColumnName);
279 279
 
280
-        return 'RENAME ' . $oldColumnName->getQuotedName($this) .' TO ' . $column->getQuotedName($this);
280
+        return 'RENAME '.$oldColumnName->getQuotedName($this).' TO '.$column->getQuotedName($this);
281 281
     }
282 282
 
283 283
     /**
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      */
290 290
     protected function getAlterTableRenameTableClause(Identifier $newTableName)
291 291
     {
292
-        return 'RENAME ' . $newTableName->getQuotedName($this);
292
+        return 'RENAME '.$newTableName->getQuotedName($this);
293 293
     }
294 294
 
295 295
     /**
@@ -307,12 +307,12 @@  discard block
 block discarded – undo
307 307
         $column = $columnDiff->column;
308 308
 
309 309
         // Do not return alter clause if only comment has changed.
310
-        if ( ! ($columnDiff->hasChanged('comment') && count($columnDiff->changedProperties) === 1)) {
311
-            $columnAlterationClause = 'ALTER ' .
310
+        if (!($columnDiff->hasChanged('comment') && count($columnDiff->changedProperties) === 1)) {
311
+            $columnAlterationClause = 'ALTER '.
312 312
                 $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());
313 313
 
314 314
             if ($columnDiff->hasChanged('default') && null === $column->getDefault()) {
315
-                $columnAlterationClause .= ', ALTER ' . $column->getQuotedName($this) . ' DROP DEFAULT';
315
+                $columnAlterationClause .= ', ALTER '.$column->getQuotedName($this).' DROP DEFAULT';
316 316
             }
317 317
 
318 318
             return $columnAlterationClause;
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
     {
368 368
         $nullClause = isset($columnDef['notnull']) && (boolean) $columnDef['notnull'] === false ? ' NULL' : '';
369 369
 
370
-        return 'BIT' . $nullClause;
370
+        return 'BIT'.$nullClause;
371 371
     }
372 372
 
373 373
     /**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         $columnName = new Identifier($columnName);
388 388
         $comment = $comment === null ? 'NULL' : $this->quoteStringLiteral($comment);
389 389
 
390
-        return "COMMENT ON COLUMN " . $tableName->getQuotedName($this) . '.' . $columnName->getQuotedName($this) .
390
+        return "COMMENT ON COLUMN ".$tableName->getQuotedName($this).'.'.$columnName->getQuotedName($this).
391 391
             " IS $comment";
392 392
     }
393 393
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      */
397 397
     public function getConcatExpression()
398 398
     {
399
-        return 'STRING(' . implode(', ', (array) func_get_args()) . ')';
399
+        return 'STRING('.implode(', ', (array) func_get_args()).')';
400 400
     }
401 401
 
402 402
     /**
@@ -412,8 +412,8 @@  discard block
 block discarded – undo
412 412
             $table = $table->getQuotedName($this);
413 413
         }
414 414
 
415
-        return 'ALTER TABLE ' . $table .
416
-               ' ADD ' . $this->getTableConstraintDeclarationSQL($constraint, $constraint->getQuotedName($this));
415
+        return 'ALTER TABLE '.$table.
416
+               ' ADD '.$this->getTableConstraintDeclarationSQL($constraint, $constraint->getQuotedName($this));
417 417
     }
418 418
 
419 419
     /**
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
     {
424 424
         $database = new Identifier($database);
425 425
 
426
-        return "CREATE DATABASE '" . $database->getName() . "'";
426
+        return "CREATE DATABASE '".$database->getName()."'";
427 427
     }
428 428
 
429 429
     /**
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
      */
434 434
     public function getCreateIndexSQL(Index $index, $table)
435 435
     {
436
-        return parent::getCreateIndexSQL($index, $table). $this->getAdvancedIndexOptionsSQL($index);
436
+        return parent::getCreateIndexSQL($index, $table).$this->getAdvancedIndexOptionsSQL($index);
437 437
     }
438 438
 
439 439
     /**
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
             $table = $table->getQuotedName($this);
446 446
         }
447 447
 
448
-        return 'ALTER TABLE ' . $table . ' ADD ' . $this->getPrimaryKeyDeclarationSQL($index);
448
+        return 'ALTER TABLE '.$table.' ADD '.$this->getPrimaryKeyDeclarationSQL($index);
449 449
     }
450 450
 
451 451
     /**
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
      */
454 454
     public function getCreateTemporaryTableSnippetSQL()
455 455
     {
456
-        return 'CREATE ' . $this->getTemporaryTableSQL() . ' TABLE';
456
+        return 'CREATE '.$this->getTemporaryTableSQL().' TABLE';
457 457
     }
458 458
 
459 459
     /**
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
      */
462 462
     public function getCreateViewSQL($name, $sql)
463 463
     {
464
-        return 'CREATE VIEW ' . $name . ' AS ' . $sql;
464
+        return 'CREATE VIEW '.$name.' AS '.$sql;
465 465
     }
466 466
 
467 467
     /**
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
             $factorClause = '-1 * ';
500 500
         }
501 501
 
502
-        return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')';
502
+        return 'DATEADD('.$unit.', '.$factorClause.$interval.', '.$date.')';
503 503
     }
504 504
 
505 505
     /**
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
      */
508 508
     public function getDateDiffExpression($date1, $date2)
509 509
     {
510
-        return 'DATEDIFF(day, ' . $date2 . ', ' . $date1 . ')';
510
+        return 'DATEDIFF(day, '.$date2.', '.$date1.')';
511 511
     }
512 512
 
513 513
     /**
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
     {
558 558
         $database = new Identifier($database);
559 559
 
560
-        return "DROP DATABASE '" . $database->getName() . "'";
560
+        return "DROP DATABASE '".$database->getName()."'";
561 561
     }
562 562
 
563 563
     /**
@@ -569,29 +569,29 @@  discard block
 block discarded – undo
569 569
             $index = $index->getQuotedName($this);
570 570
         }
571 571
 
572
-        if ( ! is_string($index)) {
572
+        if (!is_string($index)) {
573 573
             throw new \InvalidArgumentException(
574
-                'SQLAnywherePlatform::getDropIndexSQL() expects $index parameter to be string or ' .
574
+                'SQLAnywherePlatform::getDropIndexSQL() expects $index parameter to be string or '.
575 575
                 '\Doctrine\DBAL\Schema\Index.'
576 576
             );
577 577
         }
578 578
 
579
-        if ( ! isset($table)) {
580
-            return 'DROP INDEX ' . $index;
579
+        if (!isset($table)) {
580
+            return 'DROP INDEX '.$index;
581 581
         }
582 582
 
583 583
         if ($table instanceof Table) {
584 584
             $table = $table->getQuotedName($this);
585 585
         }
586 586
 
587
-        if ( ! is_string($table)) {
587
+        if (!is_string($table)) {
588 588
             throw new \InvalidArgumentException(
589
-                'SQLAnywherePlatform::getDropIndexSQL() expects $table parameter to be string or ' .
589
+                'SQLAnywherePlatform::getDropIndexSQL() expects $table parameter to be string or '.
590 590
                 '\Doctrine\DBAL\Schema\Table.'
591 591
             );
592 592
         }
593 593
 
594
-        return 'DROP INDEX ' . $table . '.' . $index;
594
+        return 'DROP INDEX '.$table.'.'.$index;
595 595
     }
596 596
 
597 597
     /**
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
      */
600 600
     public function getDropViewSQL($name)
601 601
     {
602
-        return 'DROP VIEW ' . $name;
602
+        return 'DROP VIEW '.$name;
603 603
     }
604 604
 
605 605
     /**
@@ -613,8 +613,8 @@  discard block
 block discarded – undo
613 613
         $foreignColumns   = $foreignKey->getQuotedForeignColumns($this);
614 614
         $foreignTableName = $foreignKey->getQuotedForeignTableName($this);
615 615
 
616
-        if ( ! empty($foreignKeyName)) {
617
-            $sql .= 'CONSTRAINT ' . $foreignKey->getQuotedName($this) . ' ';
616
+        if (!empty($foreignKeyName)) {
617
+            $sql .= 'CONSTRAINT '.$foreignKey->getQuotedName($this).' ';
618 618
         }
619 619
 
620 620
         if (empty($localColumns)) {
@@ -633,10 +633,10 @@  discard block
 block discarded – undo
633 633
             $sql .= 'NOT NULL ';
634 634
         }
635 635
 
636
-        return $sql .
637
-            'FOREIGN KEY (' . $this->getIndexFieldDeclarationListSQL($localColumns) . ') ' .
638
-            'REFERENCES ' . $foreignKey->getQuotedForeignTableName($this) .
639
-            ' (' . $this->getIndexFieldDeclarationListSQL($foreignColumns) . ')';
636
+        return $sql.
637
+            'FOREIGN KEY ('.$this->getIndexFieldDeclarationListSQL($localColumns).') '.
638
+            'REFERENCES '.$foreignKey->getQuotedForeignTableName($this).
639
+            ' ('.$this->getIndexFieldDeclarationListSQL($foreignColumns).')';
640 640
     }
641 641
 
642 642
     /**
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
             case self::FOREIGN_KEY_MATCH_FULL_UNIQUE:
664 664
                 return 'UNIQUE FULL';
665 665
             default:
666
-                throw new \InvalidArgumentException('Invalid foreign key match type: ' . $type);
666
+                throw new \InvalidArgumentException('Invalid foreign key match type: '.$type);
667 667
         }
668 668
     }
669 669
 
@@ -971,10 +971,10 @@  discard block
 block discarded – undo
971 971
     public function getLocateExpression($str, $substr, $startPos = false)
972 972
     {
973 973
         if ($startPos == false) {
974
-            return 'LOCATE(' . $str . ', ' . $substr . ')';
974
+            return 'LOCATE('.$str.', '.$substr.')';
975 975
         }
976 976
 
977
-        return 'LOCATE(' . $str . ', ' . $substr . ', ' . $startPos . ')';
977
+        return 'LOCATE('.$str.', '.$substr.', '.$startPos.')';
978 978
     }
979 979
 
980 980
     /**
@@ -990,7 +990,7 @@  discard block
 block discarded – undo
990 990
      */
991 991
     public function getMd5Expression($column)
992 992
     {
993
-        return "HASH(" . $column . ", 'MD5')";
993
+        return "HASH(".$column.", 'MD5')";
994 994
     }
995 995
 
996 996
     /**
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
      */
1015 1015
     public function getPrimaryKeyDeclarationSQL(Index $index, $name = null)
1016 1016
     {
1017
-        if ( ! $index->isPrimary()) {
1017
+        if (!$index->isPrimary()) {
1018 1018
             throw new \InvalidArgumentException(
1019 1019
                 'Can only create primary key declarations with getPrimaryKeyDeclarationSQL()'
1020 1020
             );
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
      */
1029 1029
     public function getSetTransactionIsolationSQL($level)
1030 1030
     {
1031
-        return 'SET TEMPORARY OPTION isolation_level = ' . $this->_getTransactionIsolationLevelSQL($level);
1031
+        return 'SET TEMPORARY OPTION isolation_level = '.$this->_getTransactionIsolationLevelSQL($level);
1032 1032
     }
1033 1033
 
1034 1034
     /**
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
     {
1059 1059
         $database = new Identifier($database);
1060 1060
 
1061
-        return "START DATABASE '" . $database->getName() . "' AUTOSTOP OFF";
1061
+        return "START DATABASE '".$database->getName()."' AUTOSTOP OFF";
1062 1062
     }
1063 1063
 
1064 1064
     /**
@@ -1077,7 +1077,7 @@  discard block
 block discarded – undo
1077 1077
     {
1078 1078
         $database = new Identifier($database);
1079 1079
 
1080
-        return 'STOP DATABASE "' . $database->getName() . '" UNCONDITIONALLY';
1080
+        return 'STOP DATABASE "'.$database->getName().'" UNCONDITIONALLY';
1081 1081
     }
1082 1082
 
1083 1083
     /**
@@ -1086,10 +1086,10 @@  discard block
 block discarded – undo
1086 1086
     public function getSubstringExpression($value, $from, $length = null)
1087 1087
     {
1088 1088
         if (null === $length) {
1089
-            return 'SUBSTRING(' . $value . ', ' . $from . ')';
1089
+            return 'SUBSTRING('.$value.', '.$from.')';
1090 1090
         }
1091 1091
 
1092
-        return 'SUBSTRING(' . $value . ', ' . $from . ', ' . $length . ')';
1092
+        return 'SUBSTRING('.$value.', '.$from.', '.$length.')';
1093 1093
     }
1094 1094
 
1095 1095
     /**
@@ -1121,14 +1121,14 @@  discard block
 block discarded – undo
1121 1121
      */
1122 1122
     public function getTrimExpression($str, $pos = TrimMode::UNSPECIFIED, $char = false)
1123 1123
     {
1124
-        if ( ! $char) {
1124
+        if (!$char) {
1125 1125
             switch ($pos) {
1126 1126
                 case TrimMode::LEADING:
1127 1127
                     return $this->getLtrimExpression($str);
1128 1128
                 case TrimMode::TRAILING:
1129 1129
                     return $this->getRtrimExpression($str);
1130 1130
                 default:
1131
-                    return 'TRIM(' . $str . ')';
1131
+                    return 'TRIM('.$str.')';
1132 1132
             }
1133 1133
         }
1134 1134
 
@@ -1136,13 +1136,13 @@  discard block
 block discarded – undo
1136 1136
 
1137 1137
         switch ($pos) {
1138 1138
             case TrimMode::LEADING:
1139
-                return 'SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))';
1139
+                return 'SUBSTR('.$str.', PATINDEX('.$pattern.', '.$str.'))';
1140 1140
             case TrimMode::TRAILING:
1141
-                return 'REVERSE(SUBSTR(REVERSE(' . $str . '), PATINDEX(' . $pattern . ', REVERSE(' . $str . '))))';
1141
+                return 'REVERSE(SUBSTR(REVERSE('.$str.'), PATINDEX('.$pattern.', REVERSE('.$str.'))))';
1142 1142
             default:
1143 1143
                 return
1144
-                    'REVERSE(SUBSTR(REVERSE(SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))), ' .
1145
-                    'PATINDEX(' . $pattern . ', REVERSE(SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))))))';
1144
+                    'REVERSE(SUBSTR(REVERSE(SUBSTR('.$str.', PATINDEX('.$pattern.', '.$str.'))), '.
1145
+                    'PATINDEX('.$pattern.', REVERSE(SUBSTR('.$str.', PATINDEX('.$pattern.', '.$str.'))))))';
1146 1146
         }
1147 1147
     }
1148 1148
 
@@ -1153,7 +1153,7 @@  discard block
 block discarded – undo
1153 1153
     {
1154 1154
         $tableIdentifier = new Identifier($tableName);
1155 1155
 
1156
-        return 'TRUNCATE TABLE ' . $tableIdentifier->getQuotedName($this);
1156
+        return 'TRUNCATE TABLE '.$tableIdentifier->getQuotedName($this);
1157 1157
     }
1158 1158
 
1159 1159
     /**
@@ -1167,9 +1167,9 @@  discard block
 block discarded – undo
1167 1167
             );
1168 1168
         }
1169 1169
 
1170
-        if ( ! $index->isUnique()) {
1170
+        if (!$index->isUnique()) {
1171 1171
             throw new \InvalidArgumentException(
1172
-                'Can only create unique constraint declarations, no common index declarations with ' .
1172
+                'Can only create unique constraint declarations, no common index declarations with '.
1173 1173
                 'getUniqueConstraintDeclarationSQL().'
1174 1174
             );
1175 1175
         }
@@ -1230,10 +1230,10 @@  discard block
 block discarded – undo
1230 1230
      */
1231 1231
     protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
1232 1232
     {
1233
-        $unsigned      = ! empty($columnDef['unsigned']) ? 'UNSIGNED ' : '';
1234
-        $autoincrement = ! empty($columnDef['autoincrement']) ? ' IDENTITY' : '';
1233
+        $unsigned      = !empty($columnDef['unsigned']) ? 'UNSIGNED ' : '';
1234
+        $autoincrement = !empty($columnDef['autoincrement']) ? ' IDENTITY' : '';
1235 1235
 
1236
-        return $unsigned . $columnDef['integer_type'] . $autoincrement;
1236
+        return $unsigned.$columnDef['integer_type'].$autoincrement;
1237 1237
     }
1238 1238
 
1239 1239
     /**
@@ -1244,40 +1244,40 @@  discard block
 block discarded – undo
1244 1244
         $columnListSql = $this->getColumnDeclarationListSQL($columns);
1245 1245
         $indexSql = [];
1246 1246
 
1247
-        if ( ! empty($options['uniqueConstraints'])) {
1247
+        if (!empty($options['uniqueConstraints'])) {
1248 1248
             foreach ((array) $options['uniqueConstraints'] as $name => $definition) {
1249
-                $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition);
1249
+                $columnListSql .= ', '.$this->getUniqueConstraintDeclarationSQL($name, $definition);
1250 1250
             }
1251 1251
         }
1252 1252
 
1253
-        if ( ! empty($options['indexes'])) {
1253
+        if (!empty($options['indexes'])) {
1254 1254
             /** @var \Doctrine\DBAL\Schema\Index $index */
1255 1255
             foreach ((array) $options['indexes'] as $index) {
1256 1256
                 $indexSql[] = $this->getCreateIndexSQL($index, $tableName);
1257 1257
             }
1258 1258
         }
1259 1259
 
1260
-        if ( ! empty($options['primary'])) {
1260
+        if (!empty($options['primary'])) {
1261 1261
             $flags = '';
1262 1262
 
1263 1263
             if (isset($options['primary_index']) && $options['primary_index']->hasFlag('clustered')) {
1264 1264
                 $flags = ' CLUSTERED ';
1265 1265
             }
1266 1266
 
1267
-            $columnListSql .= ', PRIMARY KEY' . $flags . ' (' . implode(', ', array_unique(array_values((array) $options['primary']))) . ')';
1267
+            $columnListSql .= ', PRIMARY KEY'.$flags.' ('.implode(', ', array_unique(array_values((array) $options['primary']))).')';
1268 1268
         }
1269 1269
 
1270
-        if ( ! empty($options['foreignKeys'])) {
1270
+        if (!empty($options['foreignKeys'])) {
1271 1271
             foreach ((array) $options['foreignKeys'] as $definition) {
1272
-                $columnListSql .= ', ' . $this->getForeignKeyDeclarationSQL($definition);
1272
+                $columnListSql .= ', '.$this->getForeignKeyDeclarationSQL($definition);
1273 1273
             }
1274 1274
         }
1275 1275
 
1276
-        $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql;
1276
+        $query = 'CREATE TABLE '.$tableName.' ('.$columnListSql;
1277 1277
         $check = $this->getCheckDeclarationSQL($columns);
1278 1278
 
1279
-        if ( ! empty($check)) {
1280
-            $query .= ', ' . $check;
1279
+        if (!empty($check)) {
1280
+            $query .= ', '.$check;
1281 1281
         }
1282 1282
 
1283 1283
         $query .= ')';
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
             case TransactionIsolationLevel::SERIALIZABLE:
1301 1301
                 return 3;
1302 1302
             default:
1303
-                throw new \InvalidArgumentException('Invalid isolation level:' . $level);
1303
+                throw new \InvalidArgumentException('Invalid isolation level:'.$level);
1304 1304
         }
1305 1305
     }
1306 1306
 
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
         $limitOffsetClause = '';
1313 1313
 
1314 1314
         if ($limit > 0) {
1315
-            $limitOffsetClause = 'TOP ' . $limit . ' ';
1315
+            $limitOffsetClause = 'TOP '.$limit.' ';
1316 1316
         }
1317 1317
 
1318 1318
         if ($offset > 0) {
@@ -1320,11 +1320,11 @@  discard block
 block discarded – undo
1320 1320
                 $limitOffsetClause = 'TOP ALL ';
1321 1321
             }
1322 1322
 
1323
-            $limitOffsetClause .= 'START AT ' . ($offset + 1) . ' ';
1323
+            $limitOffsetClause .= 'START AT '.($offset + 1).' ';
1324 1324
         }
1325 1325
 
1326 1326
         if ($limitOffsetClause) {
1327
-            return preg_replace('/^\s*(SELECT\s+(DISTINCT\s+)?)/i', '\1' . $limitOffsetClause, $query);
1327
+            return preg_replace('/^\s*(SELECT\s+(DISTINCT\s+)?)/i', '\1'.$limitOffsetClause, $query);
1328 1328
         }
1329 1329
 
1330 1330
         return $query;
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
     {
1343 1343
         $sql = '';
1344 1344
 
1345
-        if ( ! $index->isPrimary() && $index->hasFlag('for_olap_workload')) {
1345
+        if (!$index->isPrimary() && $index->hasFlag('for_olap_workload')) {
1346 1346
             $sql .= ' FOR OLAP WORKLOAD';
1347 1347
         }
1348 1348
 
@@ -1355,8 +1355,8 @@  discard block
 block discarded – undo
1355 1355
     protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed)
1356 1356
     {
1357 1357
         return $fixed
1358
-            ? 'BINARY(' . ($length ?: $this->getBinaryDefaultLength()) . ')'
1359
-            : 'VARBINARY(' . ($length ?: $this->getBinaryDefaultLength()) . ')';
1358
+            ? 'BINARY('.($length ?: $this->getBinaryDefaultLength()).')'
1359
+            : 'VARBINARY('.($length ?: $this->getBinaryDefaultLength()).')';
1360 1360
     }
1361 1361
 
1362 1362
     /**
@@ -1375,13 +1375,13 @@  discard block
 block discarded – undo
1375 1375
             return $this->getForeignKeyDeclarationSQL($constraint);
1376 1376
         }
1377 1377
 
1378
-        if ( ! $constraint instanceof Index) {
1379
-            throw new \InvalidArgumentException('Unsupported constraint type: ' . get_class($constraint));
1378
+        if (!$constraint instanceof Index) {
1379
+            throw new \InvalidArgumentException('Unsupported constraint type: '.get_class($constraint));
1380 1380
         }
1381 1381
 
1382
-        if ( ! $constraint->isPrimary() && ! $constraint->isUnique()) {
1382
+        if (!$constraint->isPrimary() && !$constraint->isUnique()) {
1383 1383
             throw new \InvalidArgumentException(
1384
-                'Can only create primary, unique or foreign key constraint declarations, no common index declarations ' .
1384
+                'Can only create primary, unique or foreign key constraint declarations, no common index declarations '.
1385 1385
                 'with getTableConstraintDeclarationSQL().'
1386 1386
             );
1387 1387
         }
@@ -1395,9 +1395,9 @@  discard block
 block discarded – undo
1395 1395
         $sql   = '';
1396 1396
         $flags = '';
1397 1397
 
1398
-        if ( ! empty($name)) {
1398
+        if (!empty($name)) {
1399 1399
             $name = new Identifier($name);
1400
-            $sql .= 'CONSTRAINT ' . $name->getQuotedName($this) . ' ';
1400
+            $sql .= 'CONSTRAINT '.$name->getQuotedName($this).' ';
1401 1401
         }
1402 1402
 
1403 1403
         if ($constraint->hasFlag('clustered')) {
@@ -1405,10 +1405,10 @@  discard block
 block discarded – undo
1405 1405
         }
1406 1406
 
1407 1407
         if ($constraint->isPrimary()) {
1408
-            return $sql . 'PRIMARY KEY ' . $flags . '('. $this->getIndexFieldDeclarationListSQL($constraintColumns) . ')';
1408
+            return $sql.'PRIMARY KEY '.$flags.'('.$this->getIndexFieldDeclarationListSQL($constraintColumns).')';
1409 1409
         }
1410 1410
 
1411
-        return $sql . 'UNIQUE ' . $flags . '('. $this->getIndexFieldDeclarationListSQL($constraintColumns) . ')';
1411
+        return $sql.'UNIQUE '.$flags.'('.$this->getIndexFieldDeclarationListSQL($constraintColumns).')';
1412 1412
     }
1413 1413
 
1414 1414
     /**
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
     protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)
1439 1439
     {
1440 1440
         return [
1441
-            'ALTER INDEX ' . $oldIndexName . ' ON ' . $tableName . ' RENAME TO ' . $index->getQuotedName($this)
1441
+            'ALTER INDEX '.$oldIndexName.' ON '.$tableName.' RENAME TO '.$index->getQuotedName($this)
1442 1442
         ];
1443 1443
     }
1444 1444
 
@@ -1456,8 +1456,8 @@  discard block
 block discarded – undo
1456 1456
     protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
1457 1457
     {
1458 1458
         return $fixed
1459
-            ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(' . $this->getVarcharDefaultLength() . ')')
1460
-            : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(' . $this->getVarcharDefaultLength() . ')');
1459
+            ? ($length ? 'CHAR('.$length.')' : 'CHAR('.$this->getVarcharDefaultLength().')')
1460
+            : ($length ? 'VARCHAR('.$length.')' : 'VARCHAR('.$this->getVarcharDefaultLength().')');
1461 1461
     }
1462 1462
 
1463 1463
     /**
Please login to merge, or discard this patch.