Solve newly detected psalm issues, updating baseline
MODIFY
psalm-baseline.xml
psalm-baseline.xml
<?xml version="1.0" encoding="UTF-8"?>
-<files psalm-version="4.23.0@f1fe6ff483bf325c803df9f510d09a03fd796f88">
+<files psalm-version="4.24.0@06dd975cb55d36af80f242561738f16c5f58264f">
<file src="bin/update_hostname_validator.php">
<MissingClosureParamType occurrences="2">
<code>$domain</code>
<code>$this-&gt;type</code>
<code>$this-&gt;type</code>
</MixedArgument>
- <MixedAssignment occurrences="2">
- <code>$mime</code>
+ <MixedAssignment occurrences="1">
<code>$this-&gt;type</code>
</MixedAssignment>
<MoreSpecificImplementedParamType occurrences="1">
<code>$value</code>
</MoreSpecificImplementedParamType>
- <PossiblyInvalidArgument occurrences="1">
- <code>$mimetype</code>
- </PossiblyInvalidArgument>
- <PossiblyInvalidIterator occurrences="1">
- <code>$mimetype</code>
- </PossiblyInvalidIterator>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>null</code>
</PossiblyNullPropertyAssignmentValue>
<code>static::NOT_DETECTED</code>
<code>static::NOT_READABLE</code>
</MixedArgument>
- <MixedArgumentTypeCoercion occurrences="1">
- <code>$mimetypes</code>
- </MixedArgumentTypeCoercion>
- <MixedAssignment occurrences="4">
+ <MixedAssignment occurrences="2">
<code>$file</code>
- <code>$mime</code>
- <code>$mt</code>
<code>$this-&gt;type</code>
</MixedAssignment>
<MixedInferredReturnType occurrences="3">
<MoreSpecificImplementedParamType occurrences="1">
<code>$value</code>
</MoreSpecificImplementedParamType>
- <PossiblyInvalidArgument occurrences="3">
- <code>$mimetype</code>
- <code>$mimetypes</code>
+ <PossiblyInvalidArgument occurrences="1">
<code>$options</code>
</PossiblyInvalidArgument>
- <PossiblyInvalidIterator occurrences="1">
- <code>$mimetype</code>
- </PossiblyInvalidIterator>
<PossiblyNullPropertyAssignmentValue occurrences="2">
<code>null</code>
<code>null</code>
<code>$finfo</code>
<code>$type</code>
</PropertyNotSetInConstructor>
- <RedundantCastGivenDocblockType occurrences="3">
- <code>(bool) $asArray</code>
+ <RedundantCastGivenDocblockType occurrences="2">
<code>(bool) $disable</code>
<code>(bool) $headerCheck</code>
</RedundantCastGivenDocblockType>
<InvalidArgument occurrences="1">
<code>1</code>
</InvalidArgument>
- <InvalidScalarArgument occurrences="1">
- <code>123</code>
- </InvalidScalarArgument>
<NullArgument occurrences="1">
<code>null</code>
</NullArgument>
<ArgumentTypeCoercion occurrences="1">
<code>$classOrInstance</code>
</ArgumentTypeCoercion>
- <InvalidArgument occurrences="2">
- <code>$this-&gt;httpClient</code>
- <code>$this-&gt;httpRequest</code>
- </InvalidArgument>
- <InvalidPropertyAssignmentValue occurrences="3"/>
+ <InvalidPropertyAssignmentValue occurrences="1"/>
<MixedArgument occurrences="2"/>
<MixedInferredReturnType occurrences="2">
<code>array</code>

MODIFY
src/ConfigProvider.php
src/ConfigProvider.php
@@ -28,7 +28,7 @@ class ConfigProvider
'ValidatorManager' => ValidatorPluginManager::class,
// Legacy Zend Framework aliases
- \Zend\Validator\ValidatorPluginManager::class => ValidatorPluginManager::class,
+ 'Zend\Validator\ValidatorPluginManager' => ValidatorPluginManager::class,
],
'factories' => [
ValidatorPluginManager::class => ValidatorPluginManagerFactory::class,

MODIFY
src/File/MimeType.php
src/File/MimeType.php
@@ -276,6 +276,7 @@ class MimeType extends AbstractValidator
*
* @param bool $asArray Returns the values as array, when false a concatenated string is returned
* @return string|array
+ * @psalm-return ($asArray is true ? list<string> : string)
*/
public function getMimeType($asArray = false)
{

Solve newly detected psalm issues, updating baseline

Signed-off-by: George Steel <george@net-glue.co.uk>