Skip to content

Commit e1c2d2e

Browse files
committed
PHPStan 1.0.1
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 16cbc16 commit e1c2d2e

File tree

10 files changed

+270
-86
lines changed

10 files changed

+270
-86
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"doctrine/annotations": "^1.13",
4040
"doctrine/coding-standard": "^9.0",
4141
"phpbench/phpbench": "^0.16.10 || ^1.0",
42-
"phpstan/phpstan": "0.12.99",
42+
"phpstan/phpstan": "1.0.1",
4343
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
4444
"squizlabs/php_codesniffer": "3.6.1",
4545
"symfony/cache": "^4.4 || ^5.2",

lib/Doctrine/ORM/AbstractQuery.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,8 @@ private function getTimestampKey(): ?TimestampCacheKey
12531253
* Will return the configured id if it exists otherwise a hash will be
12541254
* automatically generated for you.
12551255
*
1256-
* @return array<string, string> ($key, $hash)
1256+
* @return string[] ($key, $hash)
1257+
* @psalm-return array{string, string} ($key, $hash)
12571258
*/
12581259
protected function getHydrationCacheId()
12591260
{

lib/Doctrine/ORM/EntityManagerInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,9 @@ public function hasFilters();
330330
* {@inheritDoc}
331331
*
332332
* @psalm-param string|class-string<T> $className
333-
* @phpstan-param string $className
334333
*
335334
* @return Mapping\ClassMetadata
336335
* @psalm-return Mapping\ClassMetadata<T>
337-
* @phpstan-return Mapping\ClassMetadata<object>
338336
*
339337
* @psalm-template T of object
340338
*/

lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ class ClassMetadataInfo implements ClassMetadata
442442
* originalField?: string,
443443
* quoted?: bool,
444444
* requireSQLConversion?: bool,
445+
* declared?: class-string,
445446
* declaredField?: string,
446447
* options: array<mixed>
447448
* }>
@@ -509,7 +510,14 @@ class ClassMetadataInfo implements ClassMetadata
509510
* uniqueConstraints => array
510511
*
511512
* @var mixed[]
512-
* @psalm-var array{name: string, schema: string, indexes: array, uniqueConstraints: array}
513+
* @psalm-var array{
514+
* name: string,
515+
* schema: string,
516+
* indexes: array,
517+
* uniqueConstraints: array,
518+
* options: array<string, mixed>,
519+
* quoted?: bool
520+
* }
513521
*/
514522
public $table;
515523

@@ -665,7 +673,7 @@ class ClassMetadataInfo implements ClassMetadata
665673
/**
666674
* The ReflectionClass instance of the mapped class.
667675
*
668-
* @var ReflectionClass
676+
* @var ReflectionClass|null
669677
*/
670678
public $reflClass;
671679

lib/Doctrine/ORM/Mapping/Column.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
#[Attribute(Attribute::TARGET_PROPERTY)]
1616
final class Column implements Annotation
1717
{
18-
/** @var string */
18+
/** @var string|null */
1919
public $name;
2020

2121
/** @var mixed */
2222
public $type;
2323

24-
/** @var int */
24+
/** @var int|null */
2525
public $length;
2626

2727
/**
2828
* The precision for a decimal (exact numeric) column (Applies only for decimal column).
2929
*
30-
* @var int
30+
* @var int|null
3131
*/
3232
public $precision = 0;
3333

3434
/**
3535
* The scale for a decimal (exact numeric) column (Applies only for decimal column).
3636
*
37-
* @var int
37+
* @var int|null
3838
*/
3939
public $scale = 0;
4040

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

50-
/** @var string */
50+
/** @var string|null */
5151
public $columnDefinition;
5252

5353
/**

lib/Doctrine/ORM/Query/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class Parser
214214
*/
215215
private $customOutputWalker;
216216

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

220220
/**

0 commit comments

Comments
 (0)