In my domain model there is a property month
which is an ObjectStorage
for bill
elements. Here is how the domain model looks:
/**
* establishment
*
* @var ObjectStorage<Bill>
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
*/
protected ObjectStorage $month;
public function __construct()
{
$this->setMonth(new ObjectStorage());
}
Here is the setter:
/**
* month setter
*
* @param ObjectStorage<Bill> $month
* @return void
*/
public function setMonth(ObjectStorage $month) : void
{
$this->month = $month;
}
Sadly phpstan
shows the following error:
Parameter #1 $establishment of method VIC\Ext\Domain\Model\StorageRoom::setMonth() expects iterable&TYPO3\CMS\Extbase\Persistence\ObjectStorage,
TYPO3\CMS\Extbase\Persistence\ObjectStorage given.
Any Idea what is wrong?
ObjectStorage
properties if you properly map them to DB fields. – Mathias Brodala