@@ -1006,15 +1006,18 @@ public function protectIdentifiers($item, bool $prefixSingle = false, ?bool $pro
10061006 // Added exception for single quotes as well, we don't want to alter
10071007 // literal strings.
10081008 if (strcspn ($ item , "()' " ) !== strlen ($ item )) {
1009+ /** @psalm-suppress NoValue I don't know why ERROR. */
10091010 return $ item ;
10101011 }
10111012
10121013 // Do not protect identifiers and do not prefix, no swap prefix, there is nothing to do
10131014 if ($ protectIdentifiers === false && $ prefixSingle === false && $ this ->swapPre === '' ) {
1015+ /** @psalm-suppress NoValue I don't know why ERROR. */
10141016 return $ item ;
10151017 }
10161018
10171019 // Convert tabs or multiple spaces into single spaces
1020+ /** @psalm-suppress NoValue I don't know why ERROR. */
10181021 $ item = preg_replace ('/\s+/ ' , ' ' , trim ($ item ));
10191022
10201023 // If the item has an alias declaration we remove it and set it aside.
@@ -1176,6 +1179,7 @@ public function escapeIdentifiers($item)
11761179 }
11771180
11781181 foreach ($ this ->reservedIdentifiers as $ id ) {
1182+ /** @psalm-suppress NoValue I don't know why ERROR. */
11791183 if (strpos ($ item , '. ' . $ id ) !== false ) {
11801184 return preg_replace (
11811185 '/ ' . $ this ->pregEscapeChar [0 ] . '?([^ ' . $ this ->pregEscapeChar [1 ] . '\.]+) ' . $ this ->pregEscapeChar [1 ] . '?\./i ' ,
@@ -1185,6 +1189,7 @@ public function escapeIdentifiers($item)
11851189 }
11861190 }
11871191
1192+ /** @psalm-suppress NoValue I don't know why ERROR. */
11881193 return preg_replace (
11891194 '/ ' . $ this ->pregEscapeChar [0 ] . '?([^ ' . $ this ->pregEscapeChar [1 ] . '\.]+) ' . $ this ->pregEscapeChar [1 ] . '?(\.)?/i ' ,
11901195 $ this ->pregEscapeChar [2 ] . '$1 ' . $ this ->pregEscapeChar [3 ] . '$2 ' ,
@@ -1228,6 +1233,7 @@ public function escape($str)
12281233 return array_map ([&$ this , 'escape ' ], $ str );
12291234 }
12301235
1236+ /** @psalm-suppress NoValue I don't know why ERROR. */
12311237 if (is_string ($ str ) || (is_object ($ str ) && method_exists ($ str , '__toString ' ))) {
12321238 if ($ str instanceof RawSql) {
12331239 return $ str ->__toString ();
0 commit comments