Fix psalm regressions.
This commit is contained in:
parent
7981956060
commit
ac81542f5f
|
|
@ -17,6 +17,7 @@ use Symfony\Component\Dotenv\Exception\PathException;
|
|||
final class SymfonyDotenvProvider implements EnvSourceProvider
|
||||
{
|
||||
/** @psalm-suppress UndefinedClass */
|
||||
#[\Override]
|
||||
public function getEnvSource(): EnvSource
|
||||
{
|
||||
$installPath = InstalledVersions::getRootPackage()['install_path'];
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSourceProvider;
|
|||
final class VlucasPhpdotenvProvider implements EnvSourceProvider
|
||||
{
|
||||
/** @psalm-suppress UndefinedClass */
|
||||
#[\Override]
|
||||
public function getEnvSource(): EnvSource
|
||||
{
|
||||
$backup = [$_SERVER, $_ENV];
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ final class LazyEnvSource implements EnvSource
|
|||
) {
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function readRaw(string $name): mixed
|
||||
{
|
||||
if (!$this->env instanceof EnvSource) {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class EnvironmentResolver implements ResolverInterface
|
|||
return !Configuration::isEmpty($env);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function retrieveValue(string $variableName): mixed
|
||||
{
|
||||
$value = getenv($variableName);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class PhpIniResolver implements ResolverInterface
|
|||
return $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function hasVariable(string $variableName): bool
|
||||
{
|
||||
$value = $this->accessor->get($variableName);
|
||||
|
|
|
|||
|
|
@ -36,11 +36,13 @@ class SdkConfigurationResolver implements ResolverInterface
|
|||
$this->reader = new EnvSourceReader($envSources);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function retrieveValue(string $variableName): mixed
|
||||
{
|
||||
return $this->reader->read($variableName);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function hasVariable(string $variableName): bool
|
||||
{
|
||||
return !Configuration::isEmpty($this->reader->read($variableName));
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSourceProvider;
|
|||
|
||||
class TestEnvSourceProvider implements EnvSourceProvider
|
||||
{
|
||||
#[\Override]
|
||||
public function getEnvSource(): EnvSource
|
||||
{
|
||||
return new ArrayEnvSource([
|
||||
|
|
|
|||
Loading…
Reference in New Issue