MocktainerTestCaseTrait::getMocktainer()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php declare(strict_types = 1);
2
3
namespace Mocktainer;
4
5
trait MocktainerTestCaseTrait
6
{
7
8
	/** @var \Mocktainer\Mocktainer */
9
	private $mocktainer;
10
11
	public function getMocktainer(): Mocktainer
12
	{
13
		if ($this->mocktainer === null) {
14
			$this->mocktainer = new Mocktainer($this);
15
		}
16
17
		return $this->mocktainer;
18
	}
19
20
}
21