diff --git a/src/ChainNormalizer.php b/src/ChainNormalizer.php index 0cf06ec0..86966c50 100644 --- a/src/ChainNormalizer.php +++ b/src/ChainNormalizer.php @@ -16,7 +16,10 @@ final class ChainNormalizer implements NormalizerInterface { /** - * @var NormalizerInterface[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private $normalizers; diff --git a/src/Exception/InvalidIndentStyleException.php b/src/Exception/InvalidIndentStyleException.php index 12bab4a3..1368b85d 100644 --- a/src/Exception/InvalidIndentStyleException.php +++ b/src/Exception/InvalidIndentStyleException.php @@ -21,7 +21,10 @@ final class InvalidIndentStyleException extends \InvalidArgumentException implem private $style = ''; /** - * @var string[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private $allowedStyles = []; @@ -45,7 +48,10 @@ public function style(): string } /** - * @return string[] + * @phpstan-return list + * @psalm-return list + * + * @return array */ public function allowedStyles(): array { diff --git a/src/Exception/NormalizedInvalidAccordingToSchemaException.php b/src/Exception/NormalizedInvalidAccordingToSchemaException.php index 948b529d..54d154b0 100644 --- a/src/Exception/NormalizedInvalidAccordingToSchemaException.php +++ b/src/Exception/NormalizedInvalidAccordingToSchemaException.php @@ -21,7 +21,10 @@ final class NormalizedInvalidAccordingToSchemaException extends \RuntimeExceptio private $schemaUri = ''; /** - * @var string[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private $errors = []; @@ -44,7 +47,10 @@ public function schemaUri(): string } /** - * @return string[] + * @phpstan-return list + * @psalm-return list + * + * @return array */ public function errors(): array { diff --git a/src/Exception/OriginalInvalidAccordingToSchemaException.php b/src/Exception/OriginalInvalidAccordingToSchemaException.php index 5bb827b9..88ec2a31 100644 --- a/src/Exception/OriginalInvalidAccordingToSchemaException.php +++ b/src/Exception/OriginalInvalidAccordingToSchemaException.php @@ -21,7 +21,10 @@ final class OriginalInvalidAccordingToSchemaException extends \RuntimeException private $schemaUri = ''; /** - * @var string[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private $errors = []; @@ -44,7 +47,10 @@ public function schemaUri(): string } /** - * @return string[] + * @phpstan-return list + * @psalm-return list + * + * @return array */ public function errors(): array { diff --git a/src/SchemaNormalizer.php b/src/SchemaNormalizer.php index 3b294c62..16dd094b 100644 --- a/src/SchemaNormalizer.php +++ b/src/SchemaNormalizer.php @@ -186,7 +186,7 @@ private function normalizeObject(\stdClass $data, \stdClass $schema): \stdClass $normalized = new \stdClass(); - /** @var \stdClass[] $objectProperties */ + /** @var array $objectProperties */ $objectProperties = \array_intersect_key( \get_object_vars($schema->properties), \get_object_vars($data) diff --git a/src/Validator/Result.php b/src/Validator/Result.php index 154dfd5e..14c3aa45 100644 --- a/src/Validator/Result.php +++ b/src/Validator/Result.php @@ -16,7 +16,10 @@ final class Result { /** - * @var string[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private $errors; @@ -36,7 +39,10 @@ public function isValid(): bool } /** - * @return string[] + * @phpstan-return list + * @psalm-return list + * + * @return array */ public function errors(): array { diff --git a/src/Vendor/Composer/ConfigHashNormalizer.php b/src/Vendor/Composer/ConfigHashNormalizer.php index 9eb6d043..d2b018f7 100644 --- a/src/Vendor/Composer/ConfigHashNormalizer.php +++ b/src/Vendor/Composer/ConfigHashNormalizer.php @@ -19,7 +19,10 @@ final class ConfigHashNormalizer implements NormalizerInterface { /** - * @var string[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private static $properties = [ 'config', diff --git a/src/Vendor/Composer/PackageHashNormalizer.php b/src/Vendor/Composer/PackageHashNormalizer.php index 727cc2ca..0df2b62d 100644 --- a/src/Vendor/Composer/PackageHashNormalizer.php +++ b/src/Vendor/Composer/PackageHashNormalizer.php @@ -24,7 +24,10 @@ final class PackageHashNormalizer implements NormalizerInterface private const PLATFORM_PACKAGE_REGEX = '{^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[^/ ]+)$}i'; /** - * @var string[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private static $properties = [ 'conflict', diff --git a/src/Vendor/Composer/VersionConstraintNormalizer.php b/src/Vendor/Composer/VersionConstraintNormalizer.php index 758b0e0a..6d79fc5a 100644 --- a/src/Vendor/Composer/VersionConstraintNormalizer.php +++ b/src/Vendor/Composer/VersionConstraintNormalizer.php @@ -19,7 +19,10 @@ final class VersionConstraintNormalizer implements NormalizerInterface { /** - * @var string[] + * @phpstan-var list + * @psalm-var list + * + * @var array */ private static $properties = [ 'conflict', @@ -30,7 +33,7 @@ final class VersionConstraintNormalizer implements NormalizerInterface ]; /** - * @var array> + * @var array */ private static $map = [ 'and' => [ @@ -87,7 +90,7 @@ private static function normalizeVersionConstraint(string $versionConstraint): s $normalized = $versionConstraint; foreach (self::$map as [$pattern, $glue]) { - /** @var string[] $split */ + /** @var array $split */ $split = \preg_split( $pattern, $normalized