Passed
Push — master ( 88719b...8b8021 )
by Mattia
04:25
created

MinecraftDefaults::getRandomDefaultSkin()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Minecraft;
6
7
class MinecraftDefaults
8
{
9
    public const UUID = '8667ba71b85a4004af54457a9734eed7';
10
    public const USERNAME = 'Steve';
11
    public const STEVE_DEFAULT_SKIN_NAME = 'steve_default_skin';
12
    public const ALEX_DEFAULT_SKIN_NAME = 'alex_default_skin';
13
14
    /**
15
     * @return string
16
     * @throws \Exception
17
     */
18
    public static function getRandomDefaultSkin(): string
19
    {
20
        return random_int(0, 1) === 1 ? self::STEVE_DEFAULT_SKIN_NAME : self::ALEX_DEFAULT_SKIN_NAME;
21
    }
22
}
23