Completed
Push — master ( 0cc554...fa9e93 )
by Josh
16:05
created

Bundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
configure() 0 1 ?
A getConfigurator() 0 9 1
A getOptions() 0 4 1
1
<?php
2
3
/**
4
* @package   s9e\TextFormatter
5
* @copyright Copyright (c) 2010-2017 The s9e Authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\TextFormatter\Configurator;
9
10
use s9e\TextFormatter\Configurator;
11
12
abstract class Bundle
13
{
14
	/**
15
	* Configure a Configurator instance with this bundle's settings
16
	*
17
	* @param  Configurator $configurator
18
	* @return void
19
	*/
20
	abstract public function configure(Configurator $configurator);
21
22
	/**
23
	* Create and return a configured instance of Configurator
24
	*
25
	* @return Configurator
26
	*/
27 1
	public static function getConfigurator()
28
	{
29 1
		$configurator = new Configurator;
30
31 1
		$bundle  = new static;
32 1
		$bundle->configure($configurator);
33
34 1
		return $configurator;
35
	}
36
37
	/**
38
	* Return extra options to be passed to the bundle generator
39
	*
40
	* Used by scripts/generateBundles.php
41
	*
42
	* @return array
43
	*/
44 1
	public static function getOptions()
45
	{
46 1
		return [];
47
	}
48
}