1919use function str_contains ;
2020use function str_repeat ;
2121use function str_replace ;
22+ use function strtolower ;
2223use function strtoupper ;
2324
2425use const ENT_NOQUOTES ;
@@ -82,7 +83,7 @@ protected function __construct(protected FormattingOptions $options = new Format
8283 * The styles used for HTML formatting.
8384 * [$type, $flags, $span, $callback].
8485 *
85- * @return list<array{type: int, flags: int, html: string, cli: string, function: string }>
86+ * @return list<array{type: int, flags: int, html: string, cli: string, function: callable|'' }>
8687 */
8788 protected function getDefaultFormats (): array
8889 {
@@ -92,14 +93,14 @@ protected function getDefaultFormats(): array
9293 'flags ' => Token::FLAG_KEYWORD_RESERVED ,
9394 'html ' => 'class="sql-reserved" ' ,
9495 'cli ' => "\x1b[35m " ,
95- 'function ' => ' strtoupper ' ,
96+ 'function ' => strtoupper (...) ,
9697 ],
9798 [
9899 'type ' => TokenType::Keyword->value ,
99100 'flags ' => 0 ,
100101 'html ' => 'class="sql-keyword" ' ,
101102 'cli ' => "\x1b[95m " ,
102- 'function ' => ' strtoupper ' ,
103+ 'function ' => strtoupper (...) ,
103104 ],
104105 [
105106 'type ' => TokenType::Comment->value ,
@@ -113,14 +114,14 @@ protected function getDefaultFormats(): array
113114 'flags ' => 0 ,
114115 'html ' => 'class="sql-atom" ' ,
115116 'cli ' => "\x1b[36m " ,
116- 'function ' => ' strtoupper ' ,
117+ 'function ' => strtoupper (...) ,
117118 ],
118119 [
119120 'type ' => TokenType::Number->value ,
120121 'flags ' => 0 ,
121122 'html ' => 'class="sql-number" ' ,
122123 'cli ' => "\x1b[92m " ,
123- 'function ' => ' strtolower ' ,
124+ 'function ' => strtolower (...) ,
124125 ],
125126 [
126127 'type ' => TokenType::String->value ,
0 commit comments