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 ( 975dad...2d62a5 )
by やかみ
05:10
created

SoulTrait::__clone()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
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
 * Soul trait
26
 *
27
 * @package     Kotori
28
 * @subpackage  Traits
29
 * @author      Kokororin
30
 * @link        https://kotori.love
31
 */
32
namespace Kotori\Traits;
33
34
trait SoulTrait
35
{
36
    /**
37
     * Disable Clone
38
     *
39
     * @return boolean
40
     */
41
    public function __clone()
42
    {
43
        return false;
44
    }
45
46
    /**
47
     * Instance Handle
48
     *
49
     * @var array
50
     */
51
    protected static $_soul;
52
53
    /**
54
     * get singleton
55
     *
56
     * @return object
57
     */
58 5
    public static function getSoul()
59
    {
60 5
        if (self::$_soul === null) {
61 1
            self::$_soul = new self();
0 ignored issues
show
Documentation Bug introduced by
It seems like new self() of type object<Kotori\Traits\SoulTrait> is incompatible with the declared type array of property $_soul.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
62 1
        }
63
64 5
        return self::$_soul;
65
    }
66
67
}
68