/** * Prognosis in seconds * @param float $distance distance in km * @return int */ public function inSeconds($distance) { if (null === $this->Strategy) { throw new \RuntimeException('Prognosis class requires a strategy to be set.'); } return $this->Strategy->inSeconds($distance); }
/** * @return bool */ public function isValid() { return null !== $this->Strategy && $this->Strategy->valuesAreValid(); }