summaryrefslogtreecommitdiffstats
path: root/core/Command/Group
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Group')
-rw-r--r--core/Command/Group/Add.php2
-rw-r--r--core/Command/Group/AddUser.php3
-rw-r--r--core/Command/Group/Delete.php3
-rw-r--r--core/Command/Group/ListCommand.php3
-rw-r--r--core/Command/Group/RemoveUser.php3
5 files changed, 9 insertions, 5 deletions
diff --git a/core/Command/Group/Add.php b/core/Command/Group/Add.php
index 1469968d2fc..14b733f9af1 100644
--- a/core/Command/Group/Add.php
+++ b/core/Command/Group/Add.php
@@ -65,7 +65,7 @@ class Add extends Base {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$gid = $input->getArgument('groupid');
$group = $this->groupManager->get($gid);
if ($group) {
diff --git a/core/Command/Group/AddUser.php b/core/Command/Group/AddUser.php
index 5cbcbf10145..c941c90d1bc 100644
--- a/core/Command/Group/AddUser.php
+++ b/core/Command/Group/AddUser.php
@@ -61,7 +61,7 @@ class AddUser extends Base {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$group = $this->groupManager->get($input->getArgument('group'));
if (is_null($group)) {
$output->writeln('<error>group not found</error>');
@@ -73,5 +73,6 @@ class AddUser extends Base {
return 1;
}
$group->addUser($user);
+ return 0;
}
}
diff --git a/core/Command/Group/Delete.php b/core/Command/Group/Delete.php
index 948665585d6..010fb556408 100644
--- a/core/Command/Group/Delete.php
+++ b/core/Command/Group/Delete.php
@@ -55,7 +55,7 @@ class Delete extends Base {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$gid = $input->getArgument('groupid');
if ($gid === 'admin') {
$output->writeln('<error>Group "' . $gid . '" could not be deleted.</error>');
@@ -72,5 +72,6 @@ class Delete extends Base {
$output->writeln('<error>Group "' . $gid . '" could not be deleted. Please check the logs.</error>');
return 1;
}
+ return 0;
}
}
diff --git a/core/Command/Group/ListCommand.php b/core/Command/Group/ListCommand.php
index 09b91cce3bc..d8f11ed5b72 100644
--- a/core/Command/Group/ListCommand.php
+++ b/core/Command/Group/ListCommand.php
@@ -67,9 +67,10 @@ class ListCommand extends Base {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$groups = $this->groupManager->search('', (int)$input->getOption('limit'), (int)$input->getOption('offset'));
$this->writeArrayInOutputFormat($input, $output, $this->formatGroups($groups));
+ return 0;
}
/**
diff --git a/core/Command/Group/RemoveUser.php b/core/Command/Group/RemoveUser.php
index 1401e70458a..f00853279f3 100644
--- a/core/Command/Group/RemoveUser.php
+++ b/core/Command/Group/RemoveUser.php
@@ -61,7 +61,7 @@ class RemoveUser extends Base {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$group = $this->groupManager->get($input->getArgument('group'));
if (is_null($group)) {
$output->writeln('<error>group not found</error>');
@@ -73,5 +73,6 @@ class RemoveUser extends Base {
return 1;
}
$group->removeUser($user);
+ return 0;
}
}