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

EMAT   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
ccs 0
cts 7
cp 0
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A even() 0 7 2
A exp() 0 3 1
1
<?php
2
/**
3
 * Trait MathAndTrigonometry-E
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-E
13
 */
14
trait EMAT
15
{
16
    /**
17
     * 返回数字向上舍入到的最接近的偶数
18
     *
19
     * @param double $number 必需。 要舍入的值
20
     *
21
     * @return integer
22
     */
23
    public static function even($number)
24
    {
25
        $number = ceil($number);
26
        if ($number % 2 == 1) {
27
            $number += 1;
28
        }
29
        return (int) $number;
30
    }
31
32
    /**
33
     * 返回 e 的 n 次幂。 常数 e 等于 2.71828182845904,是自然对数的底数
34
     *
35
     * @param integer $number
36
     *
37
     * @return double
38
     */
39
    public static function exp($number)
40
    {
41
        return exp($number);
42
    }
43
}
44