Keşfet

addContentToBookmarks uses ArrayCollection instead of AbstractCollection for type hint

XFdestek

Kurucu Üye
Katılım
25 May 2014
Mesajlar
3,201
Tepkime puanı
284
Konum
Türkiye
Web sitesi
fivetu.xyz
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.
 

Konu görüntüleyen kullanıcılar

Geri
Üst Alt