Console.php 597 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\AdminAudit\Actions;
  8. class Console extends Action {
  9. /**
  10. * @param array $arguments
  11. */
  12. public function runCommand(array $arguments): void {
  13. if (!isset($arguments[1]) || $arguments[1] === '_completion') {
  14. // Don't log autocompletion
  15. return;
  16. }
  17. // Remove `./occ`
  18. array_shift($arguments);
  19. $this->log('Console command executed: %s',
  20. ['arguments' => implode(' ', $arguments)],
  21. ['arguments']
  22. );
  23. }
  24. }