Str   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 11
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A random() 0 4 1
A uFirst() 0 3 1
1
<?php
2
namespace tinymeng\uploads\Helper;
3
4
class Str
5
{
6
    public static function uFirst($str)
7
    {
8
        return ucfirst(strtolower($str));
9
    }
10
11
    public static function random($length = 16)
12
    {
13
        $str_pol = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz";
14
        return substr(str_shuffle($str_pol), 0, $length);
15
    }
16
17
}
18