コード例 #1
0
ファイル: Prognosis.php プロジェクト: 9x/Runalyze
 /**
  * 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);
 }
コード例 #2
0
ファイル: Prognosis.php プロジェクト: guancio/Runalyze
 /**
  * @return bool
  */
 public function isValid()
 {
     return null !== $this->Strategy && $this->Strategy->valuesAreValid();
 }