2020use Discord \Builders \Components \Section ;
2121use Discord \Builders \Components \Separator ;
2222use Discord \Builders \Components \TextDisplay ;
23- use Discord \Helpers \Collection ;
2423use Discord \Helpers \ExCollectionInterface ;
2524use Discord \Parts \Embed \Embed ;
2625use Discord \Parts \Interactions \Interaction ;
2726use Discord \Parts \Part ;
28- use MTG \HelperTrait ;
2927use MTG \MTG ;
3028use React \Promise \PromiseInterface ;
3129
@@ -127,7 +125,7 @@ public function getReleaseDateAttribute(): ?Carbon
127125 */
128126 public function getRulingsAttribute (): ExCollectionInterface
129127 {
130- $ collection = Collection ::for (Ruling::class);
128+ $ collection = ( $ this -> discord -> getCollectionClass ()) ::for (Ruling::class);
131129
132130 if (! isset ($ this ->attributes ['rulings ' ]) || ! is_array ($ this ->attributes ['rulings ' ])) {
133131 return $ collection ;
@@ -149,7 +147,7 @@ public function getRulingsAttribute(): ExCollectionInterface
149147 */
150148 public function getForeignNamesAttribute (): ExCollectionInterface
151149 {
152- $ collection = Collection ::for (ForeignName::class);
150+ $ collection = ( $ this -> discord -> getCollectionClass ()) ::for (ForeignName::class);
153151
154152 if (! isset ($ this ->attributes ['foreignNames ' ]) || ! is_array ($ this ->attributes ['foreignNames ' ])) {
155153 return $ collection ;
@@ -171,7 +169,7 @@ public function getForeignNamesAttribute(): ExCollectionInterface
171169 */
172170 public function getLegalitiesAttribute (): ExCollectionInterface
173171 {
174- $ collection = Collection ::for (Legality::class);
172+ $ collection = ( $ this -> discord -> getCollectionClass ()) ::for (Legality::class);
175173
176174 if (! isset ($ this ->attributes ['legalities ' ]) || ! is_array ($ this ->attributes ['legalities ' ])) {
177175 return $ collection ;
@@ -243,7 +241,7 @@ public function getImageEmbedAttribute(): ?Embed
243241 */
244242 public function normalLayoutContainer (?Interaction $ interaction ): Container
245243 {
246- /** @var HelperTrait $mtg */
244+ /** @var MTG $mtg */
247245 $ mtg = $ this ->discord ;
248246
249247 $ ci_emoji = (($ this ->colorIdentity ) ? implode ('' , array_map (fn ($ c ) => $ this ->discord ->emojis ->get ('name ' , 'CI_ ' .$ c .'_ ' ), $ this ->colorIdentity )) : '' );
0 commit comments