diff --git a/src/Propel/Runtime/ActiveQuery/BaseModelCriteria.php b/src/Propel/Runtime/ActiveQuery/BaseModelCriteria.php index 1a14148903..5f396f103c 100644 --- a/src/Propel/Runtime/ActiveQuery/BaseModelCriteria.php +++ b/src/Propel/Runtime/ActiveQuery/BaseModelCriteria.php @@ -50,7 +50,9 @@ abstract class BaseModelCriteria extends Criteria implements IteratorAggregate protected $modelAlias; /** - * @var \Propel\Runtime\Map\TableMap|T[] + * @phpstan-var \Propel\Runtime\Map\TableMap|null + * + * @var \Propel\Runtime\Map\TableMap|null */ protected $tableMap; @@ -308,7 +310,7 @@ public static function getShortName(string $fullyQualifiedClassName): string /** * Returns the TableMap object for this Criteria * - * @phpstan-return \Propel\Runtime\Map\TableMap + * @phpstan-return \Propel\Runtime\Map\TableMap|null * * @return \Propel\Runtime\Map\TableMap|null */ diff --git a/src/Propel/Runtime/Collection/ArrayCollection.php b/src/Propel/Runtime/Collection/ArrayCollection.php index c08fc348d4..213360bf84 100644 --- a/src/Propel/Runtime/Collection/ArrayCollection.php +++ b/src/Propel/Runtime/Collection/ArrayCollection.php @@ -18,13 +18,12 @@ * * @author Francois Zaninotto * - * @phpstan-template TType of \Propel\Runtime\ActiveRecord\ActiveRecordInterface - * @phpstan-extends \Propel\Runtime\Collection\Collection + * @phpstan-extends \Propel\Runtime\Collection\Collection */ class ArrayCollection extends Collection { /** - * @phpstan-var TType + * @phpstan-var \Propel\Runtime\ActiveRecord\ActiveRecordInterface * * @var \Propel\Runtime\ActiveRecord\ActiveRecordInterface */ diff --git a/src/Propel/Runtime/Collection/Collection.php b/src/Propel/Runtime/Collection/Collection.php index 81aafb1a54..06ef8835b2 100644 --- a/src/Propel/Runtime/Collection/Collection.php +++ b/src/Propel/Runtime/Collection/Collection.php @@ -42,7 +42,6 @@ * * @author Francois Zaninotto * - * @phpstan-template TType of \Propel\Runtime\ActiveRecord\ActiveRecordInterface * @phpstan-template T * @phpstan-implements \ArrayAccess * @phpstan-implements \IteratorAggregate @@ -50,7 +49,7 @@ class Collection implements ArrayAccess, IteratorAggregate, Countable, Serializable { /** - * @phpstan-var class-string + * @phpstan-var class-string<\Propel\Runtime\ActiveRecord\ActiveRecordInterface> * * @var string|null */ @@ -59,14 +58,14 @@ class Collection implements ArrayAccess, IteratorAggregate, Countable, Serializa /** * The fully qualified classname of the model * - * @phpstan-var class-string + * @phpstan-var class-string<\Propel\Runtime\ActiveRecord\ActiveRecordInterface> * * @var string|null */ protected $fullyQualifiedModel; /** - * @phpstan-var \Propel\Runtime\Formatter\AbstractFormatter + * @phpstan-var \Propel\Runtime\Formatter\AbstractFormatter<\Propel\Runtime\ActiveRecord\ActiveRecordInterface, \Propel\Runtime\Collection\Collection, T> * * @var \Propel\Runtime\Formatter\AbstractFormatter */ @@ -453,7 +452,7 @@ public function search($element) * Returns an array of objects present in the collection that * are not presents in the given collection. * - * @phpstan-param \Propel\Runtime\Collection\Collection $collection + * @phpstan-param \Propel\Runtime\Collection\Collection $collection * * @phpstan-return self * @@ -511,7 +510,7 @@ public function unserialize($data): void /** * Set the model of the elements in the collection * - * @phpstan-param class-string $model + * @phpstan-param class-string<\Propel\Runtime\ActiveRecord\ActiveRecordInterface> $model * * @param string $model Name of the Propel object classes stored in the collection * @@ -531,7 +530,7 @@ public function setModel(string $model): void /** * Get the model of the elements in the collection * - * @phpstan-return class-string + * @phpstan-return class-string<\Propel\Runtime\ActiveRecord\ActiveRecordInterface> * * @return string Name of the Propel object class stored in the collection */ @@ -543,7 +542,7 @@ public function getModel(): string /** * Get the model of the elements in the collection * - * @phpstan-return class-string + * @phpstan-return class-string<\Propel\Runtime\ActiveRecord\ActiveRecordInterface> * * @return string Fully qualified Name of the Propel object class stored in the collection */ @@ -571,7 +570,7 @@ public function getTableMapClass(): string } /** - * @phpstan-param \Propel\Runtime\Formatter\AbstractFormatter $formatter + * @phpstan-param \Propel\Runtime\Formatter\AbstractFormatter<\Propel\Runtime\ActiveRecord\ActiveRecordInterface, self, T> $formatter * * @param \Propel\Runtime\Formatter\AbstractFormatter $formatter * @@ -583,7 +582,7 @@ public function setFormatter(AbstractFormatter $formatter): void } /** - * @phpstan-return \Propel\Runtime\Formatter\AbstractFormatter + * @phpstan-return \Propel\Runtime\Formatter\AbstractFormatter<\Propel\Runtime\ActiveRecord\ActiveRecordInterface, \Propel\Runtime\Collection\Collection, T> * * @return \Propel\Runtime\Formatter\AbstractFormatter */ diff --git a/src/Propel/Runtime/Collection/ObjectCollection.php b/src/Propel/Runtime/Collection/ObjectCollection.php index fddd11e78a..cc4a54604c 100644 --- a/src/Propel/Runtime/Collection/ObjectCollection.php +++ b/src/Propel/Runtime/Collection/ObjectCollection.php @@ -23,9 +23,8 @@ * * @author Francois Zaninotto * - * @phpstan-template TType of \Propel\Runtime\ActiveRecord\ActiveRecordInterface * @phpstan-template T - * @phpstan-extends \Propel\Runtime\Collection\Collection + * @phpstan-extends \Propel\Runtime\Collection\Collection */ class ObjectCollection extends Collection { @@ -40,7 +39,7 @@ class ObjectCollection extends Collection protected $indexSplHash = []; /** - * @param array $data + * @param array<\Propel\Runtime\ActiveRecord\ActiveRecordInterface> $data */ public function __construct(array $data = []) { @@ -461,7 +460,7 @@ public function offsetUnset($offset): void } /** - * @phpstan-param TType $element + * @phpstan-param \Propel\Runtime\ActiveRecord\ActiveRecordInterface $element * * @param mixed $element * @@ -475,7 +474,7 @@ public function removeObject($element): void } /** - * @phpstan-param TType $value + * @phpstan-param \Propel\Runtime\ActiveRecord\ActiveRecordInterface $value * * @param mixed $value * @@ -499,7 +498,7 @@ public function append($value): void } /** - * @phpstan-param TType $value + * @phpstan-param \Propel\Runtime\ActiveRecord\ActiveRecordInterface $value * * @param mixed $offset * @param mixed $value diff --git a/src/Propel/Runtime/Collection/ObjectCombinationCollection.php b/src/Propel/Runtime/Collection/ObjectCombinationCollection.php index 9ad6a4f551..e5f7e261c4 100644 --- a/src/Propel/Runtime/Collection/ObjectCombinationCollection.php +++ b/src/Propel/Runtime/Collection/ObjectCombinationCollection.php @@ -14,6 +14,9 @@ * Class for iterating over a list of Propel objects * * @author Francois Zaninotto + * + * @phpstan-template T array<\Propel\Runtime\ActiveRecord\ActiveRecordInterface> + * @phpstan-extends \Propel\Runtime\Collection\ObjectCollection */ class ObjectCombinationCollection extends ObjectCollection { diff --git a/src/Propel/Runtime/Collection/OnDemandCollection.php b/src/Propel/Runtime/Collection/OnDemandCollection.php index aa72cfe647..1f39fd1c0f 100644 --- a/src/Propel/Runtime/Collection/OnDemandCollection.php +++ b/src/Propel/Runtime/Collection/OnDemandCollection.php @@ -20,9 +20,8 @@ * * @author Francois Zaninotto * - * @phpstan-template TType of \Propel\Runtime\ActiveRecord\ActiveRecordInterface * @phpstan-template T of \Propel\Runtime\ActiveRecord\ActiveRecordInterface - * @phpstan-extends \Propel\Runtime\Collection\Collection + * @phpstan-extends \Propel\Runtime\Collection\Collection */ class OnDemandCollection extends Collection { @@ -34,7 +33,7 @@ class OnDemandCollection extends Collection private $lastIterator; /** - * @phpstan-param \Propel\Runtime\Formatter\OnDemandFormatter $formatter + * @phpstan-param \Propel\Runtime\Formatter\OnDemandFormatter<\Propel\Runtime\ActiveRecord\ActiveRecordInterface, \Propel\Runtime\Collection\OnDemandCollection, T> $formatter * * @param \Propel\Runtime\Formatter\ObjectFormatter $formatter * @param \Propel\Runtime\DataFetcher\DataFetcherInterface $dataFetcher diff --git a/src/Propel/Runtime/Formatter/OnDemandFormatter.php b/src/Propel/Runtime/Formatter/OnDemandFormatter.php index a31aa3c465..b2dee6be3b 100644 --- a/src/Propel/Runtime/Formatter/OnDemandFormatter.php +++ b/src/Propel/Runtime/Formatter/OnDemandFormatter.php @@ -52,7 +52,7 @@ public function init(?BaseModelCriteria $criteria = null, ?DataFetcherInterface } /** - * @phpstan-return TColl + * @phpstan-return TColl * * @param \Propel\Runtime\DataFetcher\DataFetcherInterface|null $dataFetcher * @@ -92,7 +92,7 @@ public function getCollectionClassName(): string } /** - * @phpstan-return \Propel\Runtime\Collection\OnDemandCollection + * @phpstan-return \Propel\Runtime\Collection\OnDemandCollection * * @return \Propel\Runtime\Collection\OnDemandCollection */