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

MinecraftDefaults   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 14
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRandomDefaultSkin() 0 3 2
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