Skip to content
Extraits de code Groupes Projets
Valider 0016491f rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

rename methods to prevent error "two constructors are defined on PHP 5.3.2"

parent 899f1e2a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -38,7 +38,7 @@ class SafeDecodeLabel extends BaseFilter ...@@ -38,7 +38,7 @@ class SafeDecodeLabel extends BaseFilter
* @param string $value * @param string $value
* @return mixed|string * @return mixed|string
*/ */
public static function safeDecodeLabel($value) public static function decodeLabelSafe($value)
{ {
if (empty($value)) { if (empty($value)) {
return $value; return $value;
...@@ -66,7 +66,7 @@ class SafeDecodeLabel extends BaseFilter ...@@ -66,7 +66,7 @@ class SafeDecodeLabel extends BaseFilter
foreach ($table->getRows() as $row) { foreach ($table->getRows() as $row) {
$value = $row->getColumn($this->columnToDecode); $value = $row->getColumn($this->columnToDecode);
if ($value !== false) { if ($value !== false) {
$value = self::safeDecodeLabel($value); $value = self::decodeLabelSafe($value);
$row->setColumn($this->columnToDecode, $value); $row->setColumn($this->columnToDecode, $value);
$this->filterSubTable($row); $this->filterSubTable($row);
......
...@@ -73,7 +73,7 @@ class Sort extends BaseFilter ...@@ -73,7 +73,7 @@ class Sort extends BaseFilter
* @param number $b * @param number $b
* @return int * @return int
*/ */
public function sort($a, $b) public function numberSort($a, $b)
{ {
return !isset($a->c[Row::COLUMNS][$this->columnToSort]) return !isset($a->c[Row::COLUMNS][$this->columnToSort])
&& !isset($b->c[Row::COLUMNS][$this->columnToSort]) && !isset($b->c[Row::COLUMNS][$this->columnToSort])
...@@ -212,7 +212,7 @@ class Sort extends BaseFilter ...@@ -212,7 +212,7 @@ class Sort extends BaseFilter
$value = $row->getColumn($this->columnToSort); $value = $row->getColumn($this->columnToSort);
if (is_numeric($value)) { if (is_numeric($value)) {
$methodToUse = "sort"; $methodToUse = "numberSort";
} else { } else {
if ($this->naturalSort) { if ($this->naturalSort) {
$methodToUse = "naturalSort"; $methodToUse = "naturalSort";
......
...@@ -184,7 +184,7 @@ class RowEvolution ...@@ -184,7 +184,7 @@ class RowEvolution
} }
$return = array( $return = array(
'label' => SafeDecodeLabel::safeDecodeLabel($actualLabel), 'label' => SafeDecodeLabel::decodeLabelSafe($actualLabel),
'reportData' => $dataTable, 'reportData' => $dataTable,
'metadata' => $metadata 'metadata' => $metadata
); );
...@@ -480,7 +480,7 @@ class RowEvolution ...@@ -480,7 +480,7 @@ class RowEvolution
$label .= ' (' . $metadata['columns'][$column] . ')'; $label .= ' (' . $metadata['columns'][$column] . ')';
} }
$metricName = $column . '_' . $labelIndex; $metricName = $column . '_' . $labelIndex;
$metadata['metrics'][$metricName] = SafeDecodeLabel::safeDecodeLabel($label); $metadata['metrics'][$metricName] = SafeDecodeLabel::decodeLabelSafe($label);
if (!empty($logos[$labelIndex])) { if (!empty($logos[$labelIndex])) {
$metadata['logos'][$metricName] = $logos[$labelIndex]; $metadata['logos'][$metricName] = $logos[$labelIndex];
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter