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
Branch dev (ec2832)
by t
03:09
created

OMAT   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A odd() 0 8 2
1
<?php
2
/**
3
 * Trait MathAndTrigonometry-O
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-O
13
 */
14
trait OMAT
15
{
16
    /**
17
     * 返回数字向上舍入到的最接近的奇数
18
     *
19
     * @param double $number 必需。 要舍入的值
20
     *
21
     * @return integer
22
     */
23 1
    public static function odd($number)
24
    {
25 1
        $sign = self::sign($number);
26 1
        $number = ceil(self::abs($number));
27 1
        if ($number % 2 == 0) {
28 1
            $number += 1;
29
        }
30 1
        return (int) ($sign * $number);
31
    }
32
}
33