Skip to content

Commit b71b329

Browse files
committed
fix: class name
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]>
1 parent fa08cb0 commit b71b329

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/Controller/AEnvironmentAwareController.php renamed to lib/Controller/AEnvironmentAwareOCSController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use OCP\AppFramework\OCSController;
1212

13-
abstract class AEnvironmentAwareController extends OCSController {
13+
abstract class AEnvironmentAwareOCSController extends OCSController {
1414
protected int $apiVersion = 1;
1515

1616
public function setAPIVersion(int $apiVersion): void {

lib/Controller/AdminGroupController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
use OCP\Security\ISecureRandom;
3333
use Psr\Log\LoggerInterface;
3434

35-
class AdminGroupController extends AEnvironmentAwareController {
35+
class AdminGroupController extends AEnvironmentAwareOCSController {
3636
public function __construct(
3737
$appName,
3838
IRequest $request,

lib/Middleware/InjectionMiddleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace OCA\AdminGroupManager\Middleware;
1010

11-
use OCA\AdminGroupManager\Controller\AEnvironmentAwareController;
11+
use OCA\AdminGroupManager\Controller\AEnvironmentAwareOCSController;
1212
use OCA\AdminGroupManager\Controller\Attribute\RestrictIp;
1313
use OCP\AppFramework\Controller;
1414
use OCP\AppFramework\Http;
@@ -34,9 +34,9 @@ public function __construct(
3434
* @throws \Exception
3535
*/
3636
public function beforeController(Controller $controller, string $methodName) {
37-
if ($controller instanceof AEnvironmentAwareController) {
37+
if ($controller instanceof AEnvironmentAwareOCSController) {
3838
$apiVersion = $this->request->getParam('apiVersion');
39-
/** @var AEnvironmentAwareController $controller */
39+
/** @var AEnvironmentAwareOCSController $controller */
4040
$controller->setAPIVersion((int)substr($apiVersion, 1));
4141
}
4242

0 commit comments

Comments
 (0)