]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore: rename Index.php to ListWebhooks.php
authorCôme Chilliet <come.chilliet@nextcloud.com>
Thu, 6 Jun 2024 09:06:58 +0000 (11:06 +0200)
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>
Tue, 11 Jun 2024 12:10:29 +0000 (14:10 +0200)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/webhooks/appinfo/info.xml
apps/webhooks/composer/composer/autoload_classmap.php
apps/webhooks/composer/composer/autoload_static.php
apps/webhooks/lib/Command/Index.php [deleted file]
apps/webhooks/lib/Command/ListWebhooks.php [new file with mode: 0644]

index 6b9a809dba0df81b23147b661f852dadacacef96..4bc0a99931071f8a7be2b28ade08ee40dd595797 100644 (file)
@@ -24,7 +24,7 @@
        </dependencies>
 
        <commands>
-               <command>OCA\Webhooks\Command\Index</command>
+               <command>OCA\Webhooks\Command\ListWebhooks</command>
        </commands>
 
        <settings>
index 3ac7eb7e7024ebe733f5c8030cff44197cceb637..bc6625e3c93a9b376d915c2905c1d75f3b5768b1 100644 (file)
@@ -9,7 +9,7 @@ return array(
     'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
     'OCA\\Webhooks\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
     'OCA\\Webhooks\\BackgroundJobs\\WebhookCall' => $baseDir . '/../lib/BackgroundJobs/WebhookCall.php',
-    'OCA\\Webhooks\\Command\\Index' => $baseDir . '/../lib/Command/Index.php',
+    'OCA\\Webhooks\\Command\\ListWebhooks' => $baseDir . '/../lib/Command/ListWebhooks.php',
     'OCA\\Webhooks\\Controller\\WebhooksController' => $baseDir . '/../lib/Controller/WebhooksController.php',
     'OCA\\Webhooks\\Db\\AuthMethod' => $baseDir . '/../lib/Db/AuthMethod.php',
     'OCA\\Webhooks\\Db\\WebhookListener' => $baseDir . '/../lib/Db/WebhookListener.php',
index 788787644d726945b956fb192365a13cd537f437..d06810391ec16300b48f9d378b7d87c3ac6f4d22 100644 (file)
@@ -24,7 +24,7 @@ class ComposerStaticInitWebhooks
         'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
         'OCA\\Webhooks\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
         'OCA\\Webhooks\\BackgroundJobs\\WebhookCall' => __DIR__ . '/..' . '/../lib/BackgroundJobs/WebhookCall.php',
-        'OCA\\Webhooks\\Command\\Index' => __DIR__ . '/..' . '/../lib/Command/Index.php',
+        'OCA\\Webhooks\\Command\\ListWebhooks' => __DIR__ . '/..' . '/../lib/Command/ListWebhooks.php',
         'OCA\\Webhooks\\Controller\\WebhooksController' => __DIR__ . '/..' . '/../lib/Controller/WebhooksController.php',
         'OCA\\Webhooks\\Db\\AuthMethod' => __DIR__ . '/..' . '/../lib/Db/AuthMethod.php',
         'OCA\\Webhooks\\Db\\WebhookListener' => __DIR__ . '/..' . '/../lib/Db/WebhookListener.php',
diff --git a/apps/webhooks/lib/Command/Index.php b/apps/webhooks/lib/Command/Index.php
deleted file mode 100644 (file)
index 4457e95..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-namespace OCA\Webhooks\Command;
-
-use OC\Core\Command\Base;
-use OCA\Webhooks\Db\WebhookListener;
-use OCA\Webhooks\Db\WebhookListenerMapper;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-class Index extends Base {
-       public function __construct(
-               private WebhookListenerMapper $mapper,
-       ) {
-               parent::__construct();
-       }
-
-       protected function configure(): void {
-               parent::configure();
-               $this
-                       ->setName('webhooks:list')
-                       ->setDescription('Lists configured webhooks');
-       }
-
-       protected function execute(InputInterface $input, OutputInterface $output): int {
-               $webhookListeners = array_map(
-                       fn (WebhookListener $listener): array => array_map(
-                               fn (string|array|null $value): ?string => (is_array($value) ? json_encode($value) : $value),
-                               $listener->jsonSerialize()
-                       ),
-                       $this->mapper->getAll()
-               );
-               $this->writeTableInOutputFormat($input, $output, $webhookListeners);
-               return static::SUCCESS;
-       }
-}
diff --git a/apps/webhooks/lib/Command/ListWebhooks.php b/apps/webhooks/lib/Command/ListWebhooks.php
new file mode 100644 (file)
index 0000000..c8cca6f
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\Webhooks\Command;
+
+use OC\Core\Command\Base;
+use OCA\Webhooks\Db\WebhookListener;
+use OCA\Webhooks\Db\WebhookListenerMapper;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class ListWebhooks extends Base {
+       public function __construct(
+               private WebhookListenerMapper $mapper,
+       ) {
+               parent::__construct();
+       }
+
+       protected function configure(): void {
+               parent::configure();
+               $this
+                       ->setName('webhooks:list')
+                       ->setDescription('Lists configured webhooks');
+       }
+
+       protected function execute(InputInterface $input, OutputInterface $output): int {
+               $webhookListeners = array_map(
+                       fn (WebhookListener $listener): array => array_map(
+                               fn (string|array|null $value): ?string => (is_array($value) ? json_encode($value) : $value),
+                               $listener->jsonSerialize()
+                       ),
+                       $this->mapper->getAll()
+               );
+               $this->writeTableInOutputFormat($input, $output, $webhookListeners);
+               return static::SUCCESS;
+       }
+}