aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Command
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2024-02-08 15:31:19 +0100
committerLouis Chemineau <louis@chmn.me>2024-02-08 15:31:19 +0100
commit898df41de968321926e10ad532a64c3915ddad29 (patch)
tree57a0e5ada151890ddf71550f22b502e1f67aeffd /lib/private/Command
parentd9d60238c7aaab9c61bf2d50c15aa59bc88c8975 (diff)
downloadnextcloud-server-898df41de968321926e10ad532a64c3915ddad29.tar.gz
nextcloud-server-898df41de968321926e10ad532a64c3915ddad29.zip
Revert "Merge branch 'master' of github.com:nextcloud/server"
This reverts commit d9d60238c7aaab9c61bf2d50c15aa59bc88c8975, reversing changes made to ba3fdb0cdcfbb84f0080a2146a4ba2f01569915d.
Diffstat (limited to 'lib/private/Command')
-rw-r--r--lib/private/Command/CallableJob.php2
-rw-r--r--lib/private/Command/ClosureJob.php2
-rw-r--r--lib/private/Command/CommandJob.php2
-rw-r--r--lib/private/Command/CronBus.php28
4 files changed, 20 insertions, 14 deletions
diff --git a/lib/private/Command/CallableJob.php b/lib/private/Command/CallableJob.php
index 7f515660955..8bb3c76c9af 100644
--- a/lib/private/Command/CallableJob.php
+++ b/lib/private/Command/CallableJob.php
@@ -21,7 +21,7 @@
*/
namespace OC\Command;
-use OCP\BackgroundJob\QueuedJob;
+use OC\BackgroundJob\QueuedJob;
class CallableJob extends QueuedJob {
protected function run($serializedCallable) {
diff --git a/lib/private/Command/ClosureJob.php b/lib/private/Command/ClosureJob.php
index 3e0fe73b029..f7b0ee1a3d3 100644
--- a/lib/private/Command/ClosureJob.php
+++ b/lib/private/Command/ClosureJob.php
@@ -23,7 +23,7 @@
namespace OC\Command;
use Laravel\SerializableClosure\SerializableClosure as LaravelClosure;
-use OCP\BackgroundJob\QueuedJob;
+use OC\BackgroundJob\QueuedJob;
class ClosureJob extends QueuedJob {
protected function run($argument) {
diff --git a/lib/private/Command/CommandJob.php b/lib/private/Command/CommandJob.php
index 368d264f3bb..e34ffe9440b 100644
--- a/lib/private/Command/CommandJob.php
+++ b/lib/private/Command/CommandJob.php
@@ -22,7 +22,7 @@
*/
namespace OC\Command;
-use OCP\BackgroundJob\QueuedJob;
+use OC\BackgroundJob\QueuedJob;
use OCP\Command\ICommand;
/**
diff --git a/lib/private/Command/CronBus.php b/lib/private/Command/CronBus.php
index 495cd011db1..42ff458a95c 100644
--- a/lib/private/Command/CronBus.php
+++ b/lib/private/Command/CronBus.php
@@ -26,25 +26,31 @@
namespace OC\Command;
use Laravel\SerializableClosure\SerializableClosure;
-use OCP\BackgroundJob\IJob;
-use OCP\BackgroundJob\IJobList;
use OCP\Command\ICommand;
class CronBus extends AsyncBus {
- public function __construct(
- private IJobList $jobList,
- ) {
+ /**
+ * @var \OCP\BackgroundJob\IJobList
+ */
+ private $jobList;
+
+
+ /**
+ * @param \OCP\BackgroundJob\IJobList $jobList
+ */
+ public function __construct($jobList) {
+ $this->jobList = $jobList;
}
- protected function queueCommand($command): void {
+ protected function queueCommand($command) {
$this->jobList->add($this->getJobClass($command), $this->serializeCommand($command));
}
/**
- * @param ICommand|callable $command
- * @return class-string<IJob>
+ * @param \OCP\Command\ICommand | callable $command
+ * @return string
*/
- private function getJobClass($command): string {
+ private function getJobClass($command) {
if ($command instanceof \Closure) {
return ClosureJob::class;
} elseif (is_callable($command)) {
@@ -57,10 +63,10 @@ class CronBus extends AsyncBus {
}
/**
- * @param ICommand|callable $command
+ * @param \OCP\Command\ICommand | callable $command
* @return string
*/
- private function serializeCommand($command): string {
+ private function serializeCommand($command) {
if ($command instanceof \Closure) {
return serialize(new SerializableClosure($command));
} elseif (is_callable($command) or $command instanceof ICommand) {