FuelServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A provide() 0 12 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\Provider;
12
13
use Fuel\Dependency\ServiceProvider;
14
15
/**
16
 * FuelServiceProvider implementation for Validation
17
 *
18
 * @package Fuel\Validation
19
 * @author  Fuel Development Team
20
 * @since   2.0
21
 */
22
class FuelServiceProvider extends ServiceProvider
23
{
24
25
	public $provides = array('validator', 'validation.ruleprovider.array');
26
27
	public function provide()
28
	{
29
		$this->register('validator', function ($dic)
30
		{
31
			return $dic->resolve('Fuel\Validation\Validator');
32
		});
33
34
		$this->register('validation.ruleprovider.array', function ($dic)
35
		{
36
			return $dic->resolve('Fuel\Validation\RuleProvider\FromArray');
37
		});
38
	}
39
40
41
}
42