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
Pull Request — master (#18)
by t
04:52 queued 01:14
created

OMAT::odd()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
ccs 0
cts 5
cp 0
crap 6
rs 10
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
    public static function odd($number)
24
    {
25
        $number = ceil($number);
26
        if ($number % 2 == 0) {
27
            $number += 1;
28
        }
29
        return (int) $number;
30
    }
31
}
32