MinecraftDefaults::getRandomDefaultSkin()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Minepic\Minecraft;
6
7
class MinecraftDefaults
8
{
9
    public const STEVE_DEFAULT_SKIN_NAME = 'steve_default_skin';
10
    public const ALEX_DEFAULT_SKIN_NAME = 'alex_default_skin';
11
12
    public static function getRandomDefaultSkin(): string
13
    {
14
        return random_int(0, 1) === 1 ? self::STEVE_DEFAULT_SKIN_NAME : self::ALEX_DEFAULT_SKIN_NAME;
15
    }
16
}
17