Skip to content

Commit

Permalink
Merge pull request #417 from ergebnis/fix/docblock
Browse files Browse the repository at this point in the history
Fix: DocBlock
  • Loading branch information
ergebnis-bot authored Dec 29, 2020
2 parents 2d12534 + 6112863 commit e2d28f6
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 15 deletions.
5 changes: 4 additions & 1 deletion src/ChainNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
final class ChainNormalizer implements NormalizerInterface
{
/**
* @var NormalizerInterface[]
* @phpstan-var list<NormalizerInterface>
* @psalm-var list<NormalizerInterface>
*
* @var array<int, NormalizerInterface>
*/
private $normalizers;

Expand Down
10 changes: 8 additions & 2 deletions src/Exception/InvalidIndentStyleException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ final class InvalidIndentStyleException extends \InvalidArgumentException implem
private $style = '';

/**
* @var string[]
* @phpstan-var list<string>
* @psalm-var list<string>
*
* @var array<string>
*/
private $allowedStyles = [];

Expand All @@ -45,7 +48,10 @@ public function style(): string
}

/**
* @return string[]
* @phpstan-return list<string>
* @psalm-return list<string>
*
* @return array<int, string>
*/
public function allowedStyles(): array
{
Expand Down
10 changes: 8 additions & 2 deletions src/Exception/NormalizedInvalidAccordingToSchemaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ final class NormalizedInvalidAccordingToSchemaException extends \RuntimeExceptio
private $schemaUri = '';

/**
* @var string[]
* @phpstan-var list<string>
* @psalm-var list<string>
*
* @var array<int, string>
*/
private $errors = [];

Expand All @@ -44,7 +47,10 @@ public function schemaUri(): string
}

/**
* @return string[]
* @phpstan-return list<string>
* @psalm-return list<string>
*
* @return array<int, string>
*/
public function errors(): array
{
Expand Down
10 changes: 8 additions & 2 deletions src/Exception/OriginalInvalidAccordingToSchemaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ final class OriginalInvalidAccordingToSchemaException extends \RuntimeException
private $schemaUri = '';

/**
* @var string[]
* @phpstan-var list<string>
* @psalm-var list<string>
*
* @var array<int, string>
*/
private $errors = [];

Expand All @@ -44,7 +47,10 @@ public function schemaUri(): string
}

/**
* @return string[]
* @phpstan-return list<string>
* @psalm-return list<string>
*
* @return array<int, string>
*/
public function errors(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/SchemaNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private function normalizeObject(\stdClass $data, \stdClass $schema): \stdClass

$normalized = new \stdClass();

/** @var \stdClass[] $objectProperties */
/** @var array<string, \stdClass> $objectProperties */
$objectProperties = \array_intersect_key(
\get_object_vars($schema->properties),
\get_object_vars($data)
Expand Down
10 changes: 8 additions & 2 deletions src/Validator/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
final class Result
{
/**
* @var string[]
* @phpstan-var list<string>
* @psalm-var list<string>
*
* @var array<int, string>
*/
private $errors;

Expand All @@ -36,7 +39,10 @@ public function isValid(): bool
}

/**
* @return string[]
* @phpstan-return list<string>
* @psalm-return list<string>
*
* @return array<int, string>
*/
public function errors(): array
{
Expand Down
5 changes: 4 additions & 1 deletion src/Vendor/Composer/ConfigHashNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
final class ConfigHashNormalizer implements NormalizerInterface
{
/**
* @var string[]
* @phpstan-var list<string>
* @psalm-var list<string>
*
* @var array<int, string>
*/
private static $properties = [
'config',
Expand Down
5 changes: 4 additions & 1 deletion src/Vendor/Composer/PackageHashNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>
* @psalm-var list<string>
*
* @var array<int, string>
*/
private static $properties = [
'conflict',
Expand Down
9 changes: 6 additions & 3 deletions src/Vendor/Composer/VersionConstraintNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
final class VersionConstraintNormalizer implements NormalizerInterface
{
/**
* @var string[]
* @phpstan-var list<string>
* @psalm-var list<string>
*
* @var array<int, string>
*/
private static $properties = [
'conflict',
Expand All @@ -30,7 +33,7 @@ final class VersionConstraintNormalizer implements NormalizerInterface
];

/**
* @var array<string, array<string>>
* @var array<string, array{0: string, 1: string}>
*/
private static $map = [
'and' => [
Expand Down Expand Up @@ -87,7 +90,7 @@ private static function normalizeVersionConstraint(string $versionConstraint): s
$normalized = $versionConstraint;

foreach (self::$map as [$pattern, $glue]) {
/** @var string[] $split */
/** @var array<int, string> $split */
$split = \preg_split(
$pattern,
$normalized
Expand Down

0 comments on commit e2d28f6

Please sign in to comment.