Added implied mixed return type to ResolverInterface::retrieveValue
This commit is contained in:
parent
df8d847e64
commit
98b978603d
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue