Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ControllerMethodParameter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OpenAPIExtractor;

class ControllerMethodParameter {
Expand Down
3 changes: 2 additions & 1 deletion src/ControllerMethodResponse.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OpenAPIExtractor;

class ControllerMethodResponse {
Expand Down
3 changes: 2 additions & 1 deletion src/Logger.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OpenAPIExtractor;

class Logger {
Expand Down
3 changes: 2 additions & 1 deletion src/LoggerLevel.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OpenAPIExtractor;

enum LoggerLevel: string {
Expand Down
3 changes: 2 additions & 1 deletion src/UnsupportedExprException.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OpenAPIExtractor;

use Exception;
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Controller/AdminSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function movedToSettingsTagUnnamed(): DataResponse {
public function optionalParameters(
int $option1 = 0,
int $option2 = self::ALSO_OPTIONAL,
) {
): \OCP\AppFramework\Http\DataResponse {
return new DataResponse();
}

Expand Down
6 changes: 3 additions & 3 deletions tests/lib/Controller/RoutingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RoutingController extends OCSController {
*/
#[Route(Route::TYPE_API, verb: 'GET', url: '/attribute-ocs/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'Route')]
#[ApiRoute(verb: 'POST', url: '/attribute-ocs/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'ApiRoute')]
public function attributeOCS() {
public function attributeOCS(): \OCP\AppFramework\Http\DataResponse {
return new DataResponse();
}

Expand All @@ -36,7 +36,7 @@ public function attributeOCS() {
*/
#[Route(Route::TYPE_FRONTPAGE, verb: 'GET', url: '/attribute-index/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'Route')]
#[FrontpageRoute(verb: 'POST', url: '/attribute-index/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests', postfix: 'FrontpageRoute')]
public function attributeIndex() {
public function attributeIndex(): \OCP\AppFramework\Http\DataResponse {
return new DataResponse();
}

Expand All @@ -47,7 +47,7 @@ public function attributeIndex() {
* 200: Success
*/
#[FrontpageRoute(verb: 'PUT', url: '/attribute-index/{param}', requirements: ['param' => '[a-z]+'], defaults: ['param' => 'abc'], root: '/tests')]
public function csrfIndex() {
public function csrfIndex(): \OCP\AppFramework\Http\DataResponse {
return new DataResponse();
}
}