Skip to content

Commit f399636

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

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

‎lib/composer/composer/autoload_classmap.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,6 @@
13881388
'OC\\Collaboration\\Resources\\Manager' => $baseDir . '/lib/private/Collaboration/Resources/Manager.php',
13891389
'OC\\Collaboration\\Resources\\ProviderManager' => $baseDir . '/lib/private/Collaboration/Resources/ProviderManager.php',
13901390
'OC\\Collaboration\\Resources\\Resource' => $baseDir . '/lib/private/Collaboration/Resources/Resource.php',
1391-
'OC\\Color' => $baseDir . '/lib/private/Color.php',
13921391
'OC\\Command\\AsyncBus' => $baseDir . '/lib/private/Command/AsyncBus.php',
13931392
'OC\\Command\\CommandJob' => $baseDir . '/lib/private/Command/CommandJob.php',
13941393
'OC\\Command\\CronBus' => $baseDir . '/lib/private/Command/CronBus.php',

‎lib/composer/composer/autoload_static.php‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
1111
);
1212

1313
public static $prefixLengthsPsr4 = array (
14-
'O' =>
14+
'O' =>
1515
array (
1616
'OC\\Core\\' => 8,
1717
'OC\\' => 3,
1818
'OCP\\' => 4,
1919
),
20-
'N' =>
20+
'N' =>
2121
array (
2222
'NCU\\' => 4,
2323
),
2424
);
2525

2626
public static $prefixDirsPsr4 = array (
27-
'OC\\Core\\' =>
27+
'OC\\Core\\' =>
2828
array (
2929
0 => __DIR__ . '/../../..' . '/core',
3030
),
31-
'OC\\' =>
31+
'OC\\' =>
3232
array (
3333
0 => __DIR__ . '/../../..' . '/lib/private',
3434
),
35-
'OCP\\' =>
35+
'OCP\\' =>
3636
array (
3737
0 => __DIR__ . '/../../..' . '/lib/public',
3838
),
39-
'NCU\\' =>
39+
'NCU\\' =>
4040
array (
4141
0 => __DIR__ . '/../../..' . '/lib/unstable',
4242
),
@@ -1429,7 +1429,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
14291429
'OC\\Collaboration\\Resources\\Manager' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Resources/Manager.php',
14301430
'OC\\Collaboration\\Resources\\ProviderManager' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Resources/ProviderManager.php',
14311431
'OC\\Collaboration\\Resources\\Resource' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Resources/Resource.php',
1432-
'OC\\Color' => __DIR__ . '/../../..' . '/lib/private/Color.php',
14331432
'OC\\Command\\AsyncBus' => __DIR__ . '/../../..' . '/lib/private/Command/AsyncBus.php',
14341433
'OC\\Command\\CommandJob' => __DIR__ . '/../../..' . '/lib/private/Command/CommandJob.php',
14351434
'OC\\Command\\CronBus' => __DIR__ . '/../../..' . '/lib/private/Command/CronBus.php',

‎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+
$incR = (int)($colorTo->red() / $steps * $j);
267+
$incG = (int)($colorTo->green() / $steps * $j);
268+
$incB = (int)($colorTo->blue() / $steps * $j);
269269
// ensure everything is equal
270270
$this->assertEquals($color, new Color($incR, $incG, $incB));
271271
}

0 commit comments

Comments
 (0)