Completed
Push — master ( 959f68...c6517b )
by Alexey
29s queued 12s
created

RandomizeTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRandomId() 0 4 1
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