AbstractParser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A parse() 0 4 1
1
<?php
2
/**
3
 * Part of the Joomla Framework DateTime Package
4
 *
5
 * @copyright  Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
6
 * @license    GNU Lesser General Public License version 2.1 or later; see LICENSE
7
 */
8
9
namespace Joomla\DateTime\Parser;
10
11
use Joomla\DateTime\DateTime;
12
13
/**
14
 * AbstractParser.
15
 *
16
 * @since  2.0.0
17
 */
18
abstract class AbstractParser implements ParserInterface
19
{
20
	/**
21
	 * Parses to DateTime object.
22
	 *
23
	 * @param   string  $name   Name of the parser.
24
	 * @param   mixed   $value  The value to parse.
25
	 *
26
	 * @return  DateTime
27
	 *
28
	 * @since   2.0.0
29
	 */
30 3
	public function parse($name, $value)
31
	{
32 3
		return call_user_func_array(array($this, $name), array($value));
33
	}
34
}
35