public static function addRank($array, $key = 'rank', $columns = ['pointChart'], $boolEqual = false)
    {
        $rank     = 1;
        $compteur = 0;
        $nbEqual  = 1;
        $nb       = count($array);

        for ($i = 0; $i <= $nb - 1; $i++) {
            if ($i >= 1) {
                $row1    = $array[$i - 1];
                $row2    = $array[$i];
                $isEqual = true;
                foreach ($columns as $column) {
                    if ($row1[$column] != $row2[$column]) {
                        $isEqual = false;
                        break;
                    }
                }
                if ($isEqual) {
                    $compteur++;
                    ++$nbEqual;
                } else {
                    $rank     = $rank + $compteur + 1;
                    $compteur = 0;
                    unset($nbEqual);
                    $nbEqual = 1;
                }
            }

            $row       = $array[$i];
            $row[$key] = $rank;
            if ($boolEqual) {
                $row['nbEqual'] = &$nbEqual;
            }
            $array[$i] = $row;
        }
        unset($nbEqual);

        return $array;
    }