Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/batch-doctrine-dbal/src/DoctrineDBALJobExecutionStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class DoctrineDBALJobExecutionStorage implements
private JobExecutionRowNormalizer $normalizer;

/**
* @phpstan-param array{connection?: string, table?: string} $options
* @param array{connection?: string, table?: string} $options
*/
public function __construct(ConnectionRegistry $doctrine, array $options)
{
Expand Down Expand Up @@ -153,8 +153,8 @@ public function query(Query $query): iterable
->from($this->table);

/**
* @phpstan-var array<string, mixed> $queryParameters
* @phpstan-var array<string, string|int> $queryTypes
* @var array<string, mixed> $queryParameters
* @var array<string, string|int> $queryTypes
*/
[$queryParameters, $queryTypes] = $this->addWheres($query, $qb);

Expand Down Expand Up @@ -186,8 +186,8 @@ public function count(Query $query): int
->from($this->table);

/**
* @phpstan-var array<string, mixed> $queryParameters
* @phpstan-var array<string, string|int> $queryTypes
* @var array<string, mixed> $queryParameters
* @var array<string, string|int> $queryTypes
*/
[$queryParameters, $queryTypes] = $this->addWheres($query, $qb);

Expand Down Expand Up @@ -226,7 +226,7 @@ private function getSchema(): Schema
}

/**
* @phpstan-return array<string, string>
* @return array<string, string>
*/
private function types(): array
{
Expand All @@ -246,7 +246,7 @@ private function types(): array
}

/**
* @phpstan-return array<string, string>
* @return array<string, string>
*/
private function identity(JobExecution $execution): array
{
Expand All @@ -257,7 +257,7 @@ private function identity(JobExecution $execution): array
}

/**
* @phpstan-return array<string, string>
* @return array<string, string>
* @throws DBALException
*/
private function fetchRow(string $jobName, string $id): array
Expand Down Expand Up @@ -287,10 +287,10 @@ private function fetchRow(string $jobName, string $id): array
}

/**
* @phpstan-param array<string, mixed> $parameters
* @phpstan-param array<string, int|string> $types
* @param array<string, mixed> $parameters
* @param array<string, int|string> $types
*
* @phpstan-return Generator<JobExecution>
* @return Generator<JobExecution>
*/
private function queryList(string $query, array $parameters, array $types): Generator
{
Expand All @@ -305,15 +305,15 @@ private function queryList(string $query, array $parameters, array $types): Gene
}

/**
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
private function toRow(JobExecution $jobExecution): array
{
return $this->getNormalizer()->toRow($jobExecution);
}

/**
* @phpstan-param array<string, mixed> $row
* @param array<string, mixed> $row
*/
private function fromRow(array $row): JobExecution
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct(
}

/**
* @phpstan-return Generator<array<string, string>>
* @return Generator<array<string, string>>
*/
public function read(): Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(ConnectionRegistry $doctrine, string $sql, string $c
}

/**
* @phpstan-return Generator<array<string, string>>
* @return Generator<array<string, string>>
*/
public function read(): Generator
{
Expand Down
8 changes: 4 additions & 4 deletions src/batch-doctrine-dbal/src/DoctrineDBALUpsert.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ final class DoctrineDBALUpsert
public function __construct(
private string $table,
/**
* @phpstan-var array<string, mixed>
* @var array<string, mixed>
*/
private array $data,
/**
* @phpstan-var array<string, mixed>
* @var array<string, mixed>
*/
private array $identity = [],
) {
Expand All @@ -29,15 +29,15 @@ public function getTable(): string
}

/**
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
public function getData(): array
{
return $this->data;
}

/**
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
public function getIdentity(): array
{
Expand Down
18 changes: 9 additions & 9 deletions src/batch-doctrine-dbal/src/JobExecutionRowNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
/**
* Convert a {@see JobExecution} object to a row data array.
*
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
public function toRow(JobExecution $jobExecution): array
{
Expand All @@ -51,7 +51,7 @@ public function toRow(JobExecution $jobExecution): array
/**
* Convert a row data array to a {@see JobExecution} object.
*
* @phpstan-param array<string, mixed> $data
* @param array<string, mixed> $data
*/
public function fromRow(array $data, JobExecution $parent = null): JobExecution
{
Expand Down Expand Up @@ -99,7 +99,7 @@ public function fromRow(array $data, JobExecution $parent = null): JobExecution
}

/**
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
private function toChildRow(JobExecution $jobExecution): array
{
Expand All @@ -117,9 +117,9 @@ private function toChildRow(JobExecution $jobExecution): array
}

/**
* @phpstan-param array<int|string, mixed>|string $value
* @param array<int|string, mixed>|string $value
*
* @phpstan-return array<int|string, mixed>
* @return array<int|string, mixed>
*/
private function jsonFromString(array|string $value): array
{
Expand All @@ -144,7 +144,7 @@ private function dateFromString(?string $date): ?DateTimeImmutable
}

/**
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
private function failureToArray(Failure $failure): array
{
Expand All @@ -158,7 +158,7 @@ private function failureToArray(Failure $failure): array
}

/**
* @phpstan-param array<string, mixed> $array
* @param array<string, mixed> $array
*/
private function failureFromArray(array $array): Failure
{
Expand All @@ -172,7 +172,7 @@ private function failureFromArray(array $array): Failure
}

/**
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
private function warningToArray(Warning $warning): array
{
Expand All @@ -184,7 +184,7 @@ private function warningToArray(Warning $warning): array
}

/**
* @phpstan-param array<string, mixed> $array
* @param array<string, mixed> $array
*/
private function warningFromArray(array $array): Warning
{
Expand Down
4 changes: 2 additions & 2 deletions src/batch-symfony-console/src/CommandRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
/**
* Run a command asynchronously.
*
* @phpstan-param array<string, mixed> $arguments
* @param array<string, mixed> $arguments
*/
public function runAsync(string $commandName, string $logFilename, array $arguments = []): void
{
Expand All @@ -52,7 +52,7 @@ protected function exec(string $command): void
}

/**
* @phpstan-param array<string, mixed> $arguments
* @param array<string, mixed> $arguments
*/
private function buildCommand(string $commandName, array $arguments): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/batch-symfony-console/src/RunJobCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private function outputExecution(JobExecution $jobExecution, OutputInterface $ou
/**
* @throws InvalidArgumentException
*
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
private function decodeConfiguration(string $data): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function process(ContainerBuilder $container): void
}

/**
* @phpstan-param array<string, mixed> $attributes
* @param array<string, mixed> $attributes
*/
private function getJobName(string $id, Definition $definition, array $attributes): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
final class YokaiBatchExtension extends Extension
{
/**
* @phpstan-param list<array<string, mixed>> $configs
* @param list<array<string, mixed>> $configs
*/
public function load(array $configs, ContainerBuilder $container): void
{
Expand Down
4 changes: 2 additions & 2 deletions src/batch-symfony-messenger/src/LaunchJobMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class LaunchJobMessage
public function __construct(
private string $jobName,
/**
* @phpstan-var array<string, mixed>
* @var array<string, mixed>
*/
private array $configuration = [],
) {
Expand All @@ -24,7 +24,7 @@ public function getJobName(): string
}

/**
* @phpstan-return array<string, mixed>
* @return array<string, mixed>
*/
public function getConfiguration(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(
private string $type,
private ?string $format = null,
/**
* @phpstan-var array<string, mixed>
* @var array<string, mixed>
*/
private array $context = [],
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(
private NormalizerInterface $normalizer,
private ?string $format = null,
/**
* @phpstan-var array<string, mixed>
* @var array<string, mixed>
*/
private array $context = [],
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function process(mixed $item): mixed
/**
* @param Constraint[]|null $constraints
*
* @phpstan-return Iterator<string>
* @return Iterator<string>
*/
private function normalizeConstraints(?array $constraints): Iterator
{
Expand Down
4 changes: 2 additions & 2 deletions src/batch-symfony-validator/src/SkipItemOnViolations.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class SkipItemOnViolations implements SkipItemCauseInterface
{
public function __construct(
/**
* @phpstan-var ConstraintViolationListInterface<ConstraintViolationInterface>
* @var ConstraintViolationListInterface<ConstraintViolationInterface>
*/
private ConstraintViolationListInterface $violations
) {
Expand Down Expand Up @@ -48,7 +48,7 @@ public function report(JobExecution $execution, int|string $index, mixed $item):
}

/**
* @phpstan-return ConstraintViolationListInterface<ConstraintViolationInterface>
* @return ConstraintViolationListInterface<ConstraintViolationInterface>
*/
public function getViolations(): ConstraintViolationListInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/Factory/JobExecutionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
/**
* Create a {@see JobExecution}.
*
* @phpstan-param array<string, mixed> $configuration
* @param array<string, mixed> $configuration
*/
public function create(string $name, array $configuration = []): JobExecution
{
Expand Down
6 changes: 3 additions & 3 deletions src/batch/src/Failure.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
private int $code,
/**
* Some extra parameters that a developer has provided
* @phpstan-var array<string, string>
* @var array<string, string>
*/
private array $parameters = [],
/**
Expand All @@ -40,7 +40,7 @@ public function __construct(
/**
* Static constructor from an exception.
*
* @phpstan-param array<string, string> $parameters
* @param array<string, string> $parameters
*/
public static function fromException(Throwable $exception, array $parameters = []): self
{
Expand Down Expand Up @@ -74,7 +74,7 @@ public function getCode(): int
}

/**
* @phpstan-return array<string, string>
* @return array<string, string>
*/
public function getParameters(): array
{
Expand Down
4 changes: 2 additions & 2 deletions src/batch/src/Finder/CallbackFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class CallbackFinder implements FinderInterface
{
public function __construct(
/**
* @phpstan-var list<array{0: callable, 1: T}>
* @var list<array{0: callable, 1: T}>
*/
private array $strategies,
/**
* @phpstan-var T
* @var T
*/
private object $default,
) {
Expand Down
4 changes: 2 additions & 2 deletions src/batch/src/Finder/ClassMapFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
class ClassMapFinder extends CallbackFinder
{
/**
* @phpstan-param array<class-string, T> $classMap
* @phpstan-param T $default
* @param array<class-string, T> $classMap
* @param T $default
*/
public function __construct(array $classMap, object $default)
{
Expand Down
Loading
Loading