Completed
Push — master ( 189bb6...0d32b3 )
by Matthew
03:08
created

UuidServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
1
<?php
2
3
namespace Ps2alerts\Api\ServiceProvider;
4
5
use League\Container\ServiceProvider;
6
use Ramsey\Uuid\Uuid;
7
8
class UuidServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * @var array
12
     */
13
    protected $provides = [
14
        'Ramsey\Uuid\Uuid',
15
    ];
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function register()
21
    {
22
        $this->getContainer()->add('Ramsey\Uuid\Uuid', function () {
23
            $uuid = Uuid::Uuid4();
24
            return $uuid;
25
        });
26
    }
27
}
28