Skip to content

Commit

Permalink
Fix static analysis (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Oct 10, 2022
1 parent 8fa77b4 commit 82a0ab1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Mapper/ORM/DoctrineORMMapper.php
Expand Up @@ -19,6 +19,15 @@
use Doctrine\Persistence\Event\LoadClassMetadataEventArgs;
use Doctrine\Persistence\Mapping\ClassMetadata;

/**
* @phpstan-type DiscriminatorColumn = array{
* name: string|null,
* fieldName?: string,
* type?: string,
* length?: int,
* columnDefinition?: string|null
* }
*/
final class DoctrineORMMapper implements EventSubscriber
{
/**
Expand All @@ -33,6 +42,8 @@ final class DoctrineORMMapper implements EventSubscriber

/**
* @var array<class-string, array<string, mixed>>
*
* @phpstan-var array<class-string, DiscriminatorColumn>
*/
private array $discriminatorColumns = [];

Expand Down Expand Up @@ -102,6 +113,7 @@ public function addDiscriminator(string $class, string $key, string $discriminat
* @param array<string, mixed> $columnDef
*
* @phpstan-param class-string $class
* @phpstan-param DiscriminatorColumn $columnDef
*/
public function addDiscriminatorColumn(string $class, array $columnDef): void
{
Expand Down

0 comments on commit 82a0ab1

Please sign in to comment.