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

AbstractFormatter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setContainer() 0 4 1
A getContainer() 0 4 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