Completed
Push — master ( 4dd992...7f3992 )
by Cheren
04:17
created

Token   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 4 1
1
<?php
2
/**
3
 * CakeCMS Community
4
 *
5
 * This file is part of the of the simple cms based on CakePHP 3.
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @package     Community
10
 * @license     MIT
11
 * @copyright   MIT License http://www.opensource.org/licenses/mit-license.php
12
 * @link        https://github.com/CakeCMS/Community".
13
 * @author      Sergey Kalistratov <[email protected]>
14
 */
15
16
namespace Community;
17
18
use Cake\Utility\Text;
19
20
/**
21
 * Class Token
22
 *
23
 * @package Community
24
 */
25
class Token
26
{
27
28
    /**
29
     * Generate user token.
30
     *
31
     * @return string
32
     */
33
    public static function generate()
34
    {
35
        return sha1(Text::uuid());
36
    }
37
}
38