@@ -24,7 +24,7 @@ class ResponseFactoryTest extends TestCase
2424{
2525 public function test_can_macro (): void
2626 {
27- $ factory = new ResponseFactory () ;
27+ $ factory = new ResponseFactory ;
2828 $ factory ->macro ('foo ' , function () {
2929 return 'bar ' ;
3030 });
@@ -38,7 +38,7 @@ public function test_location_response_for_inertia_requests(): void
3838 return true ;
3939 });
4040
41- $ response = (new ResponseFactory () )->location ('https://inertiajs.com ' );
41+ $ response = (new ResponseFactory )->location ('https://inertiajs.com ' );
4242
4343 $ this ->assertInstanceOf (Response::class, $ response );
4444 $ this ->assertEquals (Response::HTTP_CONFLICT , $ response ->getStatusCode ());
@@ -51,7 +51,7 @@ public function test_location_response_for_non_inertia_requests(): void
5151 return false ;
5252 });
5353
54- $ response = (new ResponseFactory () )->location ('https://inertiajs.com ' );
54+ $ response = (new ResponseFactory )->location ('https://inertiajs.com ' );
5555
5656 $ this ->assertInstanceOf (RedirectResponse::class, $ response );
5757 $ this ->assertEquals (Response::HTTP_FOUND , $ response ->getStatusCode ());
@@ -65,7 +65,7 @@ public function test_location_response_for_inertia_requests_using_redirect_respo
6565 });
6666
6767 $ redirect = new RedirectResponse ('https://inertiajs.com ' );
68- $ response = (new ResponseFactory () )->location ($ redirect );
68+ $ response = (new ResponseFactory )->location ($ redirect );
6969
7070 $ this ->assertInstanceOf (Response::class, $ response );
7171 $ this ->assertEquals (409 , $ response ->getStatusCode ());
@@ -75,7 +75,7 @@ public function test_location_response_for_inertia_requests_using_redirect_respo
7575 public function test_location_response_for_non_inertia_requests_using_redirect_response (): void
7676 {
7777 $ redirect = new RedirectResponse ('https://inertiajs.com ' );
78- $ response = (new ResponseFactory () )->location ($ redirect );
78+ $ response = (new ResponseFactory )->location ($ redirect );
7979
8080 $ this ->assertInstanceOf (RedirectResponse::class, $ response );
8181 $ this ->assertEquals (Response::HTTP_FOUND , $ response ->getStatusCode ());
@@ -84,7 +84,7 @@ public function test_location_response_for_non_inertia_requests_using_redirect_r
8484
8585 public function test_location_redirects_are_not_modified (): void
8686 {
87- $ response = (new ResponseFactory () )->location ('/foo ' );
87+ $ response = (new ResponseFactory )->location ('/foo ' );
8888
8989 $ this ->assertInstanceOf (RedirectResponse::class, $ response );
9090 $ this ->assertEquals (Response::HTTP_FOUND , $ response ->getStatusCode ());
@@ -96,7 +96,7 @@ public function test_location_response_for_non_inertia_requests_using_redirect_r
9696 $ redirect = new RedirectResponse ('https://inertiajs.com ' );
9797 $ redirect ->setSession ($ session = new Store ('test ' , new NullSessionHandler ));
9898 $ redirect ->setRequest ($ request = new HttpRequest );
99- $ response = (new ResponseFactory () )->location ($ redirect );
99+ $ response = (new ResponseFactory )->location ($ redirect );
100100
101101 $ this ->assertInstanceOf (RedirectResponse::class, $ response );
102102 $ this ->assertEquals (Response::HTTP_FOUND , $ response ->getStatusCode ());
@@ -156,7 +156,7 @@ public function test_can_flush_shared_data(): void
156156
157157 public function test_can_create_lazy_prop (): void
158158 {
159- $ factory = new ResponseFactory () ;
159+ $ factory = new ResponseFactory ;
160160 $ lazyProp = $ factory ->lazy (function () {
161161 return 'A lazy value ' ;
162162 });
@@ -166,7 +166,7 @@ public function test_can_create_lazy_prop(): void
166166
167167 public function test_can_create_deferred_prop (): void
168168 {
169- $ factory = new ResponseFactory () ;
169+ $ factory = new ResponseFactory ;
170170 $ deferredProp = $ factory ->defer (function () {
171171 return 'A deferred value ' ;
172172 });
@@ -177,7 +177,7 @@ public function test_can_create_deferred_prop(): void
177177
178178 public function test_can_create_deferred_prop_with_custom_group (): void
179179 {
180- $ factory = new ResponseFactory () ;
180+ $ factory = new ResponseFactory ;
181181 $ deferredProp = $ factory ->defer (function () {
182182 return 'A deferred value ' ;
183183 }, 'foo ' );
@@ -188,7 +188,7 @@ public function test_can_create_deferred_prop_with_custom_group(): void
188188
189189 public function test_can_create_merged_prop (): void
190190 {
191- $ factory = new ResponseFactory () ;
191+ $ factory = new ResponseFactory ;
192192 $ mergedProp = $ factory ->merge (function () {
193193 return 'A merged value ' ;
194194 });
@@ -198,7 +198,7 @@ public function test_can_create_merged_prop(): void
198198
199199 public function test_can_create_deferred_and_merged_prop (): void
200200 {
201- $ factory = new ResponseFactory () ;
201+ $ factory = new ResponseFactory ;
202202 $ deferredProp = $ factory ->defer (function () {
203203 return 'A deferred + merged value ' ;
204204 })->merge ();
@@ -208,7 +208,7 @@ public function test_can_create_deferred_and_merged_prop(): void
208208
209209 public function test_can_create_optional_prop (): void
210210 {
211- $ factory = new ResponseFactory () ;
211+ $ factory = new ResponseFactory ;
212212 $ optionalProp = $ factory ->optional (function () {
213213 return 'An optional value ' ;
214214 });
@@ -218,7 +218,7 @@ public function test_can_create_optional_prop(): void
218218
219219 public function test_can_create_always_prop (): void
220220 {
221- $ factory = new ResponseFactory () ;
221+ $ factory = new ResponseFactory ;
222222 $ alwaysProp = $ factory ->always (function () {
223223 return 'An always value ' ;
224224 });
@@ -231,7 +231,7 @@ public function test_will_accept_arrayabe_props()
231231 Route::middleware ([StartSession::class, ExampleMiddleware::class])->get ('/ ' , function () {
232232 Inertia::share ('foo ' , 'bar ' );
233233
234- return Inertia::render ('User/Edit ' , new class () implements Arrayable
234+ return Inertia::render ('User/Edit ' , new class implements Arrayable
235235 {
236236 public function toArray ()
237237 {
0 commit comments