@@ -357,7 +357,7 @@ abstract class Context
357357 *
358358 * @param bool $isReserved checks if the keyword is reserved
359359 */
360- public static function isKeyword (string $ string , bool $ isReserved = false ): ? int
360+ public static function isKeyword (string $ string , bool $ isReserved = false ): int | null
361361 {
362362 $ upperString = strtoupper ($ string );
363363
@@ -374,7 +374,7 @@ public static function isKeyword(string $string, bool $isReserved = false): ?int
374374 /**
375375 * Checks if the given string is an operator and returns the appropriate flag for the operator.
376376 */
377- public static function isOperator (string $ string ): ? int
377+ public static function isOperator (string $ string ): int | null
378378 {
379379 return static ::$ operators [$ string ] ?? null ;
380380 }
@@ -392,7 +392,7 @@ public static function isWhitespace(string $string): bool
392392 *
393393 * @return int|null the appropriate flag for the comment type
394394 */
395- public static function isComment (string $ string , bool $ end = false ): ? int
395+ public static function isComment (string $ string , bool $ end = false ): int | null
396396 {
397397 if ($ string === '' ) {
398398 return null ;
@@ -455,7 +455,7 @@ public static function isNumber(string $string): bool
455455 *
456456 * @return int|null the appropriate flag for the symbol type
457457 */
458- public static function isSymbol (string $ string ): ? int
458+ public static function isSymbol (string $ string ): int | null
459459 {
460460 if ($ string === '' ) {
461461 return null ;
@@ -483,7 +483,7 @@ public static function isSymbol(string $string): ?int
483483 *
484484 * @return int|null the appropriate flag for the string type
485485 */
486- public static function isString (string $ string ): ? int
486+ public static function isString (string $ string ): int | null
487487 {
488488 if ($ string === '' ) {
489489 return null ;
@@ -559,7 +559,7 @@ public static function load(string $context = ''): bool
559559 *
560560 * @return string|null The loaded context. `null` if no context was loaded.
561561 */
562- public static function loadClosest (string $ context = '' ): ? string
562+ public static function loadClosest (string $ context = '' ): string | null
563563 {
564564 $ length = strlen ($ context );
565565 for ($ i = $ length ; $ i > 0 ;) {
@@ -776,7 +776,7 @@ public static function getIdentifierQuote(): string
776776 *
777777 * @return bool false on empty param, true/false on given constant/int value
778778 */
779- public static function hasMode (? int $ flag = null ): bool
779+ public static function hasMode (int | null $ flag = null ): bool
780780 {
781781 if (empty ($ flag )) {
782782 return false ;
0 commit comments