diff --git a/BUGS.md b/BUGS.md index 7edf5133..9cb4b45d 100644 --- a/BUGS.md +++ b/BUGS.md @@ -21,7 +21,7 @@ ## 8) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES sono invertiti WIN con LOST ## 9) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES è opportuno sostituire Win con 1, Draw con X e Lost con 2 ## 10) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES sono sbagliate le Average Goals -11) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES i valori delle quote dovrebbero avere due decimali fissi +## 11) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES i valori delle quote dovrebbero avere due decimali fissi 12) Filtrando per PLAYER sono sbagliate le Average Goals, sia Totali che Home/Away 13) Quando si filtra per PLAYER meglio sostituire Home con In Favour e Away con Against 14) Un piccolo dettaglio: nella combo SIMILAR PAST MATCHES la terza voce è All: Database, ma i ":" dovrebbero essere prima di "All" \ No newline at end of file diff --git a/app/Filament/Widgets/Data/HelperMoveingAverage.php b/app/Filament/Widgets/Data/HelperMoveingAverage.php index 075c651a..2c606fb9 100644 --- a/app/Filament/Widgets/Data/HelperMoveingAverage.php +++ b/app/Filament/Widgets/Data/HelperMoveingAverage.php @@ -19,9 +19,9 @@ class HelperMoveingAverage $last = count($arr); foreach ($arr as $key => $value) { if ($key == 1 && $last > 2) { - $new[] = round(($arr[0] + $value + $arr[2]) / 3, 1); + $new[] = round(((float) $arr[0] + (float) $value + (float) $arr[2]) / 3, 1); } elseif ($key > 1 && $key < $last - 1) { - $new[] = round(($arr[$key - 1] + $value + $arr[$key + 1]) / 3, 1); + $new[] = round(((float) $arr[$key - 1] + (float) $value + (float) $arr[$key + 1]) / 3, 1); } } $data['datasets'][$k]['data'] = $new;