I have the following function:
class TariffFareController {
public static function checkRunin($fieldPickup) {
$runInThreshold = 5;
$fieldDestination = 6;
if ($fieldPickup > $runInThreshold && $fieldDestination > $runInThreshold)
{
if ($fieldPickup > $fieldDestination)
{
$distance = $fieldPickup - $runInThreshold;
} else {
$distance = $fieldDestination - $runInThreshold;
}
}
}
I want to pass $distance
to this function:-
private static function getFare($int_terminate) {
//CODE
//eg// if($distance > 5) {
//do something
}
}
How can I do this?