UuidGenerator::generate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Session
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Session\Generator;
16
17
use Phossa2\Uuid\Uuid;
18
use Phossa2\Shared\Base\ObjectAbstract;
19
use Phossa2\Session\Interfaces\GeneratorInterface;
20
21
/**
22
 * UuidGenerator
23
 *
24
 * Generating new session using phossa2/uuid
25
 *
26
 * @package Phossa2\Session
27
 * @author  Hong Zhang <[email protected]>
28
 * @see     ObjectAbstract
29
 * @see     GeneratorInterface
30
 * @version 2.1.0
31
 * @since   2.1.0 added
32
 */
33
class UuidGenerator extends ObjectAbstract implements GeneratorInterface
34
{
35
    /**
36
     * {@inheritDoc}
37
     *
38
     * @see    GeneratorInterface::generate()
39
     */
40
    public function generate()/*# : string */
41
    {
42
        return Uuid::get(Uuid::TYPE_SESSION);
43
    }
44
}
45