Completed
Pull Request — master (#7)
by
unknown
07:59
created

RandomizeTrait::getRandomId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace SfCod\QueueBundle\Base;
4
5
/**
6
 * Trait RandomizeTrait
7
 *
8
 * @package SfCod\QueueBundle\Base
9
 */
10
trait RandomizeTrait
11
{
12
    /**
13
     * Get a random ID string.
14
     *
15
     * @return string
16
     *
17
     * @throws \Exception
18
     */
19
    private function getRandomId(): string
20
    {
21
        return bin2hex(random_bytes(12));
22
    }
23
}
24