@@ -82,8 +82,11 @@ public static function columnReverseSort($a, $b)
8282 */
8383 public static function cellSort ($ a , $ b )
8484 {
85- sscanf ($ a , '%[A-Z]%d ' , $ ac , $ ar );
86- sscanf ($ b , '%[A-Z]%d ' , $ bc , $ br );
85+ // TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax
86+ // [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support.
87+ // Switch when we drop support for 5.6
88+ list ($ ac , $ ar ) = sscanf ($ a , '%[A-Z]%d ' );
89+ list ($ bc , $ br ) = sscanf ($ b , '%[A-Z]%d ' );
8790
8891 if ($ ar === $ br ) {
8992 return strcasecmp (strlen ($ ac ) . $ ac , strlen ($ bc ) . $ bc );
@@ -103,8 +106,11 @@ public static function cellSort($a, $b)
103106 */
104107 public static function cellReverseSort ($ a , $ b )
105108 {
106- sscanf ($ a , '%[A-Z]%d ' , $ ac , $ ar );
107- sscanf ($ b , '%[A-Z]%d ' , $ bc , $ br );
109+ // TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax
110+ // [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support.
111+ // Switch when we drop support for 5.6
112+ list ($ ac , $ ar ) = sscanf ($ a , '%[A-Z]%d ' );
113+ list ($ bc , $ br ) = sscanf ($ b , '%[A-Z]%d ' );
108114
109115 if ($ ar === $ br ) {
110116 return 1 - strcasecmp (strlen ($ ac ) . $ ac , strlen ($ bc ) . $ bc );
0 commit comments