Completed
Pull Request — master (#39)
by Daniel
03:46
created

UuidRamseyFacade   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A generateUuid() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Jellyfish\UuidRamsey;
6
7
use Jellyfish\Uuid\UuidFacadeInterface;
8
9
class UuidRamseyFacade implements UuidFacadeInterface
10
{
11
    /**
12
     * @var \Jellyfish\UuidRamsey\UuidRamseyFactory
13
     */
14
    protected $factory;
15
16
    /**
17
     * @param \Jellyfish\UuidRamsey\UuidRamseyFactory $factory
18
     */
19
    public function __construct(UuidRamseyFactory $factory)
20
    {
21
        $this->factory = $factory;
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function generateUuid(): string
28
    {
29
        return $this->factory->createUuidGenerator()->generate();
30
    }
31
}
32