InvalidRuleException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 6
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
crap 1
1
<?php
2
/**
3
 * @package   Fuel\Validation
4
 * @version   2.0
5
 * @author    Fuel Development Team
6
 * @license   MIT License
7
 * @copyright 2010 - 2013 Fuel Development Team
8
 * @link      http://fuelphp.com
9
 */
10
11
namespace Fuel\Validation;
12
13
use Exception;
14
use InvalidArgumentException;
15
16
/**
17
 * Thrown when a specified rule is not known
18
 *
19
 * @package Fuel\Validation
20
 * @author  Fuel Development Team
21
 *
22
 * @since   2.0
23
 */
24 View Code Duplication
class InvalidRuleException extends InvalidArgumentException
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
25
{
26
27
	/**
28
	 * @param string     $message  This is expected to be left blank or be a field name
29
	 * @param int        $code
30
	 * @param \Exception $previous
31
	 *
32
	 * @since 2.0
33
	 */
34 2
	public function __construct($message = '', $code = 0, Exception $previous = null)
35
	{
36 2
		$error = 'VAL-004: The rule ['.$message.'] is not known.';
37
38 2
		parent::__construct($error, $code, $previous);
39 2
	}
40
41
}
42