@@ -33,21 +33,21 @@ public function run(): int
3333 $ params = $ this ->getopt ('' , ['lint ' , 'highlight ' , 'tokenize ' ]);
3434 if ($ params !== false ) {
3535 if (isset ($ params ['lint ' ])) {
36- return $ this ->runLint (false );
36+ return $ this ->runLint ();
3737 }
3838
3939 if (isset ($ params ['highlight ' ])) {
40- return $ this ->runHighlight (false );
40+ return $ this ->runHighlight ();
4141 }
4242
4343 if (isset ($ params ['tokenize ' ])) {
44- return $ this ->runTokenize (false );
44+ return $ this ->runTokenize ();
4545 }
4646 }
4747
48- $ this ->usageLint (false );
49- $ this ->usageHighlight (false );
50- $ this ->usageTokenize (false );
48+ $ this ->usageLint ();
49+ $ this ->usageHighlight ();
50+ $ this ->usageTokenize ();
5151
5252 return 1 ;
5353 }
@@ -68,9 +68,9 @@ public function mergeLongOpts(array &$params, array &$longopts): void
6868 }
6969 }
7070
71- public function usageHighlight (bool $ isStandalone = true ): void
71+ public function usageHighlight (): void
7272 {
73- $ command = $ isStandalone ? ' highlight-query ' : 'sql-parser --highlight ' ;
73+ $ command = 'sql-parser --highlight ' ;
7474
7575 echo 'Usage: ' . $ command . ' --query SQL [--format html|cli|text] [--ansi] ' . "\n" ;
7676 echo ' cat file.sql | ' . $ command . "\n" ;
@@ -114,15 +114,15 @@ public function parseHighlight(): array|false
114114 return $ params ;
115115 }
116116
117- public function runHighlight (bool $ isStandalone = true ): int
117+ public function runHighlight (): int
118118 {
119119 $ params = $ this ->parseHighlight ();
120120 if ($ params === false ) {
121121 return 1 ;
122122 }
123123
124124 if (isset ($ params ['h ' ])) {
125- $ this ->usageHighlight ($ isStandalone );
125+ $ this ->usageHighlight ();
126126
127127 return 0 ;
128128 }
@@ -150,14 +150,14 @@ public function runHighlight(bool $isStandalone = true): int
150150 }
151151
152152 echo "ERROR: Missing parameters! \n" ;
153- $ this ->usageHighlight ($ isStandalone );
153+ $ this ->usageHighlight ();
154154
155155 return 1 ;
156156 }
157157
158- public function usageLint (bool $ isStandalone = true ): void
158+ public function usageLint (): void
159159 {
160- $ command = $ isStandalone ? ' lint-query ' : 'sql-parser --lint ' ;
160+ $ command = 'sql-parser --lint ' ;
161161
162162 echo 'Usage: ' . $ command . ' --query SQL [--ansi] ' . "\n" ;
163163 echo ' cat file.sql | ' . $ command . "\n" ;
@@ -182,15 +182,15 @@ public function parseLint(): array|false
182182 return $ params ;
183183 }
184184
185- public function runLint (bool $ isStandalone = true ): int
185+ public function runLint (): int
186186 {
187187 $ params = $ this ->parseLint ();
188188 if ($ params === false ) {
189189 return 1 ;
190190 }
191191
192192 if (isset ($ params ['h ' ])) {
193- $ this ->usageLint ($ isStandalone );
193+ $ this ->usageLint ();
194194
195195 return 0 ;
196196 }
@@ -227,14 +227,14 @@ public function runLint(bool $isStandalone = true): int
227227 }
228228
229229 echo "ERROR: Missing parameters! \n" ;
230- $ this ->usageLint ($ isStandalone );
230+ $ this ->usageLint ();
231231
232232 return 1 ;
233233 }
234234
235- public function usageTokenize (bool $ isStandalone = true ): void
235+ public function usageTokenize (): void
236236 {
237- $ command = $ isStandalone ? ' tokenize-query ' : 'sql-parser --tokenize ' ;
237+ $ command = 'sql-parser --tokenize ' ;
238238
239239 echo 'Usage: ' . $ command . ' --query SQL [--ansi] ' . "\n" ;
240240 echo ' cat file.sql | ' . $ command . "\n" ;
@@ -258,15 +258,15 @@ public function parseTokenize(): array|false
258258 return $ params ;
259259 }
260260
261- public function runTokenize (bool $ isStandalone = true ): int
261+ public function runTokenize (): int
262262 {
263263 $ params = $ this ->parseTokenize ();
264264 if ($ params === false ) {
265265 return 1 ;
266266 }
267267
268268 if (isset ($ params ['h ' ])) {
269- $ this ->usageTokenize ($ isStandalone );
269+ $ this ->usageTokenize ();
270270
271271 return 0 ;
272272 }
@@ -302,7 +302,7 @@ public function runTokenize(bool $isStandalone = true): int
302302 }
303303
304304 echo "ERROR: Missing parameters! \n" ;
305- $ this ->usageTokenize ($ isStandalone );
305+ $ this ->usageTokenize ();
306306
307307 return 1 ;
308308 }
0 commit comments