aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Controller/TaskProcessingApiController.php27
-rw-r--r--lib/private/TaskProcessing/Manager.php34
-rw-r--r--lib/public/TaskProcessing/EShapeType.php2
3 files changed, 31 insertions, 32 deletions
diff --git a/core/Controller/TaskProcessingApiController.php b/core/Controller/TaskProcessingApiController.php
index 3bab6bf6fd2..e0c8eb90464 100644
--- a/core/Controller/TaskProcessingApiController.php
+++ b/core/Controller/TaskProcessingApiController.php
@@ -36,7 +36,6 @@ use OCP\TaskProcessing\Exception\PreConditionNotMetException;
use OCP\TaskProcessing\Exception\UnauthorizedException;
use OCP\TaskProcessing\Exception\ValidationException;
use OCP\TaskProcessing\IManager;
-use OCP\TaskProcessing\ShapeDescriptor;
use OCP\TaskProcessing\ShapeEnumValue;
use OCP\TaskProcessing\Task;
use RuntimeException;
@@ -68,30 +67,30 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
#[PublicPage]
#[ApiRoute(verb: 'GET', url: '/tasktypes', root: '/taskprocessing')]
public function taskTypes(): DataResponse {
- $taskTypes = array_map(function(array $tt) {
- $tt['inputShape'] = array_map(function($descriptor) {
+ $taskTypes = array_map(function (array $tt) {
+ $tt['inputShape'] = array_map(function ($descriptor) {
return $descriptor->jsonSerialize();
}, $tt['inputShape']);
- $tt['outputShape'] = array_map(function($descriptor) {
+ $tt['outputShape'] = array_map(function ($descriptor) {
return $descriptor->jsonSerialize();
}, $tt['outputShape']);
- $tt['optionalInputShape'] = array_map(function($descriptor) {
+ $tt['optionalInputShape'] = array_map(function ($descriptor) {
return $descriptor->jsonSerialize();
}, $tt['optionalInputShape']);
- $tt['optionalOutputShape'] = array_map(function($descriptor) {
+ $tt['optionalOutputShape'] = array_map(function ($descriptor) {
return $descriptor->jsonSerialize();
}, $tt['optionalOutputShape']);
- $tt['inputShapeEnumValues'] = array_map(function(array $enumValues) {
- return array_map(fn(ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
+ $tt['inputShapeEnumValues'] = array_map(function (array $enumValues) {
+ return array_map(fn (ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
}, $tt['inputShapeEnumValues']);
- $tt['optionalInputShapeEnumValues'] = array_map(function(array $enumValues) {
- return array_map(fn(ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
+ $tt['optionalInputShapeEnumValues'] = array_map(function (array $enumValues) {
+ return array_map(fn (ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
}, $tt['optionalInputShapeEnumValues']);
- $tt['outputShapeEnumValues'] = array_map(function(array $enumValues) {
- return array_map(fn(ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
+ $tt['outputShapeEnumValues'] = array_map(function (array $enumValues) {
+ return array_map(fn (ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
}, $tt['outputShapeEnumValues']);
- $tt['optionalOutputShapeEnumValues'] = array_map(function(array $enumValues) {
- return array_map(fn(ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
+ $tt['optionalOutputShapeEnumValues'] = array_map(function (array $enumValues) {
+ return array_map(fn (ShapeEnumValue $enumValue) => $enumValue->jsonSerialize(), $enumValues);
}, $tt['optionalOutputShapeEnumValues']);
return $tt;
}, $this->taskProcessingManager->getAvailableTaskTypes());
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php
index f62e264ea69..c0ca1b66b49 100644
--- a/lib/private/TaskProcessing/Manager.php
+++ b/lib/private/TaskProcessing/Manager.php
@@ -78,23 +78,23 @@ class Manager implements IManager {
private IAppData $appData;
public function __construct(
- private IConfig $config,
- private Coordinator $coordinator,
- private IServerContainer $serverContainer,
- private LoggerInterface $logger,
- private TaskMapper $taskMapper,
- private IJobList $jobList,
- private IEventDispatcher $dispatcher,
- IAppDataFactory $appDataFactory,
- private IRootFolder $rootFolder,
- private \OCP\TextProcessing\IManager $textProcessingManager,
- private \OCP\TextToImage\IManager $textToImageManager,
- private \OCP\SpeechToText\ISpeechToTextManager $speechToTextManager,
- private IUserMountCache $userMountCache,
- private IClientService $clientService,
- private IAppManager $appManager,
- ) {
- $this->appData = $appDataFactory->get('core');
+ private IConfig $config,
+ private Coordinator $coordinator,
+ private IServerContainer $serverContainer,
+ private LoggerInterface $logger,
+ private TaskMapper $taskMapper,
+ private IJobList $jobList,
+ private IEventDispatcher $dispatcher,
+ IAppDataFactory $appDataFactory,
+ private IRootFolder $rootFolder,
+ private \OCP\TextProcessing\IManager $textProcessingManager,
+ private \OCP\TextToImage\IManager $textToImageManager,
+ private \OCP\SpeechToText\ISpeechToTextManager $speechToTextManager,
+ private IUserMountCache $userMountCache,
+ private IClientService $clientService,
+ private IAppManager $appManager,
+ ) {
+ $this->appData = $appDataFactory->get('core');
}
diff --git a/lib/public/TaskProcessing/EShapeType.php b/lib/public/TaskProcessing/EShapeType.php
index 504f1672100..57054432634 100644
--- a/lib/public/TaskProcessing/EShapeType.php
+++ b/lib/public/TaskProcessing/EShapeType.php
@@ -46,7 +46,7 @@ enum EShapeType: int {
return;
}
}
- throw new ValidationException('Wrong value given for Enum slot. Got "' . $value . '", but expected one of the provided enum values: "' . implode('", "', array_map(fn($enumValue) => $enumValue->getValue(), $enumValues)) . '"');
+ throw new ValidationException('Wrong value given for Enum slot. Got "' . $value . '", but expected one of the provided enum values: "' . implode('", "', array_map(fn ($enumValue) => $enumValue->getValue(), $enumValues)) . '"');
}
/**