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.
Completed
Push — master ( 6fcb7a...fcde01 )
by t
06:59 queued 04:42
created

BMAT::base()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 2
nop 3
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 2
rs 10
1
<?php
2
/**
3
 * Trait MathAndTrigonometry-B
4
 *
5
 * @link https://www.icy2003.com/
6
 * @author icy2003 <[email protected]>
7
 * @copyright Copyright (c) 2017, icy2003
8
 */
9
namespace icy2003\php\icomponents\excel\mathAndTrigonometry;
10
11
/**
12
 * MathAndTrigonometry-B
13
 */
14
trait BMAT
15
{
16
    /**
17
     * 将数字转换为具备给定基数的文本表示
18
     *
19
     * @param string $number 必需。 要转换的数字。 必须是大于或等于0且小于 2 ^ 53 的整数
20
     * @param integer $base 必需。 要将数字转换为的基础基数。 必须是大于或等于2且小于或等于36的整数
21
     * @param integer $minLength 可选。 返回的字符串的最小长度。 必须是大于或等于0的整数
22
     *
23
     * @return string
24
     */
25 1
    public static function base($number, $base, $minLength = null)
26
    {
27 1
        $string = base_convert($number, 10, $base);
28 1
        if (null === $minLength) {
29 1
            return $string;
30
        } else {
31 1
            return str_pad($string, $minLength, '0', STR_PAD_LEFT);
32
        }
33
    }
34
}
35