mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix: Run cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
17486ad15b
commit
ee7592ffdd
4 changed files with 15 additions and 15 deletions
|
|
@ -25,9 +25,9 @@ declare(strict_types=1);
|
|||
*/
|
||||
namespace OC\Repair;
|
||||
|
||||
use OC\TaskProcessing\RemoveOldTasksBackgroundJob;
|
||||
use OC\TextProcessing\RemoveOldTasksBackgroundJob as RemoveOldTextProcessingTasksBackgroundJob;
|
||||
use OC\TextToImage\RemoveOldTasksBackgroundJob as RemoveOldTextToImageTasksBackgroundJob;
|
||||
use OC\TaskProcessing\RemoveOldTasksBackgroundJob;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\IRepairStep;
|
||||
|
|
|
|||
|
|
@ -4,18 +4,7 @@ namespace OC\TaskProcessing;
|
|||
|
||||
use OC\TaskProcessing\Db\TaskMapper;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\BackgroundJob\QueuedJob;
|
||||
use OCP\BackgroundJob\TimedJob;
|
||||
use OCP\Files\GenericFileException;
|
||||
use OCP\Files\NotPermittedException;
|
||||
use OCP\Lock\LockedException;
|
||||
use OCP\TaskProcessing\Exception\Exception;
|
||||
use OCP\TaskProcessing\Exception\NotFoundException;
|
||||
use OCP\TaskProcessing\Exception\ProcessingException;
|
||||
use OCP\TaskProcessing\Exception\ValidationException;
|
||||
use OCP\TaskProcessing\IManager;
|
||||
use OCP\TaskProcessing\ISynchronousProvider;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class RemoveOldTasksBackgroundJob extends TimedJob {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace OCP\TaskProcessing;
|
|||
* Data object for input output shape entries
|
||||
* @since 30.0.0
|
||||
*/
|
||||
class ShapeDescriptor {
|
||||
class ShapeDescriptor implements \JsonSerializable {
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $description
|
||||
|
|
@ -43,4 +43,15 @@ class ShapeDescriptor {
|
|||
public function getShapeType(): EShapeType {
|
||||
return $this->shapeType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{name: string, description: string, type: int}
|
||||
*/
|
||||
public function jsonSerialize(): array {
|
||||
return [
|
||||
'name' => $this->getName(),
|
||||
'description' => $this->getDescription(),
|
||||
'type' => $this->getShapeType()->value,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -466,8 +466,8 @@ class TaskProcessingTest extends \Test\TestCase {
|
|||
public function testOldTasksShouldBeCleanedUp() {
|
||||
$currentTime = new \DateTime('now');
|
||||
$timeFactory = $this->createMock(ITimeFactory::class);
|
||||
$timeFactory->expects($this->any())->method('getDateTime')->willReturnCallback(fn() => $currentTime);
|
||||
$timeFactory->expects($this->any())->method('getTime')->willReturnCallback(fn() => $currentTime->getTimestamp());
|
||||
$timeFactory->expects($this->any())->method('getDateTime')->willReturnCallback(fn () => $currentTime);
|
||||
$timeFactory->expects($this->any())->method('getTime')->willReturnCallback(fn () => $currentTime->getTimestamp());
|
||||
|
||||
$this->taskMapper = new TaskMapper(
|
||||
\OCP\Server::get(IDBConnection::class),
|
||||
|
|
|
|||
Loading…
Reference in a new issue