File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,13 @@ public function setBroker(Broker $broker)
5151 */
5252 public function hasMethod (ClassReflection $ classReflection , string $ methodName ): bool
5353 {
54- if ($ classReflection ->isSubclassOf (Model::class) && !isset ($ this ->methods [$ classReflection ->getName ()])) {
54+ if (!isset ($ this ->methods [$ classReflection ->getName ()]) && (
55+ $ classReflection ->isSubclassOf (Model::class)
56+ || preg_match (
57+ '/@mixin\s+ ' . preg_quote ('\\' . Builder::class) . '/ ' ,
58+ (string ) $ classReflection ->getNativeReflection ()->getDocComment ()
59+ )
60+ )) {
5561 $ builder = $ this ->broker ->getClass (Builder::class);
5662 $ this ->methods [$ classReflection ->getName ()] = $ this ->createWrappedMethods ($ classReflection , $ builder );
5763
You can’t perform that action at this time.
0 commit comments