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.
Passed
Pull Request — master (#3)
by Matthew
01:43
created

Symbol   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 3 1
A make() 0 9 2
1
<?php
2
3
namespace Sphpeme;
4
5
6
class Symbol
7
{
8
    /** @var string */
9
    private $value;
10
11
    /** @var array */
12
    public static $table = [];
13
14
    public static function make($sym): self
15
    {
16
        if (isset(static::$table[$sym])) {
17
            return static::$table[$sym];
18
        }
19
20
        static::$table[$sym] = new static($sym);
21
22
        return static::$table[$sym];
23
    }
24
25
    private function __construct($value)
26
    {
27
        $this->value = $value;
28
    }
29
30
    public function __toString()
31
    {
32
        return $this->value;
33
    }
34
35
}