SaxulumCrudProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 15 1
1
<?php
2
3
namespace Saxulum\Crud\Provider;
4
5
use Pimple\Container;
6
use Pimple\ServiceProviderInterface;
7
use Saxulum\Crud\Listing\ListingFactory;
8
use Saxulum\Crud\Listing\Type\ArrayType;
9
use Saxulum\Crud\Listing\Type\FloatType;
10
use Saxulum\Crud\Listing\Type\IntegerType;
11
use Saxulum\Crud\Listing\Type\StringType;
12
13
class SaxulumCrudProvider implements ServiceProviderInterface
14
{
15
    public function register(Container $pimple)
16
    {
17
        $pimple['saxulum.crud.listing.types'] = function(){
18
            return array(
19
                new ArrayType(),
20
                new FloatType(),
21
                new IntegerType(),
22
                new StringType(),
23
            );
24
        };
25
26
        $pimple['saxulum.crud.listing.factory'] = function() use ($pimple) {
27
            return new ListingFactory($pimple['saxulum.crud.listing.types']);
28
        };
29
    }
30
}
31