@@ 131-137 (lines=7) @@ | ||
128 | /** |
|
129 | * {@inheritdoc} |
|
130 | */ |
|
131 | final public function add(QuantityInterface $addend) |
|
132 | { |
|
133 | $arg = $addend->convert($this->unit)->getQuantity(); |
|
134 | $res = $this->getCalculator()->add($this->quantity, $arg); |
|
135 | ||
136 | return $this->repeat($res); |
|
137 | } |
|
138 | ||
139 | /** |
|
140 | * {@inheritdoc} |
|
@@ 142-148 (lines=7) @@ | ||
139 | /** |
|
140 | * {@inheritdoc} |
|
141 | */ |
|
142 | final public function subtract(QuantityInterface $subtrahend) |
|
143 | { |
|
144 | $arg = $subtrahend->convert($this->unit)->getQuantity(); |
|
145 | $res = $this->getCalculator()->subtract($this->quantity, $arg); |
|
146 | ||
147 | return $this->repeat($res); |
|
148 | } |
|
149 | ||
150 | /** |
|
151 | * {@inheritdoc} |