Solved addContentToBookmarks uses ArrayCollection instead of AbstractCollection for type hint

This topic has been solved
X

Xon

Guest
XF\Repository\BookmarkRepository::addContentToBookmarks's argument is type hinted as @param ArrayCollection|BookmarkItem[]. This could be replaced with or AbstractCollection<BookmarkItem>|BookmarkItem[] just AbstractCollection<BookmarkItem>.

This enables passing finder results straight to this method without static analysis raising a false positive

There are actually a few places which use @param ArrayCollection| which could get the same treatment.

Continue reading...