Fixed some psalm issues.

This commit is contained in:
Jan Böhmer 2020-03-29 23:13:25 +02:00
parent eb9b24d5d7
commit cb0aa7bc7a
32 changed files with 217 additions and 148 deletions

View file

@ -35,10 +35,12 @@ class HistoryHelper
}
/**
* Returns an array containing all elements that are associated with the argument.
* The returned array contains the given element.
* Returns an array containing all elements that are associated with the argument.
* The returned array contains the given element.
*
* @return array
*
* @psalm-return array<\App\Entity\Parameters\AbstractParameter|array-key, mixed>
*/
public function getAssociatedElements(AbstractDBElement $element): array
{

View file

@ -209,6 +209,9 @@ class TimeTravel
return $property->getValue($element);
}
/**
* @param \DateTime|int|null $new_value
*/
protected function setField(AbstractDBElement $element, string $field, $new_value): void
{
$reflection = new \ReflectionClass(get_class($element));