AbstractParser::parse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 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