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
Push — master ( 4b3d26...06dcf5 )
by Enjoys
12:36 queued 13s
created

EnvLine   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 6
c 2
b 0
f 1
dl 0
loc 26
ccs 10
cts 10
cp 1
rs 10
wmc 6

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A getComment() 0 3 1
A getKey() 0 3 1
A __construct() 0 2 1
A __toString() 0 5 2
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace Enjoys\Dotenv\Parser\Lines;
7
8
9
use Enjoys\Dotenv\Parser\Env\Comment;
10
use Enjoys\Dotenv\Parser\Env\Key;
11
use Enjoys\Dotenv\Parser\Env\Value;
12
13
final class EnvLine implements LineInterface
14
{
15 52
    public function __construct(private Key $key, private ?Value $value = null, private ?Comment $comment = null)
16
    {
17
    }
18
19 10
    public function __toString(): string
20
    {
21 10
        $format = ($this->value === null) ? '%s%s%s' : '%s=%s%s';
22
        /** @psalm-suppress  ImplicitToStringCast, PossiblyNullArgument */
23 10
        return sprintf($format, $this->key, $this->value, $this->comment);
24
    }
25
26 43
    public function getKey(): Key
27
    {
28 43
        return $this->key;
29
    }
30
31 42
    public function getValue(): ?Value
32
    {
33 42
        return $this->value;
34
    }
35
36 1
    public function getComment(): ?Comment
37
    {
38 1
        return $this->comment;
39
    }
40
}
41