GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

StringUtils   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A random() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
namespace JonnyW\PhantomJs;
10
11
/**
12
 * PHP PhantomJs
13
 *
14
 * @author Jon Wenmoth <[email protected]>
15
 */
16
final class StringUtils
17
{
18
    /**
19
     * Generate random string
20
     *
21
     * @static
22
     * @access public
23
     * @param  int    $length (default: 20)
24
     * @return string
25
     */
26 52
    public static function random($length = 20)
27
    {
28 52
        return substr(md5(mt_rand()), 0, $length);
29
    }
30
}
31