Completed
Push — output_formatting ( 5c6062...211baf )
by Emlyn
04:17 queued 01:36
created

AbstractFormatter::setContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * @package    Fuel\Foundation
4
 * @version    2.0
5
 * @author     Fuel Development Team
6
 * @license    MIT License
7
 * @copyright  2010 - 2017 Fuel Development Team
8
 * @link       http://fuelphp.com
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fuel\Foundation\Formatter;
14
15
use League\Container\ContainerInterface;
16
17
abstract class AbstractFormatter implements FormatterInterface
18
{
19
	/**
20
	 * @var ContainerInterface
21
	 */
22
	protected $container;
23
24
	/**
25
	 * Sets the dependency container that the formatter will use.
26
	 *
27
	 * @param ContainerInterface $container
28
	 */
29 3
	public function setContainer(ContainerInterface $container)
30
	{
31 3
		$this->container = $container;
32 3
	}
33
34
	/**
35
	 * Gets the current dependency container.
36
	 *
37
	 * @return ContainerInterface
38
	 */
39 3
	public function getContainer(): ContainerInterface
40
	{
41 3
		return $this->container;
42
	}
43
}
44