DateTimeParser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
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 18
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
 * Default implementation of the Parser interface.
15
 *
16
 * @since  2.0.0
17
 */
18
final class DateTimeParser 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
	 * @throws  \BadMethodCallException
30
	 */
31 1
	public function parse($name, $value)
32
	{
33 1
		throw new \BadMethodCallException("Parser method '$name' doesn't exist.");
34
	}
35
}
36