Exemplo n.º 1
0
 private function getValue(AbstractScale $scale)
 {
     if (is_null($this->precise)) {
         return $scale->getValue();
     }
     return round($scale->getValue(), $this->precise);
 }
Exemplo n.º 2
0
 /**
  * @param AbstractScale $scale
  * @param $symbol scale symbol
  * @return AbstractScale
  * @throws \Exception
  */
 public function buildByScale(AbstractScale $scale, $symbol)
 {
     $newScale = $this->supportedScalesCollection->get($symbol);
     $newScale->setValueInCelsius($scale->getValueInCelsius());
     $newScale->setFactory($this);
     $newScale->setFormatter($this->getFormatter());
     return $newScale;
 }