| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 5 | public function value($incoming) |
|
| 31 | { |
||
| 32 | 5 | $this->Rate = self::config()->rate; |
|
| 33 | //inclusive tax requires a different calculation |
||
| 34 | 5 | return self::config()->exclusive |
|
| 35 | ? |
||
| 36 | 5 | $incoming * $this->Rate |
|
| 37 | 4 | : |
|
| 38 | 5 | $incoming - round($incoming / (1 + $this->Rate), Order::config()->rounding_precision); |
|
| 39 | } |
||
| 40 | } |
||
| 41 |
Since your code implements the magic setter
_set, this function will be called for any write access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.