FuelServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * @package    Fuel\FileSystem
4
 * @version    2.0
5
 * @author     Fuel Development Team
6
 * @license    MIT License
7
 * @copyright  2010 - 2015 Fuel Development Team
8
 * @link       http://fuelphp.com
9
 */
10
11
namespace Fuel\FileSystem\Providers;
12
13
use Fuel\FileSystem\Finder;
14
use League\Container\ServiceProvider;
15
16
/**
17
 * Fuel ServiceProvider class for Filesystem
18
 */
19
class FuelServiceProvider extends ServiceProvider
20
{
21
	/**
22
	 * @var array
23
	 */
24
	public $provides = ['finder'];
25
26
	/**
27
	 * {@inheritdoc}
28
	 */
29
	public function register()
30
	{
31
		$this->container->add('finder', function (array $paths = null, $defaultExtension = null, $root = null)
32
		{
33
			return new Finder($paths, $defaultExtension, $root);
34
		});
35
	}
36
}
37