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.

Hook   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 34
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A listen() 0 8 2
A getTags() 0 4 1
1
<?php
2
/**
3
 * Kotori.php
4
 *
5
 * A Tiny Model-View-Controller PHP Framework
6
 *
7
 * This content is released under the Apache 2 License
8
 *
9
 * Copyright (c) 2015-2017 Kotori Technology. All rights reserved.
10
 *
11
 * Licensed under the Apache License, Version 2.0 (the "License");
12
 * you may not use this file except in compliance with the License.
13
 * You may obtain a copy of the License at
14
 *
15
 *     http://www.apache.org/licenses/LICENSE-2.0
16
 *
17
 * Unless required by applicable law or agreed to in writing, software
18
 * distributed under the License is distributed on an "AS IS" BASIS,
19
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
 * See the License for the specific language governing permissions and
21
 * limitations under the License.
22
 */
23
24
/**
25
 * Hook Class
26
 *
27
 * @package     Kotori
28
 * @subpackage  Debug
29
 * @author      Kokororin
30
 * @link        https://kotori.love
31
 */
32
namespace Kotori\Debug;
33
34
abstract class Hook
35
{
36
    /**
37
     * Hook tags
38
     *
39
     * @var array
40
     */
41
    protected static $tags = [];
42
43
    /**
44
     * Get the tags
45
     *
46
     * @return array
47
     */
48 1
    public static function getTags()
49
    {
50 1
        return self::$tags;
51
    }
52
53
    /**
54
     * Start Hook listen
55
     *
56
     * @param  string $name
57
     * @return int
58
     */
59 10
    public static function listen($name)
60
    {
61 10
        if (!isset(self::$tags[$name])) {
62 5
            self::$tags[$name] = round((microtime(true) - KOTORI_START_TIME) * pow(10, 6));
63
        }
64
65 10
        return self::$tags[$name];
66
    }
67
}
68