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
Push — main ( 30fe2e...c58695 )
by Dan
04:45
created

StoredDestination   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDisplayName() 0 6 2
A __construct() 0 6 1
1
<?php declare(strict_types=1);
2
3
namespace Smr;
4
5
/**
6
 * Data class for course plotting destinations stored by the player.
7
 */
8
class StoredDestination {
9
10
	public function __construct(
11
		public readonly string $label,
12
		public readonly int $sectorID,
13
		public readonly int $offsetTop,
14
		public readonly int $offsetLeft,
15
	) {}
16
17
	/**
18
	 * Returns the name to display for this destination, e.g. "#42 - UG".
19
	 */
20
	public function getDisplayName(): string {
21
		$name = '#' . $this->sectorID;
22
		if (!empty($this->label)) {
23
			$name .= ' - ' . $this->label;
24
		}
25
		return $name;
26
	}
27
28
}
29