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

UuidRamseyFacade::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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