NamedSection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 31
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 6 1
1
<?php
2
3
namespace Jalle19\HaPHProxy\Section;
4
5
/**
6
 * Class NamedSection
7
 * @package Jalle19\HaPHProxy\Section
8
 * @author  Sam Stenvall <[email protected]>
9
 * @license GNU General Public License 2.0+
10
 */
11
abstract class NamedSection extends AbstractSection
12
{
13
14
	/**
15
	 * @var string
16
	 */
17
	protected $sectionLine;
18
19
20
	/**
21
	 * ListenSection constructor.
22
	 *
23
	 * @param string $sectionLine
24
	 */
25
	public function __construct($sectionLine)
26
	{
27
		$this->sectionLine = $sectionLine;
28
	}
29
30
31
	/**
32
	 * @return string the name of the section
33
	 */
34
	public function getName()
35
	{
36
		$words = explode(' ', $this->sectionLine, 2);
37
38
		return $words[1];
39
	}
40
41
}
42