1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace AtlassianConnectBundle\Tests\Security; |
||
6 | |||
7 | use AtlassianConnectBundle\Entity\TenantInterface; |
||
8 | use Symfony\Component\Security\Core\Role\Role; |
||
9 | |||
10 | class StubbedTenant implements TenantInterface |
||
11 | { |
||
12 | /** |
||
13 | * @return array<string>|array<Role> |
||
14 | */ |
||
15 | public function getRoles(): array |
||
16 | { |
||
17 | return ['ROLE_USER']; |
||
18 | } |
||
19 | |||
20 | public function getSharedSecret(): ?string |
||
21 | { |
||
22 | } |
||
23 | |||
24 | public function getOauthClientId(): ?string |
||
25 | { |
||
26 | } |
||
27 | |||
28 | public function getBaseUrl(): ?string |
||
29 | { |
||
30 | } |
||
31 | |||
32 | public function getAddonKey(): ?string |
||
33 | { |
||
34 | } |
||
35 | |||
36 | public function setUsername(string $name): TenantInterface |
||
37 | { |
||
38 | } |
||
0 ignored issues
–
show
|
|||
39 | |||
40 | public function setAddonKey(string $addonKey): TenantInterface |
||
41 | { |
||
42 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
43 | |||
44 | public function setClientKey(string $clientKey): TenantInterface |
||
45 | { |
||
46 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
47 | |||
48 | public function setPublicKey(string $publicKey): TenantInterface |
||
49 | { |
||
50 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
51 | |||
52 | public function setSharedSecret(string $sharedSecret): TenantInterface |
||
53 | { |
||
54 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
55 | |||
56 | public function setServerVersion(string $serverVersion): TenantInterface |
||
57 | { |
||
58 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
59 | |||
60 | public function setPluginsVersion(string $pluginsVersion): TenantInterface |
||
61 | { |
||
62 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
63 | |||
64 | public function setBaseUrl(string $baseUrl): TenantInterface |
||
65 | { |
||
66 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
67 | |||
68 | public function setProductType(string $productType): TenantInterface |
||
69 | { |
||
70 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
71 | |||
72 | public function setDescription(string $description): TenantInterface |
||
73 | { |
||
74 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
75 | |||
76 | public function setEventType(string $eventType): TenantInterface |
||
77 | { |
||
78 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
79 | |||
80 | public function setOauthClientId(?string $oauthClientId): TenantInterface |
||
81 | { |
||
82 | } |
||
0 ignored issues
–
show
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
}
}
![]() |
|||
83 | |||
84 | /** |
||
85 | * @return string|void |
||
86 | */ |
||
87 | public function getPassword(): ?string |
||
88 | { |
||
89 | } |
||
90 | |||
91 | public function getSalt(): ?string |
||
92 | { |
||
93 | } |
||
94 | |||
95 | public function getUsername(): ?string |
||
96 | { |
||
97 | } |
||
98 | |||
99 | public function getUserIdentifier(): string |
||
100 | { |
||
101 | return 'tenant'; |
||
102 | } |
||
103 | |||
104 | public function eraseCredentials(): void |
||
105 | { |
||
106 | } |
||
107 | |||
108 | public function getClientKey(): ?string |
||
109 | { |
||
110 | } |
||
111 | |||
112 | public function isWhiteListed(): bool |
||
113 | { |
||
114 | } |
||
0 ignored issues
–
show
In this branch, the function will implicitly return
null which is incompatible with the type-hinted return boolean . 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
}
}
![]() |
|||
115 | } |
||
116 |
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: