| @@ 113-119 (lines=7) @@ | ||
| 110 | /** |
|
| 111 | * {@inheritdoc} |
|
| 112 | */ |
|
| 113 | final public function add(QuantityInterface $addend) |
|
| 114 | { |
|
| 115 | $arg = $addend->convert($this->unit); |
|
| 116 | $res = $this->getCalculator()->add($this->quantity, $arg); |
|
| 117 | ||
| 118 | return $this->create($res); |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * {@inheritdoc} |
|
| @@ 124-130 (lines=7) @@ | ||
| 121 | /** |
|
| 122 | * {@inheritdoc} |
|
| 123 | */ |
|
| 124 | final public function subtract(QuantityInterface $subtrahend) |
|
| 125 | { |
|
| 126 | $arg = $subtrahend->convert($this->unit); |
|
| 127 | $res = $this->getCalculator()->subtract($this->quantity, $arg); |
|
| 128 | ||
| 129 | return $this->create($res); |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * {@inheritdoc} |
|