@@ -834,7 +834,7 @@ protected static function getNextToken($string, $previous = null)
834834 } // Non-quoted variable name
835835 else {
836836 preg_match ('/^( ' . $ string [0 ] . '[a-zA-Z0-9\._\$]+)/ ' , $ string , $ matches );
837- if (!empty ($ matches )) {
837+ if (! empty ($ matches )) {
838838 $ ret [self ::TOKEN_VALUE ] = $ matches [1 ];
839839 }
840840 }
@@ -863,7 +863,7 @@ protected static function getNextToken($string, $previous = null)
863863
864864 // A reserved word cannot be preceded by a '.'
865865 // this makes it so in "mytable.from", "from" is not considered a reserved word
866- if (!$ previous || !isset ($ previous [self ::TOKEN_VALUE ]) || $ previous [self ::TOKEN_VALUE ] !== '. ' ) {
866+ if (! $ previous || !isset ($ previous [self ::TOKEN_VALUE ]) || $ previous [self ::TOKEN_VALUE ] !== '. ' ) {
867867 $ upper = strtoupper ($ string );
868868 // Top Level Reserved Word
869869 if (preg_match ('/^( ' . self ::$ regex_reserved_toplevel . ')($|\s| ' . self ::$ regex_boundaries . ')/ ' , $ upper ,
@@ -1158,7 +1158,7 @@ public static function format($string, $highlight = true)
11581158 $ return = rtrim ($ return , ' ' );
11591159 }
11601160
1161- if (!$ inline_parentheses ) {
1161+ if (! $ inline_parentheses ) {
11621162 $ increase_block_indent = true ;
11631163 // Add a newline after the parentheses
11641164 $ newline = true ;
@@ -1191,7 +1191,7 @@ public static function format($string, $highlight = true)
11911191 }
11921192
11931193 // Add a newline before the closing parentheses (if not already added)
1194- if (!$ added_newline ) {
1194+ if (! $ added_newline ) {
11951195 $ return .= "\n" . str_repeat ($ tab , $ indent_level );
11961196 }
11971197 } // Top level reserved words start a new line and increase the special indent level
@@ -1208,7 +1208,7 @@ public static function format($string, $highlight = true)
12081208 // Add a newline after the top level reserved word
12091209 $ newline = true ;
12101210 // Add a newline before the top level reserved word (if not already added)
1211- if (!$ added_newline ) {
1211+ if (! $ added_newline ) {
12121212 $ return .= "\n" . str_repeat ($ tab , $ indent_level );
12131213 } // If we already added a newline, redo the indentation since it may be different now
12141214 else {
@@ -1222,14 +1222,14 @@ public static function format($string, $highlight = true)
12221222 $ highlighted = preg_replace ('/\s+/ ' , ' ' , $ highlighted );
12231223 }
12241224 //if SQL 'LIMIT' clause, start variable to reset newline
1225- if ($ token [self ::TOKEN_VALUE ] === 'LIMIT ' && !$ inline_parentheses ) {
1225+ if ($ token [self ::TOKEN_VALUE ] === 'LIMIT ' && ! $ inline_parentheses ) {
12261226 $ clause_limit = true ;
12271227 }
12281228 } // Checks if we are out of the limit clause
12291229 elseif ($ clause_limit && $ token [self ::TOKEN_VALUE ] !== ", " && $ token [self ::TOKEN_TYPE ] !== self ::TOKEN_TYPE_NUMBER && $ token [self ::TOKEN_TYPE ] !== self ::TOKEN_TYPE_WHITESPACE ) {
12301230 $ clause_limit = false ;
12311231 } // Commas start a new line (unless within inline parentheses or SQL 'LIMIT' clause)
1232- elseif ($ token [self ::TOKEN_VALUE ] === ', ' && !$ inline_parentheses ) {
1232+ elseif ($ token [self ::TOKEN_VALUE ] === ', ' && ! $ inline_parentheses ) {
12331233 //If the previous TOKEN_VALUE is 'LIMIT', resets new line
12341234 if ($ clause_limit === true ) {
12351235 $ newline = false ;
@@ -1241,7 +1241,7 @@ public static function format($string, $highlight = true)
12411241 } // Newline reserved words start a new line
12421242 elseif ($ token [self ::TOKEN_TYPE ] === self ::TOKEN_TYPE_RESERVED_NEWLINE ) {
12431243 // Add a newline before the reserved word (if not already added)
1244- if (!$ added_newline ) {
1244+ if (! $ added_newline ) {
12451245 $ return .= "\n" . str_repeat ($ tab , $ indent_level );
12461246 }
12471247
@@ -1335,7 +1335,7 @@ public static function splitQuery($string)
13351335 foreach ($ tokens as $ token ) {
13361336 // If this is a query separator
13371337 if ($ token [self ::TOKEN_VALUE ] === '; ' ) {
1338- if (!$ empty ) {
1338+ if (! $ empty ) {
13391339 $ queries [] = $ current_query . '; ' ;
13401340 }
13411341 $ current_query = '' ;
@@ -1351,7 +1351,7 @@ public static function splitQuery($string)
13511351 $ current_query .= $ token [self ::TOKEN_VALUE ];
13521352 }
13531353
1354- if (!$ empty ) {
1354+ if (! $ empty ) {
13551355 $ queries [] = trim ($ current_query );
13561356 }
13571357
0 commit comments