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