Esempio n. 1
0
 /**
  * @return float|int
  * @throws \Granam\Integer\Tools\Exceptions\WrongParameterType
  * @throws \Granam\Integer\Tools\Exceptions\ValueLostOnCast
  */
 public function getValue()
 {
     if ($this->getUnit() === self::ROUND) {
         // only rounds are always integer
         return ToInteger::toInteger(parent::getValue());
     }
     return parent::getValue();
 }
Esempio n. 2
0
 /**
  * @param float $value
  * @param string $unit
  */
 public function __construct($value, $unit)
 {
     parent::__construct($value, $unit);
 }