Added implied mixed return type to ResolverInterface::retrieveValue

This commit is contained in:
Chris Lightfoot-Wild 2025-07-16 23:39:30 +01:00
parent df8d847e64
commit 98b978603d
No known key found for this signature in database
4 changed files with 4 additions and 11 deletions

View File

@ -24,11 +24,7 @@ class EnvironmentResolver implements ResolverInterface
return !Configuration::isEmpty($env);
}
/**
* @psalm-suppress InvalidReturnStatement
* @psalm-suppress InvalidReturnType
*/
public function retrieveValue(string $variableName)
public function retrieveValue(string $variableName): mixed
{
$value = getenv($variableName);
if ($value === false) {

View File

@ -16,7 +16,7 @@ class PhpIniResolver implements ResolverInterface
{
}
public function retrieveValue(string $variableName)
public function retrieveValue(string $variableName): mixed
{
$value = $this->accessor->get($variableName) ?: '';
if (is_array($value)) {

View File

@ -6,10 +6,7 @@ namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
interface ResolverInterface
{
/**
* @return mixed
*/
public function retrieveValue(string $variableName);
public function retrieveValue(string $variableName): mixed;
public function hasVariable(string $variableName): bool;
}

View File

@ -36,7 +36,7 @@ class SdkConfigurationResolver implements ResolverInterface
$this->reader = new EnvSourceReader($envSources);
}
public function retrieveValue(string $variableName)
public function retrieveValue(string $variableName): mixed
{
return $this->reader->read($variableName);
}