registerInputSanitizer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 2
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