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 ( 25b080...c43051 )
by Matthew
02:10
created

MappedEnvTrait   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __isset() 0 4 1
A __get() 0 10 3
1
<?php
2
3
namespace Sphpeme\Env;
4
5
6
trait MappedEnvTrait
7
{
8 1
    public function __isset($prop): bool
9
    {
10 1
        return (bool)$this->__get($prop);
11
    }
12
13 2
    public function __get(string $prop)
14
    {
15 2
        if (isset(static::MAPPING[$prop])) {
16 2
            return $this->__get(static::MAPPING[$prop]);
17
        }
18
19 2
        return \is_callable([$this, $prop])
20 2
            ? [$this, $prop]
21 2
            : $this->$prop;
22
    }
23
}