Skip to content

Commit

Permalink
Psalm 5.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Dec 19, 2022
1 parent c23220b commit fb7b8ec
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 38 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"squizlabs/php_codesniffer": "3.7.1",
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"vimeo/psalm": "4.30.0 || 5.2.0"
"vimeo/psalm": "4.30.0 || 5.3.0"
},
"conflict": {
"doctrine/annotations": "<1.13 || >= 2.0"
Expand Down
23 changes: 17 additions & 6 deletions lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
* @template-implements ClassMetadata<T>
* @psalm-type FieldMapping = array{
* type: string,
* fieldName: string,
* fieldName: non-empty-string,
* columnName: string,
* length?: int,
* id?: bool,
Expand All @@ -102,7 +102,7 @@
* referencedColumnName: string,
* unique?: bool,
* quoted?: bool,
* fieldName?: string,
* fieldName?: non-empty-string,
* onDelete?: string,
* columnDefinition?: string,
* nullable?: bool,
Expand All @@ -112,7 +112,7 @@
* cascade: array<string>,
* declared?: class-string,
* fetch: mixed,
* fieldName: string,
* fieldName: non-empty-string,
* id?: bool,
* inherited?: class-string,
* indexBy?: string,
Expand Down Expand Up @@ -142,6 +142,13 @@
* type: int,
* unique?: bool,
* }
* @psalm-type DiscriminatorColumnMapping = array{
* name: string,
* fieldName: non-empty-string,
* type: string,
* length?: int,
* columnDefinition?: string|null,
* }
*/
class ClassMetadataInfo implements ClassMetadata
{
Expand Down Expand Up @@ -574,7 +581,8 @@ class ClassMetadataInfo implements ClassMetadata
* READ-ONLY: The definition of the discriminator column used in JOINED and SINGLE_TABLE
* inheritance mappings.
*
* @psalm-var array{name: string, fieldName: string, type: string, length?: int, columnDefinition?: string|null}|null
* @var array<string, mixed>
* @psalm-var DiscriminatorColumnMapping|null
*/
public $discriminatorColumn;

Expand Down Expand Up @@ -3215,7 +3223,7 @@ public function addEntityListener($eventName, $class, $method)
* @see getDiscriminatorColumn()
*
* @param mixed[]|null $columnDef
* @psalm-param array{name: string|null, fieldName?: string, type?: string, length?: int, columnDefinition?: string|null}|null $columnDef
* @psalm-param array{name: string|null, fieldName?: non-empty-string, type?: string, length?: int, columnDefinition?: string|null}|null $columnDef
*
* @return void
*
Expand Down Expand Up @@ -3248,7 +3256,10 @@ public function setDiscriminatorColumn($columnDef)
}
}

/** @return array<string, mixed> */
/**
* @return array<string, mixed>
* @psalm-return DiscriminatorColumnMapping
*/
final public function getDiscriminatorColumn(): array
{
if ($this->discriminatorColumn === null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Tools/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ protected function parseTokensInEntityFile($src)
}

/**
* @param string $property
* @param non-empty-string $property
*
* @return bool
*/
Expand Down
Loading

0 comments on commit fb7b8ec

Please sign in to comment.