Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Failed Conditions
Pull Request — master (#1082)
by Dan
05:43
created

ShipClass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAllNames() 0 2 1
A getName() 0 2 1
1
<?php declare(strict_types=1);
2
3
namespace Smr;
4
5
/**
6
 * Categorization of ship types.
7
 */
8
class ShipClass {
9
10
	const HUNTER = 1;
11
	const TRADER = 2;
12
	const RAIDER = 3;
13
	const SCOUT = 4;
14
	const STARTER = 5;
15
16
	const NAMES = [
17
		self::HUNTER => 'Hunter',
18
		self::TRADER => 'Trader',
19
		self::RAIDER => 'Raider',
20
		self::SCOUT => 'Scout',
21
		self::STARTER => 'Starter',
22
	];
23
24
	public static function getName(int $shipClassID) : string {
25
		return self::NAMES[$shipClassID];
26
	}
27
28
	public static function getAllNames() : array {
29
		return self::NAMES;
30
	}
31
32
}
33