Skip to content

Commit 3902c56

Browse files
Merge pull request #320 from nextcloud/jtr/fix-DataResponse-instantiations
2 parents 772b90e + b01e151 commit 3902c56

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/lib/Controller/AdminSettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function optionalParameters(
7878
int $option1 = 0,
7979
int $option2 = self::ALSO_OPTIONAL,
8080
) {
81-
return DataResponse();
81+
return new DataResponse();
8282
}
8383

8484
}

tests/lib/Controller/RoutingController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class RoutingController extends OCSController {
2323
#[Route(Route::TYPE_API, verb: 'GET', url: '/attribute-ocs/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'Route')]
2424
#[ApiRoute(verb: 'POST', url: '/attribute-ocs/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'ApiRoute')]
2525
public function attributeOCS() {
26-
return DataResponse();
26+
return new DataResponse();
2727
}
2828

2929
/**
@@ -37,7 +37,7 @@ public function attributeOCS() {
3737
#[Route(Route::TYPE_FRONTPAGE, verb: 'GET', url: '/attribute-index/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'Route')]
3838
#[FrontpageRoute(verb: 'POST', url: '/attribute-index/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'FrontpageRoute')]
3939
public function attributeIndex() {
40-
return DataResponse();
40+
return new DataResponse();
4141
}
4242

4343
/**
@@ -48,6 +48,6 @@ public function attributeIndex() {
4848
*/
4949
#[FrontpageRoute(verb: 'PUT', url: '/attribute-index/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests')]
5050
public function csrfIndex() {
51-
return DataResponse();
51+
return new DataResponse();
5252
}
5353
}

0 commit comments

Comments
 (0)