InputSanitizerServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 22
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A registerInputSanitizer() 0 6 1
1
<?php
2
3
/**
4
 * Part of the InputSanitizer package.
5
 *
6
 * @package        InputSanitizer
7
 * @version        1.0.2
8
 * @author         Arthur Lorent <[email protected]>, Daniel Lucas <[email protected]>
9
 * @license        MIT
10
 * @copyright  (c) 2006-2017, ACID-Solutions SARL
11
 * @link           https://acid.fr
12
 */
13
14
namespace AcidSolutions\InputSanitizer\Laravel;
15
16
use AcidSolutions\InputSanitizer\InputSanitizer;
17
use Illuminate\Support\ServiceProvider;
18
19
class InputSanitizerServiceProvider extends ServiceProvider
20
{
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function register()
25
    {
26
        $this->registerInputSanitizer();
27
    }
28
29
    /**
30
     * Registers input sanitizer.
31
     *
32
     * @return void
33
     */
34
    protected function registerInputSanitizer()
35
    {
36
        $this->app->singleton('input_sanitizer', function () {
37
            return new InputSanitizer();
38
        });
39
    }
40
}
41