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.

Symbol   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 30
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A make() 0 10 2
A __construct() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Sphpeme;
4
5
6
class Symbol
0 ignored issues
show
Coding Style introduced by
Since you have declared the constructor as private, maybe you should also declare the class as final.
Loading history...
7
{
8
    /** @var string */
9
    private $value;
10
11
    /** @var array */
12
    public static $table = [];
13
14 25
    public static function make($sym): self
15
    {
16 25
        if (isset(static::$table[$sym])) {
17 23
            return static::$table[$sym];
18
        }
19
20 11
        static::$table[$sym] = new static($sym);
21
22 11
        return static::$table[$sym];
23
    }
24
25 11
    private function __construct($value)
26
    {
27 11
        $this->value = $value;
28 11
    }
29
30 3
    public function __toString()
31
    {
32 3
        return $this->value;
33
    }
34
35
}