| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 14 | public function countTrade(Trade $trade): Trade |
|
| 49 | { |
||
| 50 | 14 | if ($this->pair !== $trade->pair) { |
|
| 51 | throw new \RuntimeException('DataInconsistency'); // todo update message |
||
| 52 | } |
||
| 53 | 14 | foreach (static::PERIODS as $length => $groupBy) { |
|
| 54 | 14 | $this->counters[$length]->addEvent($trade->timestamp); |
|
| 55 | } |
||
| 56 | 14 | return $trade; |
|
| 57 | } |
||
| 74 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.