Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/implementation/provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class AbstractProvider implements Provider

public function getMetadata(): MetadataInterface
{
return new Metadata(self::$NAME);
return new Metadata(static::$NAME);
}

abstract public function resolveBooleanValue(string $flagKey, bool $defaultValue, ?EvaluationContext $context = null): ResolutionDetailsInterface;
Expand Down
13 changes: 3 additions & 10 deletions tests/TestProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@

namespace OpenFeature\Test;

use OpenFeature\implementation\common\Metadata;
use OpenFeature\implementation\provider\AbstractProvider;
use OpenFeature\implementation\provider\ResolutionDetailsFactory;
use OpenFeature\interfaces\common\Metadata as MetadataInterface;
use OpenFeature\interfaces\flags\EvaluationContext;
use OpenFeature\interfaces\hooks\HooksAwareTrait;
use OpenFeature\interfaces\provider\Provider;
use OpenFeature\interfaces\provider\ResolutionDetails;
use Psr\Log\LoggerAwareTrait;

class TestProvider implements Provider
class TestProvider extends AbstractProvider
{
use HooksAwareTrait;
use LoggerAwareTrait;

public const NAME = 'TestProvider';

public function getMetadata(): MetadataInterface
{
return new Metadata(self::NAME);
}
protected static string $NAME = 'TestProvider';

/**
* Resolves the flag value for the provided flag key as a boolean
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/HooksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public function testEvaluationContextIsImmutableInAfterHooks(): void
[$mutationHook],
new HookHints(),
);
// @phpstan-ignore-next-line
$this->assertNull($additionalEvaluationContext);
}

Expand Down Expand Up @@ -175,7 +174,6 @@ public function testEvaluationContextIsImmutableInErrorHooks(): void
new HookHints(),
);

//@phpstan-ignore-next-line
$this->assertNull($additionalEvaluationContext);
}

Expand Down Expand Up @@ -206,7 +204,6 @@ public function testEvaluationContextIsImmutableInFinallyHooks(): void
new HookHints(),
);

// @phpstan-ignore-next-line
$this->assertNull($additionalEvaluationContext);
}

Expand Down