| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | 2 | protected function extractParameters(\DOMNode $node): void |
|
| 41 | { |
||
| 42 | 2 | $amount = $node->attributes->getNamedItem('amount')->nodeValue |
|
| 43 | 2 | ?? $this->cache->get("{$this->prefix}_amount"); |
|
| 44 | |||
| 45 | 2 | if (! $amount) { |
|
| 46 | 1 | throw new \Exception("Arg 'amount' is required."); |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | $this->amount = (float) $amount; |
|
| 50 | |||
| 51 | 1 | $this->currency = $node->attributes->getNamedItem('currency')->nodeValue |
|
| 52 | 1 | ?? $this->cache->get("{$this->prefix}_currency", 'UGX'); |
|
| 53 | } |
||
| 55 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.