We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f4847e commit e55c1eaCopy full SHA for e55c1ea
src/Concerns/AsObject.php
@@ -6,7 +6,7 @@
6
7
trait AsObject
8
{
9
- public static function make(): static
+ public static function make()
10
11
return app(static::class);
12
}
tests/AsActionTest.php
@@ -85,6 +85,13 @@ public function asCommand(Command $command): void
85
expect(AsActionTest::$latestResult)->toBe(42);
86
});
87
88
+it('returns void when calling make()', function () {
89
+ // Make sure that the static function ::make() returns not a type.
90
+ $result = (new \ReflectionMethod(AsActionTest::class, 'make'))->getReturnType();
91
+
92
+ expect($result)->toBeEmpty();
93
+});
94
95
it('runs as a controller', function () {
96
// Given we have a route registered for that action.
97
Route::post('compute/{operation}', AsActionTest::class);
0 commit comments