Completed
Push — master ( c3f0f6...0c6e4d )
by Tomáš
02:30
created

WithGroups   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getGroups() 0 2 1
1
<?php
2
3
4
namespace TournamentGenerator\Traits;
5
6
7
use TournamentGenerator\Group;
8
use TournamentGenerator\Round;
9
10
/**
11
 * Trait WithGroups
12
 *
13
 * @package TournamentGenerator\Traits
14
 * @author  Tomáš Vojík <[email protected]>
15
 * @since   0.4
16
 */
17
trait WithGroups
18
{
19
20
	/**
21
	 * Get all groups in this object
22
	 *
23
	 * @return Group[]
24
	 */
25 40
	public function getGroups() : array {
26 40
		return $this->container->getHierarchyLevel(Group::class);
27
	}
28
}