Passed
Push — master ( c38baa...79425f )
by Bukashk0zzz
57s queued 11s
created

StubbedTenant::setBaseUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types = 1);
2
3
namespace AtlassianConnectBundle\Tests\Security;
4
5
use AtlassianConnectBundle\Entity\TenantInterface;
6
use Symfony\Component\Security\Core\Role\Role;
7
8
/**
9
 * Class StubbedTenant
10
 */
11
class StubbedTenant implements TenantInterface
12
{
13
    /**
14
     * @return string[]|Role[]
15
     */
16
    public function getRoles(): array
17
    {
18
        return ['ROLE_USER'];
19
    }
20
21
    /**
22
     * @return string|null
23
     */
24
    public function getSharedSecret(): ?string
25
    {
26
    }
27
28
    /**
29
     * @return string|null
30
     */
31
    public function getOauthClientId(): ?string
32
    {
33
    }
34
35
    /**
36
     * @return string|null
37
     */
38
    public function getBaseUrl(): ?string
39
    {
40
    }
41
42
    /**
43
     * @return string|null
44
     */
45
    public function getAddonKey(): ?string
46
    {
47
    }
48
49
    /**
50
     * @param string $name
51
     * @return TenantInterface
52
     */
53
    public function setUsername(string $name): TenantInterface
54
    {
55
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
56
57
    /**
58
     * @param string $addonKey
59
     * @return TenantInterface
60
     */
61
    public function setAddonKey(string $addonKey): TenantInterface
62
    {
63
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
64
65
    /**
66
     * @param string $clientKey
67
     * @return TenantInterface
68
     */
69
    public function setClientKey(string $clientKey): TenantInterface
70
    {
71
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
72
73
    /**
74
     * @param string $publicKey
75
     * @return TenantInterface
76
     */
77
    public function setPublicKey(string $publicKey): TenantInterface
78
    {
79
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
80
81
    /**
82
     * @param string $sharedSecret
83
     * @return TenantInterface
84
     */
85
    public function setSharedSecret(string $sharedSecret): TenantInterface
86
    {
87
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
88
89
    /**
90
     * @param string $serverVersion
91
     * @return TenantInterface
92
     */
93
    public function setServerVersion(string $serverVersion): TenantInterface
94
    {
95
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
96
97
    /**
98
     * @param string $pluginsVersion
99
     * @return TenantInterface
100
     */
101
    public function setPluginsVersion(string $pluginsVersion): TenantInterface
102
    {
103
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
104
105
    /**
106
     * @param string $baseUrl
107
     * @return TenantInterface
108
     */
109
    public function setBaseUrl(string $baseUrl): TenantInterface
110
    {
111
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
112
113
    /**
114
     * @param string $productType
115
     * @return TenantInterface
116
     */
117
    public function setProductType(string $productType): TenantInterface
118
    {
119
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
120
121
    /**
122
     * @param string $description
123
     * @return TenantInterface
124
     */
125
    public function setDescription(string $description): TenantInterface
126
    {
127
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
128
129
    /**
130
     * @param string $eventType
131
     * @return TenantInterface
132
     */
133
    public function setEventType(string $eventType): TenantInterface
134
    {
135
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
136
137
    /**
138
     * @param string|null $oauthClientId
139
     * @return TenantInterface
140
     */
141
    public function setOauthClientId(?string $oauthClientId): TenantInterface
142
    {
143
    }
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 AtlassianConnectBundle\Entity\TenantInterface. 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...
144
145
    /**
146
     * @return string|void
147
     */
148
    public function getPassword(): ?string
149
    {
150
    }
151
152
    /**
153
     * @return string|null
154
     */
155
    public function getSalt(): ?string
156
    {
157
    }
158
159
    /**
160
     * @return string|null
161
     */
162
    public function getUsername(): ?string
163
    {
164
    }
165
166
    /**
167
     * @return void
168
     */
169
    public function eraseCredentials(): void
170
    {
171
    }
172
}
173