Scrutinizer resolutions (#1031)
* list($ac, $ar) = sscanf($a, '%[A-Z]%d'); to appease scrutinizer, which complains about ($a, '%[A-Z]%d') * Fix a docblock error
This commit is contained in:
parent
14e980625f
commit
591f1e0c70
@ -82,8 +82,11 @@ class ReferenceHelper
|
|||||||
*/
|
*/
|
||||||
public static function cellSort($a, $b)
|
public static function cellSort($a, $b)
|
||||||
{
|
{
|
||||||
sscanf($a, '%[A-Z]%d', $ac, $ar);
|
// TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax
|
||||||
sscanf($b, '%[A-Z]%d', $bc, $br);
|
// [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support.
|
||||||
|
// Switch when we drop support for 5.6
|
||||||
|
list($ac, $ar) = sscanf($a, '%[A-Z]%d');
|
||||||
|
list($bc, $br) = sscanf($b, '%[A-Z]%d');
|
||||||
|
|
||||||
if ($ar === $br) {
|
if ($ar === $br) {
|
||||||
return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);
|
return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);
|
||||||
@ -103,8 +106,11 @@ class ReferenceHelper
|
|||||||
*/
|
*/
|
||||||
public static function cellReverseSort($a, $b)
|
public static function cellReverseSort($a, $b)
|
||||||
{
|
{
|
||||||
sscanf($a, '%[A-Z]%d', $ac, $ar);
|
// TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax
|
||||||
sscanf($b, '%[A-Z]%d', $bc, $br);
|
// [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support.
|
||||||
|
// Switch when we drop support for 5.6
|
||||||
|
list($ac, $ar) = sscanf($a, '%[A-Z]%d');
|
||||||
|
list($bc, $br) = sscanf($b, '%[A-Z]%d');
|
||||||
|
|
||||||
if ($ar === $br) {
|
if ($ar === $br) {
|
||||||
return 1 - strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);
|
return 1 - strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);
|
||||||
|
@ -2064,7 +2064,7 @@ class Worksheet implements IComparable
|
|||||||
/**
|
/**
|
||||||
* Insert a new column, updating all possible related data.
|
* Insert a new column, updating all possible related data.
|
||||||
*
|
*
|
||||||
* @param int $pBefore Insert before this one, eg: 'A'
|
* @param string $pBefore Insert before this one, eg: 'A'
|
||||||
* @param int $pNumCols Number of columns to insert
|
* @param int $pNumCols Number of columns to insert
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
Loading…
Reference in New Issue
Block a user