Skip to content

Commit

Permalink
Merge pull request #9167 from derrabus/bump/phpstan
Browse files Browse the repository at this point in the history
PHPStan 1.0.1
  • Loading branch information
greg0ire authored Nov 3, 2021
2 parents a3da3d7 + e1c2d2e commit ca0a6bb
Show file tree
Hide file tree
Showing 10 changed files with 270 additions and 86 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"doctrine/annotations": "^1.13",
"doctrine/coding-standard": "^9.0",
"phpbench/phpbench": "^0.16.10 || ^1.0",
"phpstan/phpstan": "0.12.99",
"phpstan/phpstan": "1.0.1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
"squizlabs/php_codesniffer": "3.6.1",
"symfony/cache": "^4.4 || ^5.2",
Expand Down
3 changes: 2 additions & 1 deletion lib/Doctrine/ORM/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,8 @@ private function getTimestampKey(): ?TimestampCacheKey
* Will return the configured id if it exists otherwise a hash will be
* automatically generated for you.
*
* @return array<string, string> ($key, $hash)
* @return string[] ($key, $hash)
* @psalm-return array{string, string} ($key, $hash)
*/
protected function getHydrationCacheId()
{
Expand Down
2 changes: 0 additions & 2 deletions lib/Doctrine/ORM/EntityManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,9 @@ public function hasFilters();
* {@inheritDoc}
*
* @psalm-param string|class-string<T> $className
* @phpstan-param string $className
*
* @return Mapping\ClassMetadata
* @psalm-return Mapping\ClassMetadata<T>
* @phpstan-return Mapping\ClassMetadata<object>
*
* @psalm-template T of object
*/
Expand Down
12 changes: 10 additions & 2 deletions lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ class ClassMetadataInfo implements ClassMetadata
* originalField?: string,
* quoted?: bool,
* requireSQLConversion?: bool,
* declared?: class-string,
* declaredField?: string,
* options: array<mixed>
* }>
Expand Down Expand Up @@ -509,7 +510,14 @@ class ClassMetadataInfo implements ClassMetadata
* uniqueConstraints => array
*
* @var mixed[]
* @psalm-var array{name: string, schema: string, indexes: array, uniqueConstraints: array}
* @psalm-var array{
* name: string,
* schema: string,
* indexes: array,
* uniqueConstraints: array,
* options: array<string, mixed>,
* quoted?: bool
* }
*/
public $table;

Expand Down Expand Up @@ -665,7 +673,7 @@ class ClassMetadataInfo implements ClassMetadata
/**
* The ReflectionClass instance of the mapped class.
*
* @var ReflectionClass
* @var ReflectionClass|null
*/
public $reflClass;

Expand Down
10 changes: 5 additions & 5 deletions lib/Doctrine/ORM/Mapping/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@
#[Attribute(Attribute::TARGET_PROPERTY)]
final class Column implements Annotation
{
/** @var string */
/** @var string|null */
public $name;

/** @var mixed */
public $type;

/** @var int */
/** @var int|null */
public $length;

/**
* The precision for a decimal (exact numeric) column (Applies only for decimal column).
*
* @var int
* @var int|null
*/
public $precision = 0;

/**
* The scale for a decimal (exact numeric) column (Applies only for decimal column).
*
* @var int
* @var int|null
*/
public $scale = 0;

Expand All @@ -47,7 +47,7 @@ final class Column implements Annotation
/** @var array<string,mixed> */
public $options = [];

/** @var string */
/** @var string|null */
public $columnDefinition;

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Query/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class Parser
*/
private $customOutputWalker;

/** @psalm-var list<AST\SelectExpression> */
/** @psalm-var array<string, AST\SelectExpression> */
private $identVariableExpressions = [];

/**
Expand Down
Loading

0 comments on commit ca0a6bb

Please sign in to comment.