Sintaxis arreglada

This commit is contained in:
Alejandro Tasistro 2024-07-09 21:33:52 -03:00
parent f9a5b5bca7
commit a52dce2b37
1 changed files with 5 additions and 5 deletions

View File

@ -1,19 +1,19 @@
<?php <?php
namespace App; namespace App\Utils;
class TransporteUtils class TransporteUtils
{ {
public const COSTO_TRANSPORTE = 15; public const COSTO_TRANSPORTE = 15;
public const DIVISOR_TRANSPORTE = 500; public const DIVISOR_TRANSPORTE = 500;
static function cantidad(float $total) : int { private static function cantidad(float $total) : int {
if ($total) if ($total)
return 1 + floor($total / DIVISOR_TRANSPORTE); return 1 + floor($total / TransporteUtils::DIVISOR_TRANSPORTE);
return 0; return 0;
} }
static function calcularTotal(float $total) : int { public static function calcularTotal(float $total) : int {
return cantidad($total) * COSTO_TRANSPORTE; return TransporteUtils::cantidad($total) * TransporteUtils::COSTO_TRANSPORTE;
} }
} }