X

addContentToBookmarks uses ArrayCollection instead of AbstractCollection for type hint

  • Thread starter Thread starter Xon
  • Start date Start date

Visitor Greeting

Welcome to NullWarehouse.com... We are currently seeking Mod's and Contributors. If you wish to apply for a Mod position then please click on Members dropdown arrow, then click on Staff App and fill it out completely and submit it. If you want to be a Contributor then start contributing and we will have our eye on you and take notice, something great could come of it.

  • We have redone the forum. If you notice any issues or errors please open a Support Ticket under the Members dropdown and let us know.
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...
 
Similar content Most view View more
Back
Top Bottom