BlankTeam   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 21
ccs 5
cts 5
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace TournamentGenerator;
4
5
/**
6
 * Blank / dummy team used for simulating the games
7
 *
8
 * It's not a "real" team, but it holds a reference to the original team that it was created from.
9
 * The dummy teams are created in progressions where we do not really care for the real results, but only for the games that will be generated.
10
 * It keeps the original team's id, but everything else can be different.
11
 *
12
 * @author  Tomáš Vojík <[email protected]>
13
 * @package TournamentGenerator
14
 * @since   0.1
15
 */
16
class BlankTeam extends Team
17
{
18
19
	/** @var Group A group that it was generated from during progression */
20
	protected Group $from;
21
	/** @var Progression  A progression object that generated this dummy team */
22
	protected Progression $progression;
23
24
	/**
25
	 * BlankTeam constructor.
26
	 *
27
	 * @param string      $name        New team name
28
	 * @param Team        $original    Original team that this team is derived from
29
	 * @param Group       $from        A group that the original team was playing in
30
	 * @param Progression $progression A progression object that created this team
31
	 */
32 23
	public function __construct(string $name, Team $original, Group $from, Progression $progression) {
33 23
		$this->groupResults = $original->groupResults;
34 23
		$this->from = $from;
35 23
		$this->progression = $progression;
36 23
		parent::__construct($name, $original->getId());
37 23
	}
38
}
39