Skip to content

Commit 9f4ae75

Browse files
joshtrichardsCarlSchwan
authored andcommitted
test(UserAvatar): cast color progressions to int to match contract
Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent 9e66808 commit 9f4ae75

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/lib/Avatar/UserAvatarTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ public function testMixPalette(): void {
263263
$palette = Color::mixPalette($steps, $colorFrom, $colorTo);
264264
foreach ($palette as $j => $color) {
265265
// calc increment
266-
$incR = $colorTo->red() / $steps * $j;
267-
$incG = $colorTo->green() / $steps * $j;
268-
$incB = $colorTo->blue() / $steps * $j;
266+
(int)$incR = $colorTo->red() / $steps * $j;
267+
(int)$incG = $colorTo->green() / $steps * $j;
268+
(int)$incB = $colorTo->blue() / $steps * $j;
269269
// ensure everything is equal
270270
$this->assertEquals($color, new Color($incR, $incG, $incB));
271271
}

0 commit comments

Comments
 (0)