Passed
Pull Request — master (#47)
by Sander
08:09
created

MemoryConfigSource::removeRepository()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
4
declare(strict_types=1);
5
6
/*
7
 * This file is part of the composer-link plugin.
8
 *
9
 * Copyright (c) 2021-2022 Sander Visser <[email protected]>.
10
 *
11
 * For the full copyright and license information, please view the LICENSE.md
12
 * file that was distributed with this source code.
13
 *
14
 * @link https://github.com/SanderSander/composer-link
15
 */
16
17
namespace ComposerLink\Config;
18
19
use Composer\Config\ConfigSourceInterface;
20
21
class MemoryConfigSource implements ConfigSourceInterface
22
{
23
    public function addRepository(string $name, $config, bool $append = true): void
24
    {
25
        // TODO: Implement addRepository() method.
26
    }
27
28
    public function removeRepository(string $name): void
29
    {
30
        // TODO: Implement removeRepository() method.
31
    }
32
33
    public function addConfigSetting(string $name, $value): void
34
    {
35
        // TODO: Implement addConfigSetting() method.
36
    }
37
38
    public function removeConfigSetting(string $name): void
39
    {
40
        // TODO: Implement removeConfigSetting() method.
41
    }
42
43
    public function addProperty(string $name, $value): void
44
    {
45
        // TODO: Implement addProperty() method.
46
    }
47
48
    public function removeProperty(string $name): void
49
    {
50
        // TODO: Implement removeProperty() method.
51
    }
52
53
    public function addLink(string $type, string $name, string $value): void
54
    {
55
        // TODO: Implement addLink() method.
56
    }
57
58
    public function removeLink(string $type, string $name): void
59
    {
60
        // TODO: Implement removeLink() method.
61
    }
62
63
    public function getName(): string
64
    {
65
        // TODO: Implement getName() method.
66
    }
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return string. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
67
}