Skip to content

Commit 42919fd

Browse files
fix: declaration for provider name (#105)
Signed-off-by: Alex Podgorbunschih <[email protected]>
1 parent 0fe5173 commit 42919fd

File tree

6 files changed

+6
-3
lines changed

6 files changed

+6
-3
lines changed

providers/CloudBees/src/CloudBeesProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class CloudBeesProvider extends AbstractProvider implements Provider
2828
{
29-
protected const NAME = 'CloudBeesProvider';
29+
protected static string $NAME = 'CloudBeesProvider';
3030

3131
private static ?CloudBeesProvider $instance = null;
3232

providers/CloudBees/tests/integration/CloudBeesProviderTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function testCanBeInstantiated(): void
4242
$this->assertNotNull($instance);
4343
$this->assertInstanceOf(CloudBeesProvider::class, $instance);
4444
$this->assertInstanceOf(Provider::class, $instance);
45+
$this->assertEquals('CloudBeesProvider', $instance->getMetadata()->getName());
4546
}
4647

4748
public function testCanResolveBool(): void

providers/Flagd/src/FlagdProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class FlagdProvider extends AbstractProvider implements Provider
1818
{
19-
protected const NAME = 'FlagdProvider';
19+
protected static string $NAME = 'FlagdProvider';
2020

2121
private IConfig $config;
2222

providers/Flagd/tests/unit/FlagdProviderTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function testCanBeInstantiated(): void
3535
// Then
3636
$this->assertNotNull($instance);
3737
$this->assertInstanceOf(Provider::class, $instance);
38+
$this->assertEquals('FlagdProvider', $instance->getMetadata()->getName());
3839
}
3940

4041
public function testCanInstantiateHttpWithConfigObject(): void

providers/Split/src/SplitProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
class SplitProvider extends AbstractProvider implements Provider
3333
{
34-
protected const NAME = 'SplitProvider';
34+
protected static string $NAME = 'SplitProvider';
3535

3636
/**
3737
* The Split factory will only be created one time

providers/Split/tests/unit/SplitProviderTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function testCanBeInstantiated(): void
2727
// Then
2828
$this->assertNotNull($instance);
2929
$this->assertInstanceOf(Provider::class, $instance);
30+
$this->assertEquals('SplitProvider', $instance->getMetadata()->getName());
3031
}
3132

3233
private function getPathToValidSplitFile(): string

0 commit comments

Comments
 (0)