Skip to content

Commit

Permalink
fix: class name
Browse files Browse the repository at this point in the history
Waring fixed:

> Warning: AdminGroup#createAdminGroup: You are extending a custom controller class. Make sure that it ends with "OCSController" if it extends "OCSController" itself.

Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Dec 6, 2024
1 parent fa08cb0 commit b71b329
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use OCP\AppFramework\OCSController;

abstract class AEnvironmentAwareController extends OCSController {
abstract class AEnvironmentAwareOCSController extends OCSController {
protected int $apiVersion = 1;

public function setAPIVersion(int $apiVersion): void {
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/AdminGroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use OCP\Security\ISecureRandom;
use Psr\Log\LoggerInterface;

class AdminGroupController extends AEnvironmentAwareController {
class AdminGroupController extends AEnvironmentAwareOCSController {
public function __construct(
$appName,
IRequest $request,
Expand Down
6 changes: 3 additions & 3 deletions lib/Middleware/InjectionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OCA\AdminGroupManager\Middleware;

use OCA\AdminGroupManager\Controller\AEnvironmentAwareController;
use OCA\AdminGroupManager\Controller\AEnvironmentAwareOCSController;
use OCA\AdminGroupManager\Controller\Attribute\RestrictIp;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
Expand All @@ -34,9 +34,9 @@ public function __construct(
* @throws \Exception
*/
public function beforeController(Controller $controller, string $methodName) {
if ($controller instanceof AEnvironmentAwareController) {
if ($controller instanceof AEnvironmentAwareOCSController) {
$apiVersion = $this->request->getParam('apiVersion');
/** @var AEnvironmentAwareController $controller */
/** @var AEnvironmentAwareOCSController $controller */
$controller->setAPIVersion((int)substr($apiVersion, 1));
}

Expand Down

0 comments on commit b71b329

Please sign in to comment.