OpeningTimesProviderTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 20
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getOpeningTimes() 0 7 2
1
<?php
2
namespace Germania\OpeningTimes;
3
4
trait OpeningTimesProviderTrait
5
{
6
7
	public $opening_times;
8
9
10
	/**
11
	 * @inheritDoc
12
	 * @return OpeningTimes
13
	 */
14 4
	public function getOpeningTimes() : OpeningTimesInterface
15
	{
16 4
		if (!$this->opening_times)		
17 4
			$this->opening_times = new OpeningTimes;
18
19 4
		return $this->opening_times;
20
	}
21
22
23
}