Skip to content

Commit

Permalink
Fix type hint on OrderBy attribute
Browse files Browse the repository at this point in the history
ORM2 version of #11779
  • Loading branch information
curry684 authored Jan 6, 2025
1 parent e3cabad commit d5f87e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mapping/OrderBy.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\Common\Collections\Order;

/**
* @Annotation
Expand All @@ -16,12 +17,12 @@
final class OrderBy implements MappingAttribute
{
/**
* @var array<string>
* @var array<string, string|Order>
* @readonly
*/
public $value;

Check failure on line 23 in src/Mapping/OrderBy.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (default, 2.5)

Property Doctrine\ORM\Mapping\OrderBy::$value has unknown class Doctrine\Common\Collections\Order as its type.

/** @param array<string> $value */
/** @param array<string, string|Order> $value */
public function __construct(array $value)

Check failure on line 26 in src/Mapping/OrderBy.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (default, 2.5)

Parameter $value of method Doctrine\ORM\Mapping\OrderBy::__construct() has invalid type Doctrine\Common\Collections\Order.
{
$this->value = $value;
Expand Down

0 comments on commit d5f87e7

Please sign in to comment.