You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class NoModelForwardingToBuilderTest extends RuleTestCase
13
15
{
@@ -18,14 +20,22 @@ protected function getRule(): Rule
18
20
19
21
publicfunctiontestRule(): void
20
22
{
23
+
$message = staticfn (string$name) => strtr(
24
+
"Method [:name] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [:::name()], [::query()->:name()] or [->newQuery()->:name()] instead.",
["Method [first] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [::first()], [::query()->first()] or [->newQuery()->first()] instead.", 5],
23
-
["Method [get] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [::get()], [::query()->get()] or [->newQuery()->get()] instead.", 6],
24
-
["Method [find] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [::find()], [::query()->find()] or [->newQuery()->find()] instead.", 7],
25
-
["Method [paginate] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [::paginate()], [::query()->paginate()] or [->newQuery()->paginate()] instead.", 8],
26
-
["Method [where] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [::where()], [::query()->where()] or [->newQuery()->where()] instead.", 9],
27
-
["Method [take] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [::take()], [::query()->take()] or [->newQuery()->take()] instead.", 10],
28
-
["Method [max] is forwarded to a Builder instance, which is not allowed.\n 💡 Use [::max()], [::query()->max()] or [->newQuery()->max()] instead.", 11],
0 commit comments