File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -165,12 +165,20 @@ private function discoverThirdPartyPrimitives(string $primitiveType): array
165165 */
166166 private function filterPrimitives (array $ availablePrimitives , string $ type ): array
167167 {
168- return collect ($ availablePrimitives )
168+ $ collection = collect ($ availablePrimitives );
169+
170+ $ classStrings = $ collection ->filter (fn ($ item ): bool => is_string ($ item ));
171+ $ instances = $ collection ->reject (fn ($ item ): bool => is_string ($ item ));
172+
173+ $ filteredClassStrings = $ classStrings
169174 ->diff (config ("boost.mcp. {$ type }.exclude " , []))
170175 ->merge (
171176 collect (config ("boost.mcp. {$ type }.include " , []))
172177 ->filter (fn (string $ class ): bool => class_exists ($ class ))
173- )
178+ );
179+
180+ return $ filteredClassStrings
181+ ->merge ($ instances )
174182 ->values ()
175183 ->all ();
176184 }
You can’t perform that action at this time.
0 commit comments