| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | public function __invoke(array $bitmap, $width, $height, $maximum, $factor) |
|
| 19 | { |
||
| 20 | 1 | $new = []; |
|
| 21 | |||
| 22 | 1 | for ($y = 0; $y < $height; $y++) { |
|
| 23 | 1 | $new[$y] = []; |
|
| 24 | |||
| 25 | 1 | for ($x = 0; $x < $width; $x++) { |
|
| 26 | 1 | $new[$y][$x] = ($bitmap[$y][$x] / $maximum) * $factor; |
|
| 27 | 1 | } |
|
| 28 | 1 | } |
|
| 29 | |||
| 30 | 1 | return $new; |
|
| 31 | } |
||
| 32 | } |
||
| 33 |