diff options
author | Michal Čihař <michal@cihar.com> | 2017-02-06 12:15:52 +0100 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-02-06 12:18:33 +0100 |
commit | ba296bd6e2017b6c73add5f3c8ba56eac5a984c2 (patch) | |
tree | 97ff346d99a0bae65013376c81848579f49521f0 | |
parent | bead40dc670e715ed4309d343ef3d33f519d7446 (diff) | |
download | sql-parser-ba296bd6e2017b6c73add5f3c8ba56eac5a984c2.zip sql-parser-ba296bd6e2017b6c73add5f3c8ba56eac5a984c2.tar.gz sql-parser-ba296bd6e2017b6c73add5f3c8ba56eac5a984c2.tar.bz2 |
Remove double spacing
Signed-off-by: Michal Čihař <michal@cihar.com>
-rw-r--r-- | src/Context.php | 2 | ||||
-rw-r--r-- | src/Lexer.php | 2 | ||||
-rw-r--r-- | src/Statements/DeleteStatement.php | 16 | ||||
-rw-r--r-- | src/Statements/DropStatement.php | 8 | ||||
-rw-r--r-- | src/Statements/SelectStatement.php | 58 | ||||
-rw-r--r-- | src/Statements/UpdateStatement.php | 14 | ||||
-rw-r--r-- | src/Utils/Formatter.php | 4 | ||||
-rw-r--r-- | tools/ContextGenerator.php | 4 |
8 files changed, 54 insertions, 54 deletions
diff --git a/src/Context.php b/src/Context.php index b9d98fc..b28c5c9 100644 --- a/src/Context.php +++ b/src/Context.php @@ -113,7 +113,7 @@ abstract class Context ':=' => 8, // @see Token::FLAG_OPERATOR_SQL - '(' => 16, ')' => 16, '.' => 16, ',' => 16, ';' => 16, + '(' => 16, ')' => 16, '.' => 16, ',' => 16, ';' => 16, ); /** diff --git a/src/Lexer.php b/src/Lexer.php index 06c3897..627763b 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -119,7 +119,7 @@ class Lexer extends Core * * @var string */ - public $delimiter = $DEFAULT_DELIMITER; + public $delimiter; /** * The length of the delimiter. diff --git a/src/Statements/DeleteStatement.php b/src/Statements/DeleteStatement.php index e069324..929245c 100644 --- a/src/Statements/DeleteStatement.php +++ b/src/Statements/DeleteStatement.php @@ -67,15 +67,15 @@ class DeleteStatement extends Statement * @var array */ public static $CLAUSES = array( - 'DELETE' => array('DELETE', 2), + 'DELETE' => array('DELETE', 2), // Used for options. - '_OPTIONS' => array('_OPTIONS', 1), - 'FROM' => array('FROM', 3), - 'PARTITION' => array('PARTITION', 3), - 'USING' => array('USING', 3), - 'WHERE' => array('WHERE', 3), - 'ORDER BY' => array('ORDER BY', 3), - 'LIMIT' => array('LIMIT', 3), + '_OPTIONS' => array('_OPTIONS', 1), + 'FROM' => array('FROM', 3), + 'PARTITION' => array('PARTITION', 3), + 'USING' => array('USING', 3), + 'WHERE' => array('WHERE', 3), + 'ORDER BY' => array('ORDER BY', 3), + 'LIMIT' => array('LIMIT', 3), ); /** diff --git a/src/Statements/DropStatement.php b/src/Statements/DropStatement.php index 4231aa6..9fa51dc 100644 --- a/src/Statements/DropStatement.php +++ b/src/Statements/DropStatement.php @@ -49,12 +49,12 @@ class DropStatement extends Statement * @var array */ public static $CLAUSES = array( - 'DROP' => array('DROP', 2), + 'DROP' => array('DROP', 2), // Used for options. - '_OPTIONS' => array('_OPTIONS', 1), + '_OPTIONS' => array('_OPTIONS', 1), // Used for select expressions. - 'DROP_' => array('DROP', 1), - 'ON' => array('ON', 3), + 'DROP_' => array('DROP', 1), + 'ON' => array('ON', 3), ); /** diff --git a/src/Statements/SelectStatement.php b/src/Statements/SelectStatement.php index d3d9ee2..66ed150 100644 --- a/src/Statements/SelectStatement.php +++ b/src/Statements/SelectStatement.php @@ -83,39 +83,39 @@ class SelectStatement extends Statement * @var array */ public static $CLAUSES = array( - 'SELECT' => array('SELECT', 2), + 'SELECT' => array('SELECT', 2), // Used for options. - '_OPTIONS' => array('_OPTIONS', 1), + '_OPTIONS' => array('_OPTIONS', 1), // Used for selected expressions. - '_SELECT' => array('SELECT', 1), - 'INTO' => array('INTO', 3), - 'FROM' => array('FROM', 3), - 'PARTITION' => array('PARTITION', 3), - - 'JOIN' => array('JOIN', 1), - 'FULL JOIN' => array('FULL JOIN', 1), - 'INNER JOIN' => array('INNER JOIN', 1), - 'LEFT JOIN' => array('LEFT JOIN', 1), - 'LEFT OUTER JOIN' => array('LEFT OUTER JOIN', 1), - 'RIGHT JOIN' => array('RIGHT JOIN', 1), - 'RIGHT OUTER JOIN' => array('RIGHT OUTER JOIN', 1), - 'NATURAL JOIN' => array('NATURAL JOIN', 1), - 'NATURAL LEFT JOIN' => array('NATURAL LEFT JOIN', 1), - 'NATURAL RIGHT JOIN' => array('NATURAL RIGHT JOIN', 1), + '_SELECT' => array('SELECT', 1), + 'INTO' => array('INTO', 3), + 'FROM' => array('FROM', 3), + 'PARTITION' => array('PARTITION', 3), + + 'JOIN' => array('JOIN', 1), + 'FULL JOIN' => array('FULL JOIN', 1), + 'INNER JOIN' => array('INNER JOIN', 1), + 'LEFT JOIN' => array('LEFT JOIN', 1), + 'LEFT OUTER JOIN' => array('LEFT OUTER JOIN', 1), + 'RIGHT JOIN' => array('RIGHT JOIN', 1), + 'RIGHT OUTER JOIN' => array('RIGHT OUTER JOIN', 1), + 'NATURAL JOIN' => array('NATURAL JOIN', 1), + 'NATURAL LEFT JOIN' => array('NATURAL LEFT JOIN', 1), + 'NATURAL RIGHT JOIN' => array('NATURAL RIGHT JOIN', 1), 'NATURAL LEFT OUTER JOIN' => array('NATURAL LEFT OUTER JOIN', 1), - 'NATURAL RIGHT OUTER JOIN' => array('NATURAL RIGHT JOIN', 1), - - 'WHERE' => array('WHERE', 3), - 'GROUP BY' => array('GROUP BY', 3), - 'HAVING' => array('HAVING', 3), - 'ORDER BY' => array('ORDER BY', 3), - 'LIMIT' => array('LIMIT', 3), - 'PROCEDURE' => array('PROCEDURE', 3), - 'UNION' => array('UNION', 1), - '_END_OPTIONS' => array('_END_OPTIONS', 1), + 'NATURAL RIGHT OUTER JOIN' => array('NATURAL RIGHT JOIN', 1), + + 'WHERE' => array('WHERE', 3), + 'GROUP BY' => array('GROUP BY', 3), + 'HAVING' => array('HAVING', 3), + 'ORDER BY' => array('ORDER BY', 3), + 'LIMIT' => array('LIMIT', 3), + 'PROCEDURE' => array('PROCEDURE', 3), + 'UNION' => array('UNION', 1), + '_END_OPTIONS' => array('_END_OPTIONS', 1), // These are available only when `UNION` is present. - // 'ORDER BY' => array('ORDER BY', 3), - // 'LIMIT' => array('LIMIT', 3), + // 'ORDER BY' => array('ORDER BY', 3), + // 'LIMIT' => array('LIMIT', 3), ); /** diff --git a/src/Statements/UpdateStatement.php b/src/Statements/UpdateStatement.php index 768374f..e3d68be 100644 --- a/src/Statements/UpdateStatement.php +++ b/src/Statements/UpdateStatement.php @@ -52,15 +52,15 @@ class UpdateStatement extends Statement * @var array */ public static $CLAUSES = array( - 'UPDATE' => array('UPDATE', 2), + 'UPDATE' => array('UPDATE', 2), // Used for options. - '_OPTIONS' => array('_OPTIONS', 1), + '_OPTIONS' => array('_OPTIONS', 1), // Used for updated tables. - '_UPDATE' => array('UPDATE', 1), - 'SET' => array('SET', 3), - 'WHERE' => array('WHERE', 3), - 'ORDER BY' => array('ORDER BY', 3), - 'LIMIT' => array('LIMIT', 3), + '_UPDATE' => array('UPDATE', 1), + 'SET' => array('SET', 3), + 'WHERE' => array('WHERE', 3), + 'ORDER BY' => array('ORDER BY', 3), + 'LIMIT' => array('LIMIT', 3), ); /** diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php index de50de6..16c0778 100644 --- a/src/Utils/Formatter.php +++ b/src/Utils/Formatter.php @@ -476,11 +476,11 @@ class Formatter return str_replace( array( "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x09", "\x0A", "\x0B", "\x0C", "\x0D", "\x0E", "\x0F", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1A", "\x1B", "\x1C", "\x1D", "\x1E", "\x1F", + "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1A", "\x1B", "\x1C", "\x1D", "\x1E", "\x1F", ), array( '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0F', - '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', '\x1E', '\x1F', + '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', '\x1E', '\x1F', ), $string ); diff --git a/tools/ContextGenerator.php b/tools/ContextGenerator.php index 82c17e1..1b65e14 100644 --- a/tools/ContextGenerator.php +++ b/tools/ContextGenerator.php @@ -282,8 +282,8 @@ class ContextGenerator * @var string */ $formattedName = str_replace( - array('Context', 'MySql', '00', '0'), - array('', 'MySQL ', '', '.'), + array('Context', 'MySql', '00', '0'), + array('', 'MySQL ', '', '.'), $class ); |