diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 3fec8cffb..050e93c7c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -21,6 +21,7 @@ 'phpdoc_separation' => ['skip_unlisted_annotations' => true], 'native_function_invocation' => ['include' => ['@all']], 'no_unused_imports' => true, + 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], ]) ->setRiskyAllowed(true) ->setFinder($finder) diff --git a/EMS/client-helper-bundle/src/Contracts/Elasticsearch/ClientRequestInterface.php b/EMS/client-helper-bundle/src/Contracts/Elasticsearch/ClientRequestInterface.php index 46441caf8..6e4e8d30d 100644 --- a/EMS/client-helper-bundle/src/Contracts/Elasticsearch/ClientRequestInterface.php +++ b/EMS/client-helper-bundle/src/Contracts/Elasticsearch/ClientRequestInterface.php @@ -11,7 +11,7 @@ interface ClientRequestInterface { public function getCacheKey(string $prefix = '', string $environment = null): string; - public function getContentType(string $name, ?Environment $environment = null): ?ContentTypeInterface; + public function getContentType(string $name, Environment $environment = null): ?ContentTypeInterface; /** * @return array diff --git a/EMS/client-helper-bundle/src/Controller/EmbedController.php b/EMS/client-helper-bundle/src/Controller/EmbedController.php index ec87c9cfc..e0346254a 100644 --- a/EMS/client-helper-bundle/src/Controller/EmbedController.php +++ b/EMS/client-helper-bundle/src/Controller/EmbedController.php @@ -25,7 +25,7 @@ public function __construct(ClientRequestManager $manager, private readonly Cach * @param string[] $sourceFields * @param array $args */ - public function renderHierarchyAction(string $template, string $parent, string $field, int $depth = null, array $sourceFields = [], array $args = [], ?string $cacheType = null): Response + public function renderHierarchyAction(string $template, string $parent, string $field, int $depth = null, array $sourceFields = [], array $args = [], string $cacheType = null): Response { $cacheKey = [ 'EMSCH_Hierarchy', @@ -55,7 +55,7 @@ public function renderHierarchyAction(string $template, string $parent, string $ * @param array $args * @param string[] $sourceExclude */ - public function renderBlockAction(null|string|array $searchType, array $body, string $template, array $args = [], int $from = 0, int $size = 10, ?string $cacheType = null, array $sourceExclude = []): Response + public function renderBlockAction(null|string|array $searchType, array $body, string $template, array $args = [], int $from = 0, int $size = 10, string $cacheType = null, array $sourceExclude = []): Response { $cacheKey = [ 'EMSCH_Block', diff --git a/EMS/client-helper-bundle/src/DependencyInjection/EMSClientHelperExtension.php b/EMS/client-helper-bundle/src/DependencyInjection/EMSClientHelperExtension.php index cfab87919..6adf15f96 100644 --- a/EMS/client-helper-bundle/src/DependencyInjection/EMSClientHelperExtension.php +++ b/EMS/client-helper-bundle/src/DependencyInjection/EMSClientHelperExtension.php @@ -17,9 +17,6 @@ final class EMSClientHelperExtension extends Extension { - /** - * {@inheritDoc} - */ public function load(array $configs, ContainerBuilder $container): void { $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); diff --git a/EMS/client-helper-bundle/src/Helper/Api/ApiService.php b/EMS/client-helper-bundle/src/Helper/Api/ApiService.php index 846795a49..6035f7f93 100644 --- a/EMS/client-helper-bundle/src/Helper/Api/ApiService.php +++ b/EMS/client-helper-bundle/src/Helper/Api/ApiService.php @@ -127,7 +127,7 @@ public function getContentTypes(string $apiName): Response /** * @param array $filter */ - public function getContentType(string $apiName, string $contentType, array $filter = [], int $size = 10, ?string $scrollId = null): Response + public function getContentType(string $apiName, string $contentType, array $filter = [], int $size = 10, string $scrollId = null): Response { $response = new Response(); diff --git a/EMS/client-helper-bundle/src/Helper/Api/Client.php b/EMS/client-helper-bundle/src/Helper/Api/Client.php index 40918c803..5df326fc5 100644 --- a/EMS/client-helper-bundle/src/Helper/Api/Client.php +++ b/EMS/client-helper-bundle/src/Helper/Api/Client.php @@ -31,7 +31,7 @@ public function getName(): string * * @return array */ - public function createDraft(string $type, array $body, ?string $ouuid = null): array + public function createDraft(string $type, array $body, string $ouuid = null): array { @\trigger_error('Deprecated use the initNewDocument or initNewDraftRevision functions', E_USER_DEPRECATED); @@ -43,7 +43,7 @@ public function createDraft(string $type, array $body, ?string $ouuid = null): a * * @return array */ - public function initNewDocument(string $type, array $body, ?string $ouuid = null): array + public function initNewDocument(string $type, array $body, string $ouuid = null): array { if (null === $ouuid) { $url = \sprintf('api/data/%s/draft', $type); @@ -101,7 +101,7 @@ public function discardDraft(string $type, int $revisionId) /** * @return array */ - public function postFile(\SplFileInfo $file, ?string $forcedFilename = null): array + public function postFile(\SplFileInfo $file, string $forcedFilename = null): array { $response = $this->client->post('api/file/upload', [ 'multipart' => [ diff --git a/EMS/client-helper-bundle/src/Helper/ContentType/ContentType.php b/EMS/client-helper-bundle/src/Helper/ContentType/ContentType.php index 8d3b9620f..382af1a9e 100644 --- a/EMS/client-helper-bundle/src/Helper/ContentType/ContentType.php +++ b/EMS/client-helper-bundle/src/Helper/ContentType/ContentType.php @@ -11,7 +11,7 @@ final class ContentType implements ContentTypeInterface { private \DateTimeImmutable $lastPublished; /** @var mixed */ - private $cache = null; + private $cache; public function __construct(private readonly Environment $environment, private readonly string $name, private readonly int $total) { @@ -33,9 +33,6 @@ public function isLastPublishedAfterTime(int $timestamp): bool return $this->lastPublished->getTimestamp() <= $timestamp; } - /** - * {@inheritDoc} - */ public function getCacheValidityTag(): string { return \sprintf('%d_%d', $this->getLastPublished()->getTimestamp(), $this->total); diff --git a/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequest.php b/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequest.php index c9101fbf5..027dae68e 100644 --- a/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequest.php +++ b/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequest.php @@ -274,7 +274,7 @@ public function getSettings(Environment $environment, bool $cache = true): Setti return $settings; } - public function getContentType(string $name, ?Environment $environment = null): ?ContentType + public function getContentType(string $name, Environment $environment = null): ?ContentType { if (null === $environment) { if (null === $currentEnvironment = $this->getCurrentEnvironment()) { @@ -369,7 +369,7 @@ public static function getType(string $emsLink): ?string * * @return array */ - public function search(null|string|array $type, array $body, int $from = 0, int $size = 10, array $sourceExclude = [], ?string $regex = null, string $index = null) + public function search(null|string|array $type, array $body, int $from = 0, int $size = 10, array $sourceExclude = [], string $regex = null, string $index = null) { if (null === $type) { $types = []; @@ -407,7 +407,7 @@ public function search(null|string|array $type, array $body, int $from = 0, int /** * @param string[] $types */ - public function initializeCommonSearch(array $types, ?AbstractQuery $query = null): Search + public function initializeCommonSearch(array $types, AbstractQuery $query = null): Search { $query = $this->elasticaService->filterByContentTypes($query, $types); @@ -477,7 +477,7 @@ public function searchBy(string $type, array $parameters, int $from = 0, int $si * * @return array{_id: string, _type?: string, _source: array} */ - public function searchOne(null|string|array $type, array $body, ?string $indexRegex = null): array + public function searchOne(null|string|array $type, array $body, string $indexRegex = null): array { $this->logger->debug('ClientRequest : searchOne for {type}', ['type' => $type, 'body' => $body, 'indexRegex' => $indexRegex]); $search = $this->search($type, $body, 0, 2, [], $indexRegex); diff --git a/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequestRuntime.php b/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequestRuntime.php index 350e49cce..de20db433 100644 --- a/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequestRuntime.php +++ b/EMS/client-helper-bundle/src/Helper/Elasticsearch/ClientRequestRuntime.php @@ -39,7 +39,7 @@ public function __construct( * * @return array */ - public function search(null|string|array $type, array $body, int $from = 0, int $size = 10, array $sourceExclude = [], ?string $regex = null, ?string $index = null): array + public function search(null|string|array $type, array $body, int $from = 0, int $size = 10, array $sourceExclude = [], string $regex = null, string $index = null): array { $client = $this->manager->getDefault(); @@ -50,7 +50,7 @@ public function search(null|string|array $type, array $body, int $from = 0, int * @param string|string[]|null $type * @param array $body */ - public function searchOne(null|string|array $type, array $body, ?string $indexRegex = null): DocumentInterface + public function searchOne(null|string|array $type, array $body, string $indexRegex = null): DocumentInterface { try { return Document::fromArray($this->manager->getDefault()->searchOne($type, $body, $indexRegex)); diff --git a/EMS/client-helper-bundle/src/Helper/Environment/EnvironmentHelper.php b/EMS/client-helper-bundle/src/Helper/Environment/EnvironmentHelper.php index 7bf522dd6..b2f313a07 100644 --- a/EMS/client-helper-bundle/src/Helper/Environment/EnvironmentHelper.php +++ b/EMS/client-helper-bundle/src/Helper/Environment/EnvironmentHelper.php @@ -27,9 +27,6 @@ public function __construct( } } - /** - * {@inheritDoc} - */ public function addEnvironment(string $name, array $config): void { if ($this->emschEnv && !isset($config[Environment::DEFAULT])) { diff --git a/EMS/client-helper-bundle/src/Helper/Routing/BaseRouter.php b/EMS/client-helper-bundle/src/Helper/Routing/BaseRouter.php index 03dea7cf5..3cb1a4e27 100644 --- a/EMS/client-helper-bundle/src/Helper/Routing/BaseRouter.php +++ b/EMS/client-helper-bundle/src/Helper/Routing/BaseRouter.php @@ -19,17 +19,11 @@ abstract class BaseRouter implements RouterInterface, RequestMatcherInterface protected ?UrlMatcher $matcher = null; protected ?UrlGenerator $generator = null; - /** - * {@inheritdoc} - */ public function getContext(): RequestContext { return $this->context; } - /** - * {@inheritdoc} - */ public function setContext(RequestContext $context): void { $this->context = $context; diff --git a/EMS/client-helper-bundle/src/Helper/Routing/Route.php b/EMS/client-helper-bundle/src/Helper/Routing/Route.php index 01da04887..4121b732e 100644 --- a/EMS/client-helper-bundle/src/Helper/Routing/Route.php +++ b/EMS/client-helper-bundle/src/Helper/Routing/Route.php @@ -47,7 +47,7 @@ public static function fromData(string $name, array $data): self /** * @param string[] $locales */ - public function addToCollection(RouteCollection $collection, array $locales = [], ?string $prefix = null): void + public function addToCollection(RouteCollection $collection, array $locales = [], string $prefix = null): void { $path = $this->options['path']; @@ -66,7 +66,7 @@ public function addToCollection(RouteCollection $collection, array $locales = [] } } - private function createRoute(string $path, ?string $locale = null): SymfonyRoute + private function createRoute(string $path, string $locale = null): SymfonyRoute { $defaults = $this->options['defaults']; diff --git a/EMS/client-helper-bundle/src/Helper/Search/Filter.php b/EMS/client-helper-bundle/src/Helper/Search/Filter.php index 7df175928..f2400c21b 100644 --- a/EMS/client-helper-bundle/src/Helper/Search/Filter.php +++ b/EMS/client-helper-bundle/src/Helper/Search/Filter.php @@ -192,7 +192,7 @@ public function handleRequest(Request $request): void * @param array $aggregation * @param string[] $types */ - public function handleAggregation(array $aggregation, array $types = [], ?AbstractQuery $queryFilters = null): void + public function handleAggregation(array $aggregation, array $types = [], AbstractQuery $queryFilters = null): void { $this->queryTypes = $types; $this->queryFilters = $queryFilters; diff --git a/EMS/client-helper-bundle/src/Twig/RoutingRuntime.php b/EMS/client-helper-bundle/src/Twig/RoutingRuntime.php index f937814fa..baed28869 100644 --- a/EMS/client-helper-bundle/src/Twig/RoutingRuntime.php +++ b/EMS/client-helper-bundle/src/Twig/RoutingRuntime.php @@ -27,7 +27,7 @@ public function createUrl(string $relativePath, string $path, array $parameters return $url; } - public function transform(string $content, ?string $locale = null, ?string $baseUrl = null): string + public function transform(string $content, string $locale = null, string $baseUrl = null): string { return $this->transformer->transform($content, ['locale' => $locale, 'baseUrl' => $baseUrl]); } diff --git a/EMS/common-bundle/src/Common/Command/AbstractCommand.php b/EMS/common-bundle/src/Common/Command/AbstractCommand.php index 6d48d13a1..32b453df6 100644 --- a/EMS/common-bundle/src/Common/Command/AbstractCommand.php +++ b/EMS/common-bundle/src/Common/Command/AbstractCommand.php @@ -165,7 +165,7 @@ protected function getOptionBool(string $name): bool return true === $this->input->getOption($name); } - protected function getOptionInt(string $name, ?int $default = null): int + protected function getOptionInt(string $name, int $default = null): int { if (null !== $option = $this->input->getOption($name)) { return \intval($option); @@ -178,7 +178,7 @@ protected function getOptionInt(string $name, ?int $default = null): int return $default; } - protected function getOptionFloat(string $name, ?float $default = null): float + protected function getOptionFloat(string $name, float $default = null): float { if (null !== $option = $this->input->getOption($name)) { return \floatval($option); @@ -206,7 +206,7 @@ protected function getOptionIntNull(string $name): ?int return null === $option ? null : \intval($option); } - protected function getOptionString(string $name, ?string $default = null): string + protected function getOptionString(string $name, string $default = null): string { if (null !== $option = $this->input->getOption($name)) { return \strval($option); diff --git a/EMS/common-bundle/src/Common/CoreApi/Endpoint/Admin/Admin.php b/EMS/common-bundle/src/Common/CoreApi/Endpoint/Admin/Admin.php index 67837f69a..fb35796ed 100644 --- a/EMS/common-bundle/src/Common/CoreApi/Endpoint/Admin/Admin.php +++ b/EMS/common-bundle/src/Common/CoreApi/Endpoint/Admin/Admin.php @@ -85,7 +85,7 @@ public function getContentTypes(): array return $contentTypes; } - public function runCommand(string $command, ?OutputInterface $output = null): void + public function runCommand(string $command, OutputInterface $output = null): void { $job = [ 'class' => 'EMS\\CoreBundle\\Entity\\Job', diff --git a/EMS/common-bundle/src/Common/CoreApi/Endpoint/Data/Data.php b/EMS/common-bundle/src/Common/CoreApi/Endpoint/Data/Data.php index 5d04685fa..3676aa137 100644 --- a/EMS/common-bundle/src/Common/CoreApi/Endpoint/Data/Data.php +++ b/EMS/common-bundle/src/Common/CoreApi/Endpoint/Data/Data.php @@ -23,7 +23,7 @@ public function __construct(private readonly Client $client, string $contentType /** * @param array $rawData */ - public function create(array $rawData, ?string $ouuid = null): DraftInterface + public function create(array $rawData, string $ouuid = null): DraftInterface { $resource = $this->makeResource('create', $ouuid); diff --git a/EMS/common-bundle/src/Common/CoreApi/Endpoint/File/File.php b/EMS/common-bundle/src/Common/CoreApi/Endpoint/File/File.php index 3e761bfa1..0966e4796 100644 --- a/EMS/common-bundle/src/Common/CoreApi/Endpoint/File/File.php +++ b/EMS/common-bundle/src/Common/CoreApi/Endpoint/File/File.php @@ -62,7 +62,7 @@ public function uploadContents(string $contents, string $filename, string $mimeT return $hash; } - public function uploadFile(string $realPath, ?string $mimeType = null, ?string $filename = null, ?callable $callback = null): string + public function uploadFile(string $realPath, string $mimeType = null, string $filename = null, callable $callback = null): string { $hash = $this->hashFile($realPath); diff --git a/EMS/common-bundle/src/Common/CoreApi/Endpoint/Search/Search.php b/EMS/common-bundle/src/Common/CoreApi/Endpoint/Search/Search.php index 456040478..9067f6aea 100644 --- a/EMS/common-bundle/src/Common/CoreApi/Endpoint/Search/Search.php +++ b/EMS/common-bundle/src/Common/CoreApi/Endpoint/Search/Search.php @@ -62,7 +62,7 @@ public function healthStatus(): string return $status; } - public function refresh(?string $index = null): bool + public function refresh(string $index = null): bool { $success = $this->client->post('/api/search/refresh', [ 'index' => $index, diff --git a/EMS/common-bundle/src/Common/CoreApi/TokenStore.php b/EMS/common-bundle/src/Common/CoreApi/TokenStore.php index d08951ed6..fe8ce5965 100644 --- a/EMS/common-bundle/src/Common/CoreApi/TokenStore.php +++ b/EMS/common-bundle/src/Common/CoreApi/TokenStore.php @@ -46,7 +46,7 @@ public function giveBaseUrl(): string return $baseUrl; } - public function getToken(?string $baseUrl = null): ?string + public function getToken(string $baseUrl = null): ?string { if (null !== $baseUrl) { $cacheBaseUrl = $this->apiCacheBaseUrl(); @@ -65,7 +65,7 @@ public function getToken(?string $baseUrl = null): ?string return null; } - public function giveToken(?string $baseUrl = null): string + public function giveToken(string $baseUrl = null): string { $token = $this->getToken($baseUrl); if (null === $token) { diff --git a/EMS/common-bundle/src/Common/File/FileReader.php b/EMS/common-bundle/src/Common/File/FileReader.php index a5bd958dc..510203b9d 100644 --- a/EMS/common-bundle/src/Common/File/FileReader.php +++ b/EMS/common-bundle/src/Common/File/FileReader.php @@ -12,9 +12,6 @@ final class FileReader implements FileReaderInterface { - /** - * {@inheritDoc} - */ public function getData(string $filename, bool $skipFirstRow = false, string $encoding = null): array { $reader = IOFactory::createReaderForFile($filename); diff --git a/EMS/common-bundle/src/Common/Standard/Hash.php b/EMS/common-bundle/src/Common/Standard/Hash.php index 302bbd44f..b35322124 100644 --- a/EMS/common-bundle/src/Common/Standard/Hash.php +++ b/EMS/common-bundle/src/Common/Standard/Hash.php @@ -6,7 +6,7 @@ final class Hash { - public static function string(string $value, ?string $prefix = null): string + public static function string(string $value, string $prefix = null): string { return self::hash($value, $prefix); } @@ -14,12 +14,12 @@ public static function string(string $value, ?string $prefix = null): string /** * @param array $value */ - public static function array(array $value, ?string $prefix = null): string + public static function array(array $value, string $prefix = null): string { return self::hash(\EMS\Helpers\Standard\Json::encode($value), $prefix); } - private static function hash(string $value, ?string $prefix = null): string + private static function hash(string $value, string $prefix = null): string { return $prefix.\sha1($value); } diff --git a/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Data/DataInterface.php b/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Data/DataInterface.php index b1f985afd..c12e1d89d 100644 --- a/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Data/DataInterface.php +++ b/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Data/DataInterface.php @@ -17,7 +17,7 @@ interface DataInterface * * @throws CoreApiExceptionInterface */ - public function create(array $rawData, ?string $ouuid = null): DraftInterface; + public function create(array $rawData, string $ouuid = null): DraftInterface; /** * @throws CoreApiExceptionInterface diff --git a/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/File/FileInterface.php b/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/File/FileInterface.php index 6cdcf112c..b3c7c977f 100644 --- a/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/File/FileInterface.php +++ b/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/File/FileInterface.php @@ -22,7 +22,7 @@ public function addChunk(string $hash, string $chunk): int; public function uploadContents(string $contents, string $filename, string $mimeType): string; - public function uploadFile(string $realPath, ?string $mimeType = null, ?string $filename = null, ?callable $callback = null): string; + public function uploadFile(string $realPath, string $mimeType = null, string $filename = null, callable $callback = null): string; public function uploadStream(StreamInterface $stream, string $filename, string $mimeType): string; diff --git a/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Search/SearchInterface.php b/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Search/SearchInterface.php index a402e1c63..a8b4a817a 100644 --- a/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Search/SearchInterface.php +++ b/EMS/common-bundle/src/Contracts/CoreApi/Endpoint/Search/SearchInterface.php @@ -21,7 +21,7 @@ public function version(): string; public function healthStatus(): string; - public function refresh(?string $index = null): bool; + public function refresh(string $index = null): bool; /** * @return string[] diff --git a/EMS/common-bundle/src/Contracts/Generator/Pdf/PdfGeneratorInterface.php b/EMS/common-bundle/src/Contracts/Generator/Pdf/PdfGeneratorInterface.php index f4aea085f..e6f0e2895 100644 --- a/EMS/common-bundle/src/Contracts/Generator/Pdf/PdfGeneratorInterface.php +++ b/EMS/common-bundle/src/Contracts/Generator/Pdf/PdfGeneratorInterface.php @@ -12,7 +12,7 @@ interface PdfGeneratorInterface { public function createOptionsFromHtml(string $html): PdfPrintOptions; - public function generateResponseFromHtml(string $html, ?PdfPrintOptions $options = null): Response; + public function generateResponseFromHtml(string $html, PdfPrintOptions $options = null): Response; - public function generateStreamedResponseFromHtml(string $html, ?PdfPrintOptions $options = null): StreamedResponse; + public function generateStreamedResponseFromHtml(string $html, PdfPrintOptions $options = null): StreamedResponse; } diff --git a/EMS/common-bundle/src/DataCollector/ElasticaDataCollector.php b/EMS/common-bundle/src/DataCollector/ElasticaDataCollector.php index 0b1c1fe2b..586bac944 100644 --- a/EMS/common-bundle/src/DataCollector/ElasticaDataCollector.php +++ b/EMS/common-bundle/src/DataCollector/ElasticaDataCollector.php @@ -18,7 +18,7 @@ public function __construct( ) { } - public function collect(Request $request, Response $response, ?\Throwable $exception = null): void + public function collect(Request $request, Response $response, \Throwable $exception = null): void { $this->data['nb_queries'] = $this->logger->getNbQueries(); $this->data['queries'] = $this->logger->getQueries(); diff --git a/EMS/common-bundle/src/DependencyInjection/EMSCommonExtension.php b/EMS/common-bundle/src/DependencyInjection/EMSCommonExtension.php index 295e1c05d..59eb02849 100644 --- a/EMS/common-bundle/src/DependencyInjection/EMSCommonExtension.php +++ b/EMS/common-bundle/src/DependencyInjection/EMSCommonExtension.php @@ -15,9 +15,6 @@ class EMSCommonExtension extends Extension { - /** - * {@inheritDoc} - */ public function load(array $configs, ContainerBuilder $container): void { $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); diff --git a/EMS/common-bundle/src/Elasticsearch/Client.php b/EMS/common-bundle/src/Elasticsearch/Client.php index 0493e62e2..c7c38cc44 100644 --- a/EMS/common-bundle/src/Elasticsearch/Client.php +++ b/EMS/common-bundle/src/Elasticsearch/Client.php @@ -53,7 +53,7 @@ public function request($path, $method = Request::GET, $data = [], array $query return $response; } - public function setStopwatch(?Stopwatch $stopwatch = null): void + public function setStopwatch(Stopwatch $stopwatch = null): void { $this->stopwatch = $stopwatch; } diff --git a/EMS/common-bundle/src/Elasticsearch/ElasticaFactory.php b/EMS/common-bundle/src/Elasticsearch/ElasticaFactory.php index 9280e0ef7..1d2ea5a89 100644 --- a/EMS/common-bundle/src/Elasticsearch/ElasticaFactory.php +++ b/EMS/common-bundle/src/Elasticsearch/ElasticaFactory.php @@ -18,7 +18,7 @@ public function __construct(private readonly LoggerInterface $logger, private re /** * @param array $hosts */ - public function fromConfig(array $hosts, ?string $connectionPool = null): Client + public function fromConfig(array $hosts, string $connectionPool = null): Client { $servers = []; foreach ($hosts as $host) { diff --git a/EMS/common-bundle/src/Elasticsearch/ElasticaLogger.php b/EMS/common-bundle/src/Elasticsearch/ElasticaLogger.php index ad9a8b2ea..f658ff3f3 100644 --- a/EMS/common-bundle/src/Elasticsearch/ElasticaLogger.php +++ b/EMS/common-bundle/src/Elasticsearch/ElasticaLogger.php @@ -62,7 +62,7 @@ public function log($level, $message, array $context = []): void } } - public function logResponse(Response $response, Request $request, ?ResponseException $responseException = null): void + public function logResponse(Response $response, Request $request, ResponseException $responseException = null): void { $responseData = $response->getData(); $queryTime = $response->getQueryTime(); diff --git a/EMS/common-bundle/src/Elasticsearch/Exception/NotFoundException.php b/EMS/common-bundle/src/Elasticsearch/Exception/NotFoundException.php index 458c7920d..c3e1eff0b 100644 --- a/EMS/common-bundle/src/Elasticsearch/Exception/NotFoundException.php +++ b/EMS/common-bundle/src/Elasticsearch/Exception/NotFoundException.php @@ -8,7 +8,7 @@ class NotFoundException extends ElasticaNotFoundException { - public function __construct(?string $ouuid = null, ?string $index = null) + public function __construct(string $ouuid = null, string $index = null) { if (null !== $ouuid && null !== $index) { parent::__construct(\sprintf('Document %s not found in index/alias %s', $ouuid, $index)); diff --git a/EMS/common-bundle/src/Helper/Text/Encoder.php b/EMS/common-bundle/src/Helper/Text/Encoder.php index f2afcb866..a496e819a 100644 --- a/EMS/common-bundle/src/Helper/Text/Encoder.php +++ b/EMS/common-bundle/src/Helper/Text/Encoder.php @@ -60,12 +60,12 @@ public function encodeUrl(string $text): string return $encodedText; } - public function webalizeForUsers(string $text, ?string $locale = null): ?string + public function webalizeForUsers(string $text, string $locale = null): ?string { return static::webalize($text, $this->webalizeRemovableRegex, $this->webalizeDashableRegex, $locale); } - public static function webalize(string $text, string $webalizeRemovableRegex = Configuration::WEBALIZE_REMOVABLE_REGEX, string $webalizeDashableRegex = Configuration::WEBALIZE_DASHABLE_REGEX, ?string $locale = null): string + public static function webalize(string $text, string $webalizeRemovableRegex = Configuration::WEBALIZE_REMOVABLE_REGEX, string $webalizeDashableRegex = Configuration::WEBALIZE_DASHABLE_REGEX, string $locale = null): string { $clean = self::asciiFolding($text, $locale); $clean = \preg_replace($webalizeRemovableRegex, '', $clean) ?? ''; @@ -75,7 +75,7 @@ public static function webalize(string $text, string $webalizeRemovableRegex = C return $clean; } - public static function asciiFolding(string $text, ?string $locale = null): string + public static function asciiFolding(string $text, string $locale = null): string { $a = ['―', '—', '–', '‒', '‹', '›', '′', '‵', '‘', '’', '‚', '‛', '″', '‴', '‶', '‷', '“', '”', '„', '‟', '«', '»', 'ß', 'ẞ', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ', '\'']; $b = ['-', '-', '-', '-', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '"', '"', '"', '"', '"', '"', '"', '"', '"', '"', 'ss', 'SS', 'A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o', ' ']; diff --git a/EMS/common-bundle/src/Json/JsonMenuNested.php b/EMS/common-bundle/src/Json/JsonMenuNested.php index df53b996b..441c54ca4 100644 --- a/EMS/common-bundle/src/Json/JsonMenuNested.php +++ b/EMS/common-bundle/src/Json/JsonMenuNested.php @@ -181,7 +181,7 @@ public function diffChildren(JsonMenuNested $compareJsonMenuNested): JsonMenuNes /** * @return iterable|JsonMenuNested[] */ - public function search(string $propertyPath, string $value, ?string $type = null): iterable + public function search(string $propertyPath, string $value, string $type = null): iterable { $propertyAccessor = PropertyAccess::createPropertyAccessor(); @@ -278,7 +278,7 @@ public function setChildren(array $children): void /** * @return JsonMenuNested[] */ - public function getChildren(?callable $map = null): array + public function getChildren(callable $map = null): array { return $map ? \array_map($map, $this->children) : $this->children; } @@ -286,7 +286,7 @@ public function getChildren(?callable $map = null): array /** * @return JsonMenuNested[] */ - public function getPath(?callable $map = null): array + public function getPath(callable $map = null): array { $path = [$map ? $map($this) : $this]; @@ -311,7 +311,7 @@ public function giveParent(): JsonMenuNested return $this->parent; } - public function addChild(JsonMenuNested $child, ?int $position = null): JsonMenuNested + public function addChild(JsonMenuNested $child, int $position = null): JsonMenuNested { $addChild = clone $child; $addChild->setParent($this); diff --git a/EMS/common-bundle/src/Search/Search.php b/EMS/common-bundle/src/Search/Search.php index 8dab49353..6b5510ab8 100644 --- a/EMS/common-bundle/src/Search/Search.php +++ b/EMS/common-bundle/src/Search/Search.php @@ -108,7 +108,7 @@ public function getQueryArray(): ?array } /** - * @param array|null$query + * @param array|null $query */ public function setQueryArray(?array $query): void { diff --git a/EMS/common-bundle/src/Service/ElasticaService.php b/EMS/common-bundle/src/Service/ElasticaService.php index ad5e1d0a7..23f6e0854 100644 --- a/EMS/common-bundle/src/Service/ElasticaService.php +++ b/EMS/common-bundle/src/Service/ElasticaService.php @@ -68,7 +68,7 @@ public function refresh(?string $index): bool return $this->client->requestEndpoint($endpoint)->isOk(); } - public function getHealthStatus(string $waitForStatus = null, string $timeout = '10s', ?string $index = null): string + public function getHealthStatus(string $waitForStatus = null, string $timeout = '10s', string $index = null): string { if (null !== $this->healthStatus) { return $this->healthStatus; @@ -96,7 +96,7 @@ public function getHealthStatus(string $waitForStatus = null, string $timeout = /** * @return array */ - public function getClusterHealth(string $waitForStatus = null, string $timeout = '10s', ?string $index = null): array + public function getClusterHealth(string $waitForStatus = null, string $timeout = '10s', string $index = null): array { if ($this->useAdminProxy) { throw new \RuntimeException('getClusterHealth not supported in proxy mode'); @@ -398,7 +398,7 @@ public function convertElasticsearchSearch(array $param): Search * @param string[] $sourceIncludes * @param string[] $sourcesExcludes */ - public function getDocument(string $index, ?string $contentType, string $id, array $sourceIncludes = [], array $sourcesExcludes = [], ?AbstractQuery $query = null): Document + public function getDocument(string $index, ?string $contentType, string $id, array $sourceIncludes = [], array $sourcesExcludes = [], AbstractQuery $query = null): Document { $contentTypes = []; if (null !== $contentType) { diff --git a/EMS/common-bundle/src/Service/ExpressionService.php b/EMS/common-bundle/src/Service/ExpressionService.php index d32cfc6bc..05a635a57 100644 --- a/EMS/common-bundle/src/Service/ExpressionService.php +++ b/EMS/common-bundle/src/Service/ExpressionService.php @@ -16,9 +16,6 @@ public function __construct(private readonly LoggerInterface $logger) { } - /** - * {@inheritdoc} - */ public function evaluateToBool(string $expression, array $values = []): bool { $evaluate = $this->evaluate($expression, $values); @@ -26,9 +23,6 @@ public function evaluateToBool(string $expression, array $values = []): bool return \is_bool($evaluate) ? $evaluate : false; } - /** - * {@inheritdoc} - */ public function evaluateToString(string $expression, array $values = []): ?string { $evaluate = $this->evaluate($expression, $values); diff --git a/EMS/common-bundle/src/Service/Pdf/DomPdfPrinter.php b/EMS/common-bundle/src/Service/Pdf/DomPdfPrinter.php index d0546cede..8a00a5083 100644 --- a/EMS/common-bundle/src/Service/Pdf/DomPdfPrinter.php +++ b/EMS/common-bundle/src/Service/Pdf/DomPdfPrinter.php @@ -21,7 +21,7 @@ public function __construct(string $projectDir, string $cacheDir) } } - public function getPdfOutput(PdfInterface $pdf, ?PdfPrintOptions $options = null): PdfOutput + public function getPdfOutput(PdfInterface $pdf, PdfPrintOptions $options = null): PdfOutput { $options ??= new PdfPrintOptions([]); $dompdf = $this->makeDomPdf($pdf, $options); @@ -29,7 +29,7 @@ public function getPdfOutput(PdfInterface $pdf, ?PdfPrintOptions $options = null return new PdfOutput(fn (): ?string => $dompdf->output()); } - public function getStreamedResponse(PdfInterface $pdf, ?PdfPrintOptions $options = null): StreamedResponse + public function getStreamedResponse(PdfInterface $pdf, PdfPrintOptions $options = null): StreamedResponse { $options ??= new PdfPrintOptions([]); $dompdf = $this->makeDomPdf($pdf, $options); diff --git a/EMS/common-bundle/src/Service/Pdf/PdfGenerator.php b/EMS/common-bundle/src/Service/Pdf/PdfGenerator.php index e0777408d..b5772228c 100644 --- a/EMS/common-bundle/src/Service/Pdf/PdfGenerator.php +++ b/EMS/common-bundle/src/Service/Pdf/PdfGenerator.php @@ -20,7 +20,7 @@ public function createOptionsFromHtml(string $html): PdfPrintOptions return new PdfPrintOptionsHtml($html); } - public function generateResponseFromHtml(string $html, ?PdfPrintOptions $options = null): Response + public function generateResponseFromHtml(string $html, PdfPrintOptions $options = null): Response { $options ??= new PdfPrintOptions([]); $pdf = new Pdf($options->getFilename(), $html); @@ -38,7 +38,7 @@ public function generateResponseFromHtml(string $html, ?PdfPrintOptions $options return $response; } - public function generateStreamedResponseFromHtml(string $html, ?PdfPrintOptions $options = null): StreamedResponse + public function generateStreamedResponseFromHtml(string $html, PdfPrintOptions $options = null): StreamedResponse { $options ??= new PdfPrintOptions([]); $pdf = new Pdf($options->getFilename(), $html); diff --git a/EMS/common-bundle/src/Service/Pdf/PdfPrinterInterface.php b/EMS/common-bundle/src/Service/Pdf/PdfPrinterInterface.php index 9cc2a0c1e..1b55bb5c9 100644 --- a/EMS/common-bundle/src/Service/Pdf/PdfPrinterInterface.php +++ b/EMS/common-bundle/src/Service/Pdf/PdfPrinterInterface.php @@ -8,7 +8,7 @@ interface PdfPrinterInterface { - public function getPdfOutput(PdfInterface $pdf, ?PdfPrintOptions $options = null): PdfOutput; + public function getPdfOutput(PdfInterface $pdf, PdfPrintOptions $options = null): PdfOutput; - public function getStreamedResponse(PdfInterface $pdf, ?PdfPrintOptions $options = null): StreamedResponse; + public function getStreamedResponse(PdfInterface $pdf, PdfPrintOptions $options = null): StreamedResponse; } diff --git a/EMS/common-bundle/src/Storage/Service/SftpStorage.php b/EMS/common-bundle/src/Storage/Service/SftpStorage.php index f882f6f27..aa95ded30 100644 --- a/EMS/common-bundle/src/Storage/Service/SftpStorage.php +++ b/EMS/common-bundle/src/Storage/Service/SftpStorage.php @@ -9,7 +9,7 @@ class SftpStorage extends AbstractUrlStorage { /** @var resource|null */ - private $sftp = null; + private $sftp; public function __construct(LoggerInterface $logger, private readonly string $host, private readonly string $path, private readonly string $username, private readonly string $publicKeyFile, private readonly string $privateKeyFile, int $usage, int $hotSynchronizeLimit = 0, private readonly ?string $passwordPhrase = null, private readonly int $port = 22) { diff --git a/EMS/common-bundle/src/Storage/StorageManager.php b/EMS/common-bundle/src/Storage/StorageManager.php index 4fb219973..3b0bfcd6c 100644 --- a/EMS/common-bundle/src/Storage/StorageManager.php +++ b/EMS/common-bundle/src/Storage/StorageManager.php @@ -20,7 +20,7 @@ class StorageManager private array $factories = []; /** - * @param iterable $factories + * @param iterable $factories * @param array $storageConfigs */ public function __construct(private readonly LoggerInterface $logger, private readonly FileLocatorInterface $fileLocator, iterable $factories, private readonly string $hashAlgo, private readonly array $storageConfigs = []) @@ -168,7 +168,7 @@ public function saveContents(string $contents, string $filename, string $mimetyp return $hash; } - public function computeStringHash(string $string, ?string $hashAlgo = null, bool $binary = false): string + public function computeStringHash(string $string, string $hashAlgo = null, bool $binary = false): string { return \hash($hashAlgo ?? $this->hashAlgo, $string, $binary); } diff --git a/EMS/common-bundle/src/Twig/AssetRuntime.php b/EMS/common-bundle/src/Twig/AssetRuntime.php index 690395b28..2ac3591ce 100644 --- a/EMS/common-bundle/src/Twig/AssetRuntime.php +++ b/EMS/common-bundle/src/Twig/AssetRuntime.php @@ -212,7 +212,7 @@ public function imageInfo(string $hash): ?array return $imageInfo; } - public function hash(string $input, ?string $hashAlgo = null, bool $binary = false): string + public function hash(string $input, string $hashAlgo = null, bool $binary = false): string { return $this->storageManager->computeStringHash($input, $hashAlgo, $binary); } diff --git a/EMS/common-bundle/tests/Unit/Common/Standard/TypeTest.php b/EMS/common-bundle/tests/Unit/Common/Standard/TypeTest.php index 2e0c19813..f344ca18b 100644 --- a/EMS/common-bundle/tests/Unit/Common/Standard/TypeTest.php +++ b/EMS/common-bundle/tests/Unit/Common/Standard/TypeTest.php @@ -25,7 +25,7 @@ public function providerString(): array /** * @dataProvider providerString */ - public function testTypeString($value, ?string $error = null): void + public function testTypeString($value, string $error = null): void { if ($error) { $this->expectException(\RuntimeException::class); @@ -51,7 +51,7 @@ public function providerInteger(): array /** * @dataProvider providerInteger */ - public function testTypeInteger($value, ?string $error = null): void + public function testTypeInteger($value, string $error = null): void { if ($error) { $this->expectException(\RuntimeException::class); diff --git a/EMS/core-bundle/src/Command/LockCommand.php b/EMS/core-bundle/src/Command/LockCommand.php index ec79a87b9..6214e38b1 100644 --- a/EMS/core-bundle/src/Command/LockCommand.php +++ b/EMS/core-bundle/src/Command/LockCommand.php @@ -104,8 +104,8 @@ protected function initialize(InputInterface $input, OutputInterface $output): v protected function execute(InputInterface $input, OutputInterface $output): int { - if ($input->getOption(self::OPTION_IF_EMPTY) && - 0 !== $this->revisionRepository->findAllLockedRevisions($this->contentType, $this->by)->count()) { + if ($input->getOption(self::OPTION_IF_EMPTY) + && 0 !== $this->revisionRepository->findAllLockedRevisions($this->contentType, $this->by)->count()) { return 0; } diff --git a/EMS/core-bundle/src/Command/MigrateCommand.php b/EMS/core-bundle/src/Command/MigrateCommand.php index 9373fae2b..f166aa0bc 100644 --- a/EMS/core-bundle/src/Command/MigrateCommand.php +++ b/EMS/core-bundle/src/Command/MigrateCommand.php @@ -26,7 +26,7 @@ class MigrateCommand extends AbstractCommand private string $elasticsearchIndex; private string $contentTypeNameFrom; private string $contentTypeNameTo; - private int $scrollSize; + private int $scrollSize; private string $scrollTimeout; private bool $indexInDefaultEnv; diff --git a/EMS/core-bundle/src/Command/RecomputeCommand.php b/EMS/core-bundle/src/Command/RecomputeCommand.php index ca8c9a133..ae4126a8d 100644 --- a/EMS/core-bundle/src/Command/RecomputeCommand.php +++ b/EMS/core-bundle/src/Command/RecomputeCommand.php @@ -259,7 +259,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - private function lock(OutputInterface $output, ContentType $contentType, string $query, bool $force = false, bool $ifEmpty = false, ?string $ouuid = null): int + private function lock(OutputInterface $output, ContentType $contentType, string $query, bool $force = false, bool $ifEmpty = false, string $ouuid = null): int { $application = $this->getApplication(); if (null === $application) { diff --git a/EMS/core-bundle/src/Contracts/Revision/RevisionServiceInterface.php b/EMS/core-bundle/src/Contracts/Revision/RevisionServiceInterface.php index 593f1bc4f..80764b0f6 100644 --- a/EMS/core-bundle/src/Contracts/Revision/RevisionServiceInterface.php +++ b/EMS/core-bundle/src/Contracts/Revision/RevisionServiceInterface.php @@ -11,7 +11,7 @@ interface RevisionServiceInterface { /** - * @param array{contentType?: ContentType, contentTypeName?: string, lockBy?: string, archived?: bool, endTime?: (null | string), modifiedBefore?: string} $search + * @param array{contentType?: ContentType, contentTypeName?: string, lockBy?: string, archived?: bool, endTime?: (string|null), modifiedBefore?: string} $search */ public function search(array $search): Revisions; diff --git a/EMS/core-bundle/src/Controller/ChannelController.php b/EMS/core-bundle/src/Controller/ChannelController.php index 2a6195223..ba9e3176a 100644 --- a/EMS/core-bundle/src/Controller/ChannelController.php +++ b/EMS/core-bundle/src/Controller/ChannelController.php @@ -66,7 +66,7 @@ public function add(Request $request): Response return $this->edit($request, $channel, "@$this->templateNamespace/channel/add.html.twig"); } - public function edit(Request $request, Channel $channel, ?string $view = null): Response + public function edit(Request $request, Channel $channel, string $view = null): Response { if (null === $view) { $view = "@$this->templateNamespace/channel/edit.html.twig"; diff --git a/EMS/core-bundle/src/Controller/Component/JsonMenuNestedController.php b/EMS/core-bundle/src/Controller/Component/JsonMenuNestedController.php index d3cfd67ae..60a8667fe 100644 --- a/EMS/core-bundle/src/Controller/Component/JsonMenuNestedController.php +++ b/EMS/core-bundle/src/Controller/Component/JsonMenuNestedController.php @@ -213,7 +213,7 @@ private function clearFlashes(Request $request): void $session->getFlashBag()->clear(); } - private function createFormItem(JsonMenuNestedConfig $config, JsonMenuNestedNode $node, ?JsonMenuNested $item = null): FormInterface + private function createFormItem(JsonMenuNestedConfig $config, JsonMenuNestedNode $node, JsonMenuNested $item = null): FormInterface { $object = $item ? $item->getObject() : []; $data = RawDataTransformer::transform($node->getFieldType(), $object); diff --git a/EMS/core-bundle/src/Controller/ContentManagement/CrudController.php b/EMS/core-bundle/src/Controller/ContentManagement/CrudController.php index 688c6952e..702875905 100644 --- a/EMS/core-bundle/src/Controller/ContentManagement/CrudController.php +++ b/EMS/core-bundle/src/Controller/ContentManagement/CrudController.php @@ -344,7 +344,7 @@ public function getUserProfiles(): JsonResponse return $this->json($users); } - public function index(Request $request, string $name, ?string $ouuid = null, string $replaceOrMerge = 'replace'): Response + public function index(Request $request, string $name, string $ouuid = null, string $replaceOrMerge = 'replace'): Response { $revision = null; if (null !== $ouuid) { diff --git a/EMS/core-bundle/src/Controller/ContentManagement/DatatableController.php b/EMS/core-bundle/src/Controller/ContentManagement/DatatableController.php index c4fe081ef..5155a6037 100644 --- a/EMS/core-bundle/src/Controller/ContentManagement/DatatableController.php +++ b/EMS/core-bundle/src/Controller/ContentManagement/DatatableController.php @@ -29,7 +29,7 @@ public function __construct( ) { } - public function ajaxData(Request $request, string $hash, ?string $optionsCacheKey = null): Response + public function ajaxData(Request $request, string $hash, string $optionsCacheKey = null): Response { $table = $this->dataTableFactory->createFromHash($hash, $optionsCacheKey); $dataTableRequest = DataTableRequest::fromRequest($request); diff --git a/EMS/core-bundle/src/Controller/ContentManagement/EnvironmentController.php b/EMS/core-bundle/src/Controller/ContentManagement/EnvironmentController.php index 2f6ecdf9c..d5890c477 100644 --- a/EMS/core-bundle/src/Controller/ContentManagement/EnvironmentController.php +++ b/EMS/core-bundle/src/Controller/ContentManagement/EnvironmentController.php @@ -221,8 +221,8 @@ public function alignAction(Request $request): Response ); for ($index = 0; $index < \count($results); ++$index) { $results[$index]['contentType'] = $this->contentTypeService->getByName($results[$index]['content_type_name']); -// $results[$index]['revisionEnvironment'] = $repository->findOneById($results[$index]['rId']); -// TODO: is it the better options? to concatenate and split things? + // $results[$index]['revisionEnvironment'] = $repository->findOneById($results[$index]['rId']); + // TODO: is it the better options? to concatenate and split things? $minrevid = \explode('/', (string) $results[$index]['minrevid']); // 1/81522/2017-03-08 14:32:52 => e.id/r.id/r.created $maxrevid = \explode('/', (string) $results[$index]['maxrevid']); diff --git a/EMS/core-bundle/src/Controller/Form/SubmissionController.php b/EMS/core-bundle/src/Controller/Form/SubmissionController.php index e21c0645a..3b4e5b58b 100644 --- a/EMS/core-bundle/src/Controller/Form/SubmissionController.php +++ b/EMS/core-bundle/src/Controller/Form/SubmissionController.php @@ -11,6 +11,7 @@ use EMS\CoreBundle\Form\Form\TableType; use EMS\CoreBundle\Service\Form\Submission\FormSubmissionService; use EMS\SubmissionBundle\Entity\FormSubmission; +use GuzzleHttp\Psr7\Stream; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Form; @@ -23,7 +24,6 @@ use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Security\Core\User\UserInterface; -use GuzzleHttp\Psr7\Stream; final class SubmissionController extends AbstractController { diff --git a/EMS/core-bundle/src/Controller/Job/ScheduleController.php b/EMS/core-bundle/src/Controller/Job/ScheduleController.php index 3e7ac362a..1bba94f4f 100644 --- a/EMS/core-bundle/src/Controller/Job/ScheduleController.php +++ b/EMS/core-bundle/src/Controller/Job/ScheduleController.php @@ -67,7 +67,7 @@ public function add(Request $request): Response return $this->edit($request, $schedule, 'html', true, 'log.schedule.created', "@$this->templateNamespace/schedule/add.html.twig"); } - public function edit(Request $request, Schedule $schedule, string $_format, bool $create = false, string $logMessage = 'log.schedule.updated', ?string $template = null): Response + public function edit(Request $request, Schedule $schedule, string $_format, bool $create = false, string $logMessage = 'log.schedule.updated', string $template = null): Response { if (null === $template) { $template = "@$this->templateNamespace/schedule/edit.html.twig"; diff --git a/EMS/core-bundle/src/Controller/QuerySearchController.php b/EMS/core-bundle/src/Controller/QuerySearchController.php index 1651b4388..f1ef27922 100644 --- a/EMS/core-bundle/src/Controller/QuerySearchController.php +++ b/EMS/core-bundle/src/Controller/QuerySearchController.php @@ -67,7 +67,7 @@ public function add(Request $request): Response return $this->edit($request, $querySearch, "@$this->templateNamespace/query-search/add.html.twig"); } - public function edit(Request $request, QuerySearch $querySearch, ?string $view = null): Response + public function edit(Request $request, QuerySearch $querySearch, string $view = null): Response { if (null == $view) { $view = "@$this->templateNamespace/query-search/edit.html.twig"; diff --git a/EMS/core-bundle/src/Controller/Views/CriteriaController.php b/EMS/core-bundle/src/Controller/Views/CriteriaController.php index 5ea18173f..1768401c5 100644 --- a/EMS/core-bundle/src/Controller/Views/CriteriaController.php +++ b/EMS/core-bundle/src/Controller/Views/CriteriaController.php @@ -130,7 +130,7 @@ public function align(View $view, Request $request): Response } $revision = $this->removeCriteriaRevision($view, $rawData, $targetFieldName, $itemToFinalize); -// $revision = $this->addCriteriaRevision($view, $rawData, $targetFieldName, $itemToFinalize); + // $revision = $this->addCriteriaRevision($view, $rawData, $targetFieldName, $itemToFinalize); if ($revision) { $itemToFinalize[$revision->getOuuid()] = $revision; } @@ -335,12 +335,12 @@ public function generateCriteriaTable(View $view, CriteriaUpdateConfig $criteria { $contentType = $view->getContentType(); -// $criteriaField = $contentType->getFieldType(); + // $criteriaField = $contentType->getFieldType(); $criteriaFieldName = false; if ('internal' == $view->getOptions()['criteriaMode']) { $criteriaFieldName = $view->getOptions()['criteriaField']; -// $criteriaField = $contentType->getFieldType()->getChildByPath($criteriaFieldName); + // $criteriaField = $contentType->getFieldType()->getChildByPath($criteriaFieldName); } $body = [ @@ -403,12 +403,12 @@ public function generateCriteriaTable(View $view, CriteriaUpdateConfig $criteria ], ]; } -// /** @var FieldType $columnField */ -// $columnField = $criteriaField->getChildByPath($criteriaUpdateConfig->getColumnCriteria()); -// -// -// /** @var FieldType $rowField */ -// $rowField = $criteriaField->getChildByPath($criteriaUpdateConfig->getRowCriteria()); + // /** @var FieldType $columnField */ + // $columnField = $criteriaField->getChildByPath($criteriaUpdateConfig->getColumnCriteria()); + // + // + // /** @var FieldType $rowField */ + // $rowField = $criteriaField->getChildByPath($criteriaUpdateConfig->getRowCriteria()); $table = []; /** @var ObjectChoiceListItem $rowItem */ diff --git a/EMS/core-bundle/src/Core/Component/JsonMenuNested/Config/JsonMenuNestedConfigFactory.php b/EMS/core-bundle/src/Core/Component/JsonMenuNested/Config/JsonMenuNestedConfigFactory.php index 1be845005..c2f2631bc 100644 --- a/EMS/core-bundle/src/Core/Component/JsonMenuNested/Config/JsonMenuNestedConfigFactory.php +++ b/EMS/core-bundle/src/Core/Component/JsonMenuNested/Config/JsonMenuNestedConfigFactory.php @@ -62,7 +62,6 @@ protected function create(string $hash, array $options): JsonMenuNestedConfig return $config; } - /** {@inheritdoc} */ protected function resolveOptions(array $options): array { $resolver = new OptionsResolver(); diff --git a/EMS/core-bundle/src/Core/Component/MediaLibrary/MediaLibraryConfigFactory.php b/EMS/core-bundle/src/Core/Component/MediaLibrary/MediaLibraryConfigFactory.php index 09d56c833..9cd802a2f 100644 --- a/EMS/core-bundle/src/Core/Component/MediaLibrary/MediaLibraryConfigFactory.php +++ b/EMS/core-bundle/src/Core/Component/MediaLibrary/MediaLibraryConfigFactory.php @@ -62,7 +62,6 @@ private function getField(ContentType $contentType, string $name): FieldType return $field ?: throw new \RuntimeException(\vsprintf('Field "%s" not found in "%s" contentType', [$name, $contentType->getName()])); } - /** {@inheritdoc} */ protected function resolveOptions(array $options): array { $resolver = new OptionsResolver(); diff --git a/EMS/core-bundle/src/Core/Dashboard/DashboardManager.php b/EMS/core-bundle/src/Core/Dashboard/DashboardManager.php index 6b6318fe5..7d9f87cf4 100644 --- a/EMS/core-bundle/src/Core/Dashboard/DashboardManager.php +++ b/EMS/core-bundle/src/Core/Dashboard/DashboardManager.php @@ -187,7 +187,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $dashboard; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $dashboard = Dashboard::fromJson($json); if (null !== $name && $dashboard->getName() !== $name) { diff --git a/EMS/core-bundle/src/Core/DataTable/DataTableFactory.php b/EMS/core-bundle/src/Core/DataTable/DataTableFactory.php index 17c72f61f..4b85037ae 100644 --- a/EMS/core-bundle/src/Core/DataTable/DataTableFactory.php +++ b/EMS/core-bundle/src/Core/DataTable/DataTableFactory.php @@ -91,7 +91,7 @@ private function checkRoles(DataTableTypeInterface $type): void } } - private function generateAjaxUrl(DataTableTypeInterface $type, ?string $optionsCacheKey = null): string + private function generateAjaxUrl(DataTableTypeInterface $type, string $optionsCacheKey = null): string { return $this->urlGenerator->generate(Routes::DATA_TABLE_AJAX_TABLE, [ 'hash' => $type->getHash(), diff --git a/EMS/core-bundle/src/Core/Form/FieldTypeManager.php b/EMS/core-bundle/src/Core/Form/FieldTypeManager.php index fdb1c65e7..ba6de58db 100644 --- a/EMS/core-bundle/src/Core/Form/FieldTypeManager.php +++ b/EMS/core-bundle/src/Core/Form/FieldTypeManager.php @@ -16,7 +16,7 @@ class FieldTypeManager { public function __construct(private readonly LoggerInterface $logger, - private readonly FormRegistryInterface $formRegistry) + private readonly FormRegistryInterface $formRegistry) { } diff --git a/EMS/core-bundle/src/Core/Form/FormManager.php b/EMS/core-bundle/src/Core/Form/FormManager.php index 736be96e4..020b9b43a 100644 --- a/EMS/core-bundle/src/Core/Form/FormManager.php +++ b/EMS/core-bundle/src/Core/Form/FormManager.php @@ -128,7 +128,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $form; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $form = Form::fromJson($json); if (null !== $name && $form->getName() !== $name) { diff --git a/EMS/core-bundle/src/Core/Job/ScheduleManager.php b/EMS/core-bundle/src/Core/Job/ScheduleManager.php index e2c75f764..c590b75a5 100644 --- a/EMS/core-bundle/src/Core/Job/ScheduleManager.php +++ b/EMS/core-bundle/src/Core/Job/ScheduleManager.php @@ -118,7 +118,7 @@ public function setNextRun(Schedule $schedule): void $schedule->setNextRun($cron->getNextRunDate()); } - public function findNext(?string $tag = null): ?Schedule + public function findNext(string $tag = null): ?Schedule { $schedule = $this->scheduleRepository->findNext($tag); if (null === $schedule) { @@ -145,7 +145,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $schedule; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $schedule = Schedule::fromJson($json); if (null !== $name && $schedule->getName() !== $name) { diff --git a/EMS/core-bundle/src/Core/Log/LogManager.php b/EMS/core-bundle/src/Core/Log/LogManager.php index 54c50d7dc..40387bc84 100644 --- a/EMS/core-bundle/src/Core/Log/LogManager.php +++ b/EMS/core-bundle/src/Core/Log/LogManager.php @@ -94,7 +94,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Core/ManagedAlias/ManagedAliasManager.php b/EMS/core-bundle/src/Core/ManagedAlias/ManagedAliasManager.php index 7c9026dcd..54d1a8650 100644 --- a/EMS/core-bundle/src/Core/ManagedAlias/ManagedAliasManager.php +++ b/EMS/core-bundle/src/Core/ManagedAlias/ManagedAliasManager.php @@ -74,7 +74,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $i18n; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $managedAlias = ManagedAlias::fromJson($json); if (null !== $name && $managedAlias->getName() !== $name) { diff --git a/EMS/core-bundle/src/Core/Mapping/AnalyzerManager.php b/EMS/core-bundle/src/Core/Mapping/AnalyzerManager.php index 897378442..9f78c25e8 100644 --- a/EMS/core-bundle/src/Core/Mapping/AnalyzerManager.php +++ b/EMS/core-bundle/src/Core/Mapping/AnalyzerManager.php @@ -59,7 +59,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $analyzer; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $analyzer = Analyzer::fromJson($json); if (null !== $name && $analyzer->getName() !== $name) { diff --git a/EMS/core-bundle/src/Core/Mapping/FilterManager.php b/EMS/core-bundle/src/Core/Mapping/FilterManager.php index 421c5ea17..979b74d88 100644 --- a/EMS/core-bundle/src/Core/Mapping/FilterManager.php +++ b/EMS/core-bundle/src/Core/Mapping/FilterManager.php @@ -55,7 +55,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $filter; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $filter = Filter::fromJson($json); if (null !== $name && $filter->getName() !== $name) { diff --git a/EMS/core-bundle/src/Core/Revision/DraftInProgress.php b/EMS/core-bundle/src/Core/Revision/DraftInProgress.php index a643d6dbc..bd9c8fb88 100644 --- a/EMS/core-bundle/src/Core/Revision/DraftInProgress.php +++ b/EMS/core-bundle/src/Core/Revision/DraftInProgress.php @@ -82,7 +82,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Core/Revision/Task/Table/TaskTableService.php b/EMS/core-bundle/src/Core/Revision/Task/Table/TaskTableService.php index a25351a56..2dcb218cd 100644 --- a/EMS/core-bundle/src/Core/Revision/Task/Table/TaskTableService.php +++ b/EMS/core-bundle/src/Core/Revision/Task/Table/TaskTableService.php @@ -155,7 +155,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Core/Revision/Task/TaskManager.php b/EMS/core-bundle/src/Core/Revision/Task/TaskManager.php index 3d5055e55..53f34e6a1 100644 --- a/EMS/core-bundle/src/Core/Revision/Task/TaskManager.php +++ b/EMS/core-bundle/src/Core/Revision/Task/TaskManager.php @@ -160,7 +160,7 @@ public function taskCreateFromRevision(TaskDTO $taskDTO, Revision $revision, str return $task; } - public function taskDelete(Task $task, int $revisionId, ?string $comment = null): void + public function taskDelete(Task $task, int $revisionId, string $comment = null): void { $transaction = $this->revisionTransaction(function (Revision $revision) use ($task, $comment) { if ($revision->isTaskCurrent($task)) { @@ -213,7 +213,7 @@ public function taskValidate(Revision $revision, bool $approve, ?string $comment $transaction($revision->getId()); } - public function taskValidateRequest(Task $task, int $revisionId, ?string $comment = null): void + public function taskValidateRequest(Task $task, int $revisionId, string $comment = null): void { $transaction = $this->revisionTransaction(function (Revision $revision) use ($task, $comment) { $event = $this->createTaskEvent($task, $revision); @@ -251,7 +251,7 @@ private function dispatchEvent(TaskEvent $event, string $eventName): void $this->eventDispatcher->dispatch($event, $eventName); } - private function createTaskEvent(Task $task, Revision $revision, ?string $username = null): TaskEvent + private function createTaskEvent(Task $task, Revision $revision, string $username = null): TaskEvent { $username = $username ?: $this->userService->getCurrentUser()->getUsername(); diff --git a/EMS/core-bundle/src/Core/UI/Menu.php b/EMS/core-bundle/src/Core/UI/Menu.php index 3b34a55d1..5e947c15c 100644 --- a/EMS/core-bundle/src/Core/UI/Menu.php +++ b/EMS/core-bundle/src/Core/UI/Menu.php @@ -19,7 +19,7 @@ public function __construct(private readonly string $title, private readonly arr /** * @param array $routeParameters */ - public function addChild(string $getLabel, string $getIcon, string $route, array $routeParameters = [], ?string $color = null): MenuEntry + public function addChild(string $getLabel, string $getIcon, string $route, array $routeParameters = [], string $color = null): MenuEntry { return $this->children[] = new MenuEntry($getLabel, $getIcon, $route, $routeParameters, $color); } diff --git a/EMS/core-bundle/src/Core/UI/MenuEntry.php b/EMS/core-bundle/src/Core/UI/MenuEntry.php index 0a0034d81..8fef3ee7c 100644 --- a/EMS/core-bundle/src/Core/UI/MenuEntry.php +++ b/EMS/core-bundle/src/Core/UI/MenuEntry.php @@ -26,7 +26,7 @@ public function __construct(private readonly string $label, private readonly str /** * @param array $routeParameters */ - public function addChild(string $getLabel, string $getIcon, string $route, array $routeParameters = [], ?string $color = null): MenuEntry + public function addChild(string $getLabel, string $getIcon, string $route, array $routeParameters = [], string $color = null): MenuEntry { return $this->children[] = new MenuEntry($getLabel, $getIcon, $route, $routeParameters, $color); } @@ -87,7 +87,7 @@ public function hasBadge(): bool return null !== $this->badge; } - public function setBadge(?string $badge, ?string $color = null): void + public function setBadge(?string $badge, string $color = null): void { $this->badge = $badge; $this->badgeColor = $color; diff --git a/EMS/core-bundle/src/Core/View/ViewManager.php b/EMS/core-bundle/src/Core/View/ViewManager.php index 70443c850..6b9ed2328 100644 --- a/EMS/core-bundle/src/Core/View/ViewManager.php +++ b/EMS/core-bundle/src/Core/View/ViewManager.php @@ -110,7 +110,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Entity/Analyzer.php b/EMS/core-bundle/src/Entity/Analyzer.php index b76e36d9e..c5884897a 100644 --- a/EMS/core-bundle/src/Entity/Analyzer.php +++ b/EMS/core-bundle/src/Entity/Analyzer.php @@ -118,7 +118,7 @@ public function setOptions(array $options) /** * @return array */ - public function getOptions(?string $esVersion = null): array + public function getOptions(string $esVersion = null): array { $options = $this->options; @@ -215,7 +215,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?\EMS\CommonBundle\Entity\EntityInterface $filter = null): Analyzer + public static function fromJson(string $json, \EMS\CommonBundle\Entity\EntityInterface $filter = null): Analyzer { $meta = JsonClass::fromJsonString($json); $filter = $meta->jsonDeserialize($filter); diff --git a/EMS/core-bundle/src/Entity/AuthToken.php b/EMS/core-bundle/src/Entity/AuthToken.php index d57c677d8..b29147e50 100644 --- a/EMS/core-bundle/src/Entity/AuthToken.php +++ b/EMS/core-bundle/src/Entity/AuthToken.php @@ -38,7 +38,7 @@ public function __construct(/** * * @ORM\JoinColumn(name="user_id", referencedColumnName="id") */ - private UserInterface $user) + private UserInterface $user) { $this->value = \base64_encode(\random_bytes(50)); diff --git a/EMS/core-bundle/src/Entity/Channel.php b/EMS/core-bundle/src/Entity/Channel.php index f87c86aa4..fc7d9991a 100644 --- a/EMS/core-bundle/src/Entity/Channel.php +++ b/EMS/core-bundle/src/Entity/Channel.php @@ -84,7 +84,7 @@ public function __construct() $this->modified = DateTime::create('now'); } - public static function fromJson(string $json, ?\EMS\CommonBundle\Entity\EntityInterface $channel = null): Channel + public static function fromJson(string $json, \EMS\CommonBundle\Entity\EntityInterface $channel = null): Channel { $meta = JsonClass::fromJsonString($json); $channel = $meta->jsonDeserialize($channel); @@ -151,7 +151,7 @@ public function getOptions(): array /** * @param array $options */ - public function setOptions(?array $options = null): void + public function setOptions(array $options = null): void { $this->options = $options; } diff --git a/EMS/core-bundle/src/Entity/Dashboard.php b/EMS/core-bundle/src/Entity/Dashboard.php index a589b49a1..ae7e943c6 100644 --- a/EMS/core-bundle/src/Entity/Dashboard.php +++ b/EMS/core-bundle/src/Entity/Dashboard.php @@ -249,7 +249,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?EntityInterface $dashboard = null): Dashboard + public static function fromJson(string $json, EntityInterface $dashboard = null): Dashboard { $meta = JsonClass::fromJsonString($json); $dashboard = $meta->jsonDeserialize($dashboard); diff --git a/EMS/core-bundle/src/Entity/DataField.php b/EMS/core-bundle/src/Entity/DataField.php index 1cf53ec65..3538dd0df 100644 --- a/EMS/core-bundle/src/Entity/DataField.php +++ b/EMS/core-bundle/src/Entity/DataField.php @@ -461,8 +461,8 @@ public function getIntegerValue() return $this->rawData; } elseif (\intval($this->rawData) || '0' === $this->rawData) { return \intval($this->rawData); -// return $this->rawData; -// throw new DataFormatException('Integer expected: '.print_r($this->rawData, true)); + // return $this->rawData; + // throw new DataFormatException('Integer expected: '.print_r($this->rawData, true)); } $this->addMessage('Integer expected: '.\print_r($this->rawData, true)); diff --git a/EMS/core-bundle/src/Entity/FieldType.php b/EMS/core-bundle/src/Entity/FieldType.php index 06ae0e1df..7be1ed072 100644 --- a/EMS/core-bundle/src/Entity/FieldType.php +++ b/EMS/core-bundle/src/Entity/FieldType.php @@ -169,11 +169,11 @@ public function removeCircularReference(): void public function setDataValue(mixed $input, DataField &$dataField): never { throw new \Exception('Deprecated method'); -// $type = $this->getType(); -// /** @var DataFieldType $dataFieldType */ -// $dataFieldType = new $type; + // $type = $this->getType(); + // /** @var DataFieldType $dataFieldType */ + // $dataFieldType = new $type; -// $dataFieldType->setDataValue($input, $dataField, $this->getOptions()); + // $dataFieldType->setDataValue($input, $dataField, $this->getOptions()); } /** @@ -545,22 +545,22 @@ public function giveContentType(): ContentType return $parent->contentType; } -// /** -// * Cette focntion clone casse le CollectionFieldType => impossible d'ajouter un record -// */ -// public function __clone() -// { -// $this->children = new \Doctrine\Common\Collections\ArrayCollection (); -// $this->deleted = $this->deleted; -// $this->orderKey = $this->orderKey; -// $this->created = null; -// $this->modified = null; -// $this->description = $this->description; -// $this->id = 0; -// $this->name = $this->name ; -// $this->options = $this->options; -// $this->type = $this->type; -// } + // /** + // * Cette focntion clone casse le CollectionFieldType => impossible d'ajouter un record + // */ + // public function __clone() + // { + // $this->children = new \Doctrine\Common\Collections\ArrayCollection (); + // $this->deleted = $this->deleted; + // $this->orderKey = $this->orderKey; + // $this->created = null; + // $this->modified = null; + // $this->description = $this->description; + // $this->id = 0; + // $this->name = $this->name ; + // $this->options = $this->options; + // $this->type = $this->type; + // } /** * get a child. @@ -619,7 +619,7 @@ public function __set(string $key, mixed $input): void } } - public function setParent(?FieldType $parent = null): self + public function setParent(FieldType $parent = null): self { $this->parent = $parent; @@ -649,7 +649,7 @@ private function listAllFields(): array * @param array $newStructure * @param array $fieldsByIds */ - public function reorderFields(array $newStructure, ?array $fieldsByIds = null): void + public function reorderFields(array $newStructure, array $fieldsByIds = null): void { if (null === $fieldsByIds) { $fieldsByIds = $this->listAllFields(); diff --git a/EMS/core-bundle/src/Entity/Filter.php b/EMS/core-bundle/src/Entity/Filter.php index ebee339d3..e60da5d60 100644 --- a/EMS/core-bundle/src/Entity/Filter.php +++ b/EMS/core-bundle/src/Entity/Filter.php @@ -199,7 +199,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?\EMS\CommonBundle\Entity\EntityInterface $filter = null): Filter + public static function fromJson(string $json, \EMS\CommonBundle\Entity\EntityInterface $filter = null): Filter { $meta = JsonClass::fromJsonString($json); $filter = $meta->jsonDeserialize($filter); diff --git a/EMS/core-bundle/src/Entity/Form.php b/EMS/core-bundle/src/Entity/Form.php index 971010e9e..80679cbd1 100644 --- a/EMS/core-bundle/src/Entity/Form.php +++ b/EMS/core-bundle/src/Entity/Form.php @@ -119,7 +119,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?EntityInterface $form = null): Form + public static function fromJson(string $json, EntityInterface $form = null): Form { $meta = JsonClass::fromJsonString($json); $form = $meta->jsonDeserialize($form); diff --git a/EMS/core-bundle/src/Entity/Form/SearchFilter.php b/EMS/core-bundle/src/Entity/Form/SearchFilter.php index d645a7cd0..24fe590f2 100644 --- a/EMS/core-bundle/src/Entity/Form/SearchFilter.php +++ b/EMS/core-bundle/src/Entity/Form/SearchFilter.php @@ -254,7 +254,7 @@ public function getId(): int return $this->id; } - public function setSearch(?Search $search = null): self + public function setSearch(Search $search = null): self { $this->search = $search; diff --git a/EMS/core-bundle/src/Entity/FormVerification.php b/EMS/core-bundle/src/Entity/FormVerification.php index 54ded17da..8321be6b8 100644 --- a/EMS/core-bundle/src/Entity/FormVerification.php +++ b/EMS/core-bundle/src/Entity/FormVerification.php @@ -49,7 +49,7 @@ class FormVerification public function __construct(/** * @ORM\Column(name="value", type="string", length=255) */ - private string $value) + private string $value) { $now = new \DateTimeImmutable(); diff --git a/EMS/core-bundle/src/Entity/Helper/JsonNormalizer.php b/EMS/core-bundle/src/Entity/Helper/JsonNormalizer.php index 6590a517c..7ade02a91 100644 --- a/EMS/core-bundle/src/Entity/Helper/JsonNormalizer.php +++ b/EMS/core-bundle/src/Entity/Helper/JsonNormalizer.php @@ -49,8 +49,6 @@ class JsonNormalizer implements NormalizerInterface, DenormalizerInterface ]; /** - * {@inheritDoc} - * * @param mixed $object * @param array $context * @@ -188,17 +186,11 @@ public function denormalize($data, $class, $format = null, array $context = []): return $object; } - /** - * {@inheritdoc} - */ public function supportsNormalization($data, $format = null): bool { return \is_object($data) && 'json' === $format; } - /** - * {@inheritdoc} - */ public function supportsDenormalization($data, $type, $format = null): bool { return isset($data['__jsonclass__']) && 'json' === $format; diff --git a/EMS/core-bundle/src/Entity/I18n.php b/EMS/core-bundle/src/Entity/I18n.php index b47e30033..66618b255 100644 --- a/EMS/core-bundle/src/Entity/I18n.php +++ b/EMS/core-bundle/src/Entity/I18n.php @@ -133,7 +133,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?EntityInterface $dashboard = null): I18n + public static function fromJson(string $json, EntityInterface $dashboard = null): I18n { $meta = JsonClass::fromJsonString($json); $dashboard = $meta->jsonDeserialize($dashboard); diff --git a/EMS/core-bundle/src/Entity/ManagedAlias.php b/EMS/core-bundle/src/Entity/ManagedAlias.php index a4e0a663f..75141d8b8 100644 --- a/EMS/core-bundle/src/Entity/ManagedAlias.php +++ b/EMS/core-bundle/src/Entity/ManagedAlias.php @@ -199,7 +199,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?EntityInterface $managedAlias = null): ManagedAlias + public static function fromJson(string $json, EntityInterface $managedAlias = null): ManagedAlias { $meta = JsonClass::fromJsonString($json); $managedAlias = $meta->jsonDeserialize($managedAlias); diff --git a/EMS/core-bundle/src/Entity/QuerySearch.php b/EMS/core-bundle/src/Entity/QuerySearch.php index 543320c17..b31b7b660 100644 --- a/EMS/core-bundle/src/Entity/QuerySearch.php +++ b/EMS/core-bundle/src/Entity/QuerySearch.php @@ -79,7 +79,7 @@ public function __construct() $this->environments = new ArrayCollection(); } - public static function fromJson(string $json, ?\EMS\CommonBundle\Entity\EntityInterface $querySearch = null): QuerySearch + public static function fromJson(string $json, \EMS\CommonBundle\Entity\EntityInterface $querySearch = null): QuerySearch { $meta = JsonClass::fromJsonString($json); $querySearch = $meta->jsonDeserialize($querySearch); diff --git a/EMS/core-bundle/src/Entity/Revision.php b/EMS/core-bundle/src/Entity/Revision.php index 0b68a3681..747a29b50 100644 --- a/EMS/core-bundle/src/Entity/Revision.php +++ b/EMS/core-bundle/src/Entity/Revision.php @@ -803,7 +803,7 @@ public function getSha1(): ?string /** * @param ?string[] $circles */ - public function setCircles(?array $circles = null): self + public function setCircles(array $circles = null): self { $this->circles = $circles ?? []; diff --git a/EMS/core-bundle/src/Entity/Schedule.php b/EMS/core-bundle/src/Entity/Schedule.php index d7261ea63..ff8794e29 100644 --- a/EMS/core-bundle/src/Entity/Schedule.php +++ b/EMS/core-bundle/src/Entity/Schedule.php @@ -53,8 +53,6 @@ class Schedule extends JsonDeserializer implements \JsonSerializable, EntityInte protected ?string $command = null; /** - * @var \Datetime - * * @ORM\Column(name="previous_run", type="datetime", nullable=true) */ private ?\Datetime $previousRun = null; @@ -81,7 +79,7 @@ public function __construct() $this->modified = DateTime::create('now'); } - public static function fromJson(string $json, ?\EMS\CommonBundle\Entity\EntityInterface $schedule = null): Schedule + public static function fromJson(string $json, \EMS\CommonBundle\Entity\EntityInterface $schedule = null): Schedule { $meta = JsonClass::fromJsonString($json); $schedule = $meta->jsonDeserialize($schedule); diff --git a/EMS/core-bundle/src/Entity/Sequence.php b/EMS/core-bundle/src/Entity/Sequence.php index a73769fb3..514e49726 100644 --- a/EMS/core-bundle/src/Entity/Sequence.php +++ b/EMS/core-bundle/src/Entity/Sequence.php @@ -38,7 +38,7 @@ class Sequence public function __construct(/** * @ORM\Column(name="name", type="string", length=255, unique=true) */ - private string $name) + private string $name) { $this->created = DateTime::create('now'); $this->modified = DateTime::create('now'); diff --git a/EMS/core-bundle/src/Entity/User.php b/EMS/core-bundle/src/Entity/User.php index cee490cf5..a3dcb2b97 100644 --- a/EMS/core-bundle/src/Entity/User.php +++ b/EMS/core-bundle/src/Entity/User.php @@ -146,9 +146,6 @@ public function __clone() $this->authTokens = new ArrayCollection(); } - /** - * {@inheritDoc} - */ public function toArray(): array { return [ @@ -185,17 +182,11 @@ public function setLocalePreferred(?string $localePreferred): void $this->localePreferred = $localePreferred; } - /** - * {@inheritDoc} - */ public function getCircles(): array { return $this->circles ?? []; } - /** - * {@inheritDoc} - */ public function setCircles(array $circles): self { $this->circles = $circles; @@ -279,9 +270,6 @@ public function removeAuthToken(AuthToken $authToken): void $this->authTokens->removeElement($authToken); } - /** - * {@inheritDoc} - */ public function getAuthTokens(): Collection { return $this->authTokens; diff --git a/EMS/core-bundle/src/Entity/WysiwygProfile.php b/EMS/core-bundle/src/Entity/WysiwygProfile.php index e3946dab2..84e5063d4 100644 --- a/EMS/core-bundle/src/Entity/WysiwygProfile.php +++ b/EMS/core-bundle/src/Entity/WysiwygProfile.php @@ -122,7 +122,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?EntityInterface $profile = null): WysiwygProfile + public static function fromJson(string $json, EntityInterface $profile = null): WysiwygProfile { $meta = JsonClass::fromJsonString($json); $profile = $meta->jsonDeserialize($profile); diff --git a/EMS/core-bundle/src/Entity/WysiwygStylesSet.php b/EMS/core-bundle/src/Entity/WysiwygStylesSet.php index d508f2890..78223bb05 100644 --- a/EMS/core-bundle/src/Entity/WysiwygStylesSet.php +++ b/EMS/core-bundle/src/Entity/WysiwygStylesSet.php @@ -254,7 +254,7 @@ public function jsonSerialize(): JsonClass return $json; } - public static function fromJson(string $json, ?EntityInterface $styleSet = null): WysiwygStylesSet + public static function fromJson(string $json, EntityInterface $styleSet = null): WysiwygStylesSet { $meta = JsonClass::fromJsonString($json); $styleSet = $meta->jsonDeserialize($styleSet); diff --git a/EMS/core-bundle/src/Form/Data/TableAbstract.php b/EMS/core-bundle/src/Form/Data/TableAbstract.php index 0d3d907f7..f5d81117b 100644 --- a/EMS/core-bundle/src/Form/Data/TableAbstract.php +++ b/EMS/core-bundle/src/Form/Data/TableAbstract.php @@ -137,7 +137,7 @@ public function getColumns(): array return $this->columns; } - public function addItemActionCollection(?string $labelKey = null, ?string $icon = null): TableItemActionCollection + public function addItemActionCollection(string $labelKey = null, string $icon = null): TableItemActionCollection { $itemActionCollection = new TableItemActionCollection($labelKey, $icon); $this->itemActionCollection->addItemActionCollection($itemActionCollection); diff --git a/EMS/core-bundle/src/Form/Data/TableColumn.php b/EMS/core-bundle/src/Form/Data/TableColumn.php index ab840ae74..877b3c435 100644 --- a/EMS/core-bundle/src/Form/Data/TableColumn.php +++ b/EMS/core-bundle/src/Form/Data/TableColumn.php @@ -60,7 +60,7 @@ public function setAttribute(string $attribute): void $this->attribute = $attribute; } - public function setRoute(string $name, ?\Closure $callback = null, ?string $target = null): void + public function setRoute(string $name, \Closure $callback = null, string $target = null): void { $this->routeName = $name; $this->routeParametersCallback = $callback; diff --git a/EMS/core-bundle/src/Form/Data/TableItemActionCollection.php b/EMS/core-bundle/src/Form/Data/TableItemActionCollection.php index 6ac61ffe8..c0108d14c 100644 --- a/EMS/core-bundle/src/Form/Data/TableItemActionCollection.php +++ b/EMS/core-bundle/src/Form/Data/TableItemActionCollection.php @@ -48,7 +48,7 @@ public function addItemGetAction(string $route, string $labelKey, string $icon, /** * @param array $routeParameters */ - public function addItemPostAction(string $route, string $labelKey, string $icon, ?string $messageKey = null, array $routeParameters = []): TableItemAction + public function addItemPostAction(string $route, string $labelKey, string $icon, string $messageKey = null, array $routeParameters = []): TableItemAction { $action = TableItemAction::postAction($route, $labelKey, $icon, $messageKey, $routeParameters); $this->itemActions[] = $action; @@ -59,7 +59,7 @@ public function addItemPostAction(string $route, string $labelKey, string $icon, /** * @param array $routeParameters */ - public function addDynamicItemPostAction(string $route, string $labelKey, string $icon, ?string $messageKey = null, array $routeParameters = []): TableItemAction + public function addDynamicItemPostAction(string $route, string $labelKey, string $icon, string $messageKey = null, array $routeParameters = []): TableItemAction { $action = TableItemAction::postDynamicAction($route, $labelKey, $icon, $messageKey, $routeParameters); $this->itemActions[] = $action; diff --git a/EMS/core-bundle/src/Form/Data/TemplateBlockTableColumn.php b/EMS/core-bundle/src/Form/Data/TemplateBlockTableColumn.php index 685e3e934..f285f9188 100644 --- a/EMS/core-bundle/src/Form/Data/TemplateBlockTableColumn.php +++ b/EMS/core-bundle/src/Form/Data/TemplateBlockTableColumn.php @@ -6,7 +6,7 @@ final class TemplateBlockTableColumn extends TemplateTableColumn { - public function __construct(string $label, string $blockName, string $template, ?string $orderField = null) + public function __construct(string $label, string $blockName, string $template, string $orderField = null) { $options = []; $options['label'] = $label; diff --git a/EMS/core-bundle/src/Form/DataField/AssetFieldType.php b/EMS/core-bundle/src/Form/DataField/AssetFieldType.php index 965dc328b..fb7709a8e 100644 --- a/EMS/core-bundle/src/Form/DataField/AssetFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/AssetFieldType.php @@ -26,9 +26,6 @@ */ class AssetFieldType extends DataFieldType { - /** - * {@inheritDoc} - */ public function __construct(AuthorizationCheckerInterface $authorizationChecker, FormRegistryInterface $formRegistry, ElasticsearchService $elasticsearchService, private readonly FileService $fileService) { parent::__construct($authorizationChecker, $formRegistry, $elasticsearchService); @@ -49,9 +46,6 @@ public function getParent(): string return AssetType::class; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -90,9 +84,6 @@ public function buildView(FormView $view, FormInterface $form, array $options): $view->vars['multiple'] = $options['multiple']; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ @@ -108,9 +99,6 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function reverseViewTransform($data, FieldType $fieldType): DataField { $dataField = parent::reverseViewTransform($data, $fieldType); @@ -169,9 +157,6 @@ private function testDataField(DataField $dataField): void } } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $fieldType = $dataField->getFieldType(); @@ -187,9 +172,6 @@ public function viewTransform(DataField $dataField) return $out; } - /** - * {@inheritDoc} - */ public function modelTransform($data, FieldType $fieldType): DataField { $out = parent::reverseViewTransform($data, $fieldType); diff --git a/EMS/core-bundle/src/Form/DataField/CheckboxFieldType.php b/EMS/core-bundle/src/Form/DataField/CheckboxFieldType.php index d5dcee731..e6d6eef56 100644 --- a/EMS/core-bundle/src/Form/DataField/CheckboxFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/CheckboxFieldType.php @@ -21,9 +21,6 @@ public static function getIcon(): string return 'glyphicon glyphicon-check'; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { $migrationOptions = $dataField->giveFieldType()->getMigrationOptions(); @@ -50,9 +47,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function modelTransform($data, FieldType $fieldType): DataField { $dataField = new DataField(); @@ -62,9 +56,6 @@ public function modelTransform($data, FieldType $fieldType): DataField return $dataField; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -81,8 +72,6 @@ public function configureOptions(OptionsResolver $resolver): void } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -97,9 +86,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return $out; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -111,9 +97,6 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ @@ -121,9 +104,6 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -136,8 +116,8 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): // 'required' => false, ]); -// // String specific mapping options -// $optionsForm->get ( 'mappingOptions' )->add ( 'analyzer', AnalyzerPickerType::class); + // // String specific mapping options + // $optionsForm->get ( 'mappingOptions' )->add ( 'analyzer', AnalyzerPickerType::class); $optionsForm->get('restrictionOptions')->remove('mandatory'); $optionsForm->get('restrictionOptions')->remove('mandatory_if'); } diff --git a/EMS/core-bundle/src/Form/DataField/ChoiceFieldType.php b/EMS/core-bundle/src/Form/DataField/ChoiceFieldType.php index bcb2a6c44..59ce99e3a 100644 --- a/EMS/core-bundle/src/Form/DataField/ChoiceFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/ChoiceFieldType.php @@ -30,9 +30,6 @@ public static function getIcon(): string return 'glyphicon glyphicon-check'; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -110,9 +107,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('placeholder', null); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -146,9 +140,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -164,8 +155,6 @@ public function getBlockPrefix(): string } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -178,9 +167,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return parent::reverseViewTransform($value, $fieldType); } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $temp = parent::viewTransform($dataField); diff --git a/EMS/core-bundle/src/Form/DataField/CodeFieldType.php b/EMS/core-bundle/src/Form/DataField/CodeFieldType.php index 8b1cd2a72..75c375953 100644 --- a/EMS/core-bundle/src/Form/DataField/CodeFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/CodeFieldType.php @@ -73,9 +73,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('required', false); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/CollectionFieldType.php b/EMS/core-bundle/src/Form/DataField/CollectionFieldType.php index 77279def0..929eabbd8 100644 --- a/EMS/core-bundle/src/Form/DataField/CollectionFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/CollectionFieldType.php @@ -47,9 +47,6 @@ public static function getIcon(): string return 'fa fa-plus fa-rotate'; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { $migrationOptions = $dataField->giveFieldType()->getMigrationOptions(); @@ -137,9 +134,6 @@ public static function isCollection(): bool return true; } - /** - * {@inheritDoc} - */ public function isValid(DataField &$dataField, DataField $parent = null, mixed &$masterRawData = null): bool { if ($this->hasDeletedParent($parent)) { @@ -172,9 +166,6 @@ public function isValid(DataField &$dataField, DataField $parent = null, mixed & return $isValid; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -214,9 +205,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): $optionsForm->get('restrictionOptions')->remove('mandatory_if'); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -229,9 +217,6 @@ public function getBlockPrefix(): string return 'collectionfieldtype'; } - /** - * {@inheritDoc} - */ public static function getJsonNames(FieldType $current): array { return [$current->getName()]; @@ -246,8 +231,6 @@ public function generateMapping(FieldType $current): array } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -274,9 +257,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return $out; } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); diff --git a/EMS/core-bundle/src/Form/DataField/CollectionItemFieldType.php b/EMS/core-bundle/src/Form/DataField/CollectionItemFieldType.php index dd350525f..ca51262c6 100644 --- a/EMS/core-bundle/src/Form/DataField/CollectionItemFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/CollectionItemFieldType.php @@ -18,9 +18,6 @@ */ class CollectionItemFieldType extends DataFieldType { - /** - * {@inheritDoc} - */ public function getLabel(): string { return 'Collection item object (this message should neve seen anywhere)'; @@ -90,17 +87,14 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (null == $data->getFieldType()) { $tmp = []; /** @var DataField $child */ foreach ($data->getChildren() as $child) { -// $className = $child->getFieldType()->getType(); -// $class = new $className; + // $className = $child->getFieldType()->getType(); + // $class = new $className; $class = $this->formRegistry->getType($child->giveFieldType()->getType()); if (\method_exists($class, 'buildObjectArray')) { $class->buildObjectArray($child, $tmp); @@ -117,18 +111,12 @@ public static function isNested(): bool return true; } - /** - * {@inheritDoc} - */ public static function isContainer(): bool { /* this kind of compound field may contain children */ return true; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ @@ -139,8 +127,6 @@ public function generateMapping(FieldType $current): array } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/ColorPickerFieldType.php b/EMS/core-bundle/src/Form/DataField/ColorPickerFieldType.php index a0f8c9141..284d5c949 100644 --- a/EMS/core-bundle/src/Form/DataField/ColorPickerFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/ColorPickerFieldType.php @@ -24,9 +24,6 @@ public static function getIcon(): string return 'fa fa-paint-brush'; } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -41,9 +38,6 @@ public function getParent(): string return ColorPickerFullType::class; } - /** - * {@inheritDoc} - */ public function modelTransform($data, FieldType $fieldType): DataField { $dataField = parent::modelTransform($data, $fieldType); diff --git a/EMS/core-bundle/src/Form/DataField/ComputedFieldType.php b/EMS/core-bundle/src/Form/DataField/ComputedFieldType.php index 26a08dded..35bc520ae 100644 --- a/EMS/core-bundle/src/Form/DataField/ComputedFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/ComputedFieldType.php @@ -18,9 +18,6 @@ public function getLabel(): string return 'Computed from the raw-data'; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { if (!empty($current->getMappingOptions()) && !empty($current->getMappingOptions()['mappingOptions'])) { @@ -41,9 +38,6 @@ public static function getIcon(): string return 'fa fa-gears'; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -55,9 +49,6 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -100,9 +91,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -111,8 +99,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/ContainerFieldType.php b/EMS/core-bundle/src/Form/DataField/ContainerFieldType.php index cd98209f1..984992366 100644 --- a/EMS/core-bundle/src/Form/DataField/ContainerFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/ContainerFieldType.php @@ -24,9 +24,6 @@ public function getBlockPrefix(): string return 'container_field_type'; } - /** - * {@inheritDoc} - */ public function postFinalizeTreatment(string $type, string $id, DataField $dataField, mixed $previousData): mixed { if (!empty($previousData[$dataField->giveFieldType()->getName()])) { @@ -36,9 +33,6 @@ public function postFinalizeTreatment(string $type, string $id, DataField $dataF return null; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { throw new \Exception('This method should never be called'); @@ -81,24 +75,15 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('icon', null); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { } - /** - * {@inheritDoc} - */ public static function isContainer(): bool { return true; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -112,25 +97,16 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): ]); } - /** - * {@inheritDoc} - */ public static function isVirtual(array $option = []): bool { return true; } - /** - * {@inheritDoc} - */ public static function getJsonNames(FieldType $current): array { return []; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return []; diff --git a/EMS/core-bundle/src/Form/DataField/CopyToFieldType.php b/EMS/core-bundle/src/Form/DataField/CopyToFieldType.php index d740e33eb..e9b6a8789 100644 --- a/EMS/core-bundle/src/Form/DataField/CopyToFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/CopyToFieldType.php @@ -39,9 +39,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void // no inputs as it's just an indexing field } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -59,9 +56,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): $optionsForm->remove('displayOptions'); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { // do nothing more than a mapping diff --git a/EMS/core-bundle/src/Form/DataField/DataFieldType.php b/EMS/core-bundle/src/Form/DataField/DataFieldType.php index 393a5df21..95af09d53 100644 --- a/EMS/core-bundle/src/Form/DataField/DataFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/DataFieldType.php @@ -404,7 +404,7 @@ public function isMandatory(DataField &$dataField, DataField $parent = null, mix * @param array $rawData * @param array $parentRawData */ - public static function resolve(array $rawData, array $parentRawData, string $path, ?string $default = null): ?string + public static function resolve(array $rawData, array $parentRawData, string $path, string $default = null): ?string { $current = $rawData; if (\strlen($path) && \str_starts_with($path, '.')) { diff --git a/EMS/core-bundle/src/Form/DataField/DataLinkFieldType.php b/EMS/core-bundle/src/Form/DataField/DataLinkFieldType.php index 03198463e..85f35df58 100644 --- a/EMS/core-bundle/src/Form/DataField/DataLinkFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/DataLinkFieldType.php @@ -36,9 +36,6 @@ public function __construct( parent::__construct($authorizationChecker, $formRegistry, $elasticsearchService); } - /** - * {@inheritDoc} - */ public function postFinalizeTreatment(string $type, string $id, DataField $dataField, mixed $previousData): mixed { $name = $dataField->giveFieldType()->getName(); @@ -64,9 +61,6 @@ public function getLabel(): string return 'Link to data object(s)'; } - /** - * {@inheritDoc} - */ public function getElasticsearchQuery(DataField $dataField, array $options = []): array { $opt = [...[ @@ -100,9 +94,6 @@ public static function getIcon(): string return 'fa fa-sitemap'; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -183,9 +174,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('querySearch', null); } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -202,9 +190,6 @@ public function getBlockPrefix(): string return 'bypassdatafield'; } - /** - * {@inheritDoc} - */ public function getChoiceList(FieldType $fieldType, array $choices): array { /** @var ObjectPickerType $objectPickerType */ @@ -218,15 +203,12 @@ public function getChoiceList(FieldType $fieldType, array $choices): array unset($all[$key]); } } -// return $loader->loadChoiceList()->loadChoices($choices); + // return $loader->loadChoiceList()->loadChoices($choices); } return $all; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -260,9 +242,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function modelTransform($data, FieldType $fieldType): DataField { $out = parent::modelTransform($data, $fieldType); @@ -311,9 +290,6 @@ public function modelTransform($data, FieldType $fieldType): DataField return $out; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -322,8 +298,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param ?array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/DateFieldType.php b/EMS/core-bundle/src/Form/DataField/DateFieldType.php index 153e2e686..b7e65bd12 100644 --- a/EMS/core-bundle/src/Form/DataField/DateFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/DateFieldType.php @@ -23,9 +23,6 @@ public static function getIcon(): string return 'fa fa-calendar'; } - /** - * {@inheritDoc} - */ public function modelTransform($data, FieldType $fieldType): DataField { if (empty($data)) { @@ -87,9 +84,6 @@ public function reverseModelTransform(DataField $dataField) return $out; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $data = parent::viewTransform($dataField); @@ -108,8 +102,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -131,9 +123,6 @@ public function getBlockPrefix(): string return 'datefieldtype'; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { $migrationOptions = $dataField->giveFieldType()->getMigrationOptions(); @@ -212,9 +201,6 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -283,9 +269,6 @@ public static function convertJavascriptDateFormat(string $format): string return $dateFormat; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/DateRangeFieldType.php b/EMS/core-bundle/src/Form/DataField/DateRangeFieldType.php index 034f2acd6..c767a8b4d 100644 --- a/EMS/core-bundle/src/Form/DataField/DateRangeFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/DateRangeFieldType.php @@ -25,9 +25,6 @@ public static function getIcon(): string return 'fa fa-calendar-o'; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $options = $dataField->giveFieldType()->getOptions(); @@ -53,8 +50,6 @@ public function getBlockPrefix(): string } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -94,9 +89,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return $dataField; } - /** - * {@inheritDoc} - */ public static function filterSubField(array $data, array $option): array { if (!$option['mappingOptions']['nested']) { @@ -116,9 +108,6 @@ public static function filterSubField(array $data, array $option): array return parent::filterSubField($data, $option); } - /** - * {@inheritDoc} - */ public static function isVirtual(array $option = []): bool { if (!isset($option['mappingOptions'])) { @@ -130,9 +119,6 @@ public static function isVirtual(array $option = []): bool return !$nested; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { $migrationOptions = $dataField->giveFieldType()->getMigrationOptions(); @@ -200,9 +186,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -237,9 +220,6 @@ public static function convertJavascriptDateRangeFormat(string $format): string return $dateFormat; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { $out = [ @@ -270,9 +250,6 @@ public function generateMapping(FieldType $current): array return $out; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -289,9 +266,6 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/DateTimeFieldType.php b/EMS/core-bundle/src/Form/DataField/DateTimeFieldType.php index 7755cf098..0cc332a52 100644 --- a/EMS/core-bundle/src/Form/DataField/DateTimeFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/DateTimeFieldType.php @@ -61,9 +61,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ @@ -74,9 +71,6 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -102,9 +96,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): ; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $data = parent::viewTransform($dataField); @@ -119,8 +110,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/EmailFieldType.php b/EMS/core-bundle/src/Form/DataField/EmailFieldType.php index 691af8d90..e5b15ff9e 100644 --- a/EMS/core-bundle/src/Form/DataField/EmailFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/EmailFieldType.php @@ -31,9 +31,6 @@ public function getLabel(): string return 'Email field'; } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -43,9 +40,6 @@ public function getDefaultOptions(string $name): array return $out; } - /** - * {@inheritDoc} - */ public function isValid(DataField &$dataField, DataField $parent = null, mixed &$masterRawData = null): bool { if ($this->hasDeletedParent($parent)) { @@ -63,9 +57,6 @@ public function isValid(DataField &$dataField, DataField $parent = null, mixed & return $isValid; } - /** - * {@inheritDoc} - */ public function modelTransform($data, FieldType $fieldType): DataField { if (empty($data)) { @@ -80,17 +71,12 @@ public function modelTransform($data, FieldType $fieldType): DataField return $out; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { return ['value' => parent::viewTransform($dataField)]; } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -113,9 +99,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/FormFieldType.php b/EMS/core-bundle/src/Form/DataField/FormFieldType.php index 6b8296100..8aca20986 100644 --- a/EMS/core-bundle/src/Form/DataField/FormFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/FormFieldType.php @@ -98,16 +98,10 @@ public function configureOptions(OptionsResolver $resolver): void ]); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -125,33 +119,21 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): ]); } - /** - * {@inheritDoc} - */ public static function isVirtual(array $option = []): bool { return true; } - /** - * {@inheritDoc} - */ public static function filterSubField(array $data, array $option): array { return $data; } - /** - * {@inheritDoc} - */ public static function getJsonNames(FieldType $current): array { return []; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return $this->fieldTypeType->generateMapping($this->getReferredFieldType($current)); @@ -184,9 +166,6 @@ public function getReferredFieldType(FieldType $fieldType): FieldType return $this->formManager->getByName($formName)->getFieldType(); } - /** - * {@inheritDoc} - */ public function reverseViewTransform($data, FieldType $fieldType): DataField { if (!\is_array($data)) { @@ -197,9 +176,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return parent::reverseViewTransform(RawDataTransformer::reverseTransform($referredFieldType, $data), $fieldType); } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $rawData = $dataField->getRawData(); diff --git a/EMS/core-bundle/src/Form/DataField/HiddenFieldType.php b/EMS/core-bundle/src/Form/DataField/HiddenFieldType.php index 3228cf7e9..cb0890d12 100644 --- a/EMS/core-bundle/src/Form/DataField/HiddenFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/HiddenFieldType.php @@ -38,9 +38,6 @@ public function getBlockPrefix(): string return 'empty'; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -49,8 +46,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/HolderFieldType.php b/EMS/core-bundle/src/Form/DataField/HolderFieldType.php index 2a14118c9..632510a06 100644 --- a/EMS/core-bundle/src/Form/DataField/HolderFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/HolderFieldType.php @@ -21,9 +21,6 @@ public function getBlockPrefix(): string return 'holder_field_type'; } - /** - * {@inheritDoc} - */ public function postFinalizeTreatment(string $type, string $id, DataField $dataField, mixed $previousData): mixed { if (!empty($previousData[$dataField->giveFieldType()->getName()])) { @@ -33,9 +30,6 @@ public function postFinalizeTreatment(string $type, string $id, DataField $dataF return null; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { throw new \Exception('This method should never be called'); @@ -68,16 +62,10 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('is_visible', false); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { } - /** - * {@inheritDoc} - */ public static function isContainer(): bool { return true; @@ -88,9 +76,6 @@ public static function isVisible(): bool return false; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -102,25 +87,16 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): $optionsForm->get('restrictionOptions')->remove('mandatory_if'); } - /** - * {@inheritDoc} - */ public static function isVirtual(array $option = []): bool { return true; } - /** - * {@inheritDoc} - */ public static function getJsonNames(FieldType $current): array { return []; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return []; diff --git a/EMS/core-bundle/src/Form/DataField/IconFieldType.php b/EMS/core-bundle/src/Form/DataField/IconFieldType.php index cf9f9f000..a267e2038 100644 --- a/EMS/core-bundle/src/Form/DataField/IconFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/IconFieldType.php @@ -40,9 +40,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -57,9 +54,6 @@ public function getBlockPrefix(): string return 'bypassdatafield'; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -68,8 +62,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/IndexedAssetFieldType.php b/EMS/core-bundle/src/Form/DataField/IndexedAssetFieldType.php index 34458c56d..8b3629f5f 100644 --- a/EMS/core-bundle/src/Form/DataField/IndexedAssetFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/IndexedAssetFieldType.php @@ -48,9 +48,6 @@ public function getParent(): string return FileType::class; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -81,9 +78,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('imageAssetConfigIdentifier', null); } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { $mapping = parent::generateMapping($current); @@ -106,9 +100,6 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function reverseViewTransform($data, FieldType $fieldType): DataField { $dataField = parent::reverseViewTransform($data, $fieldType); @@ -136,9 +127,6 @@ private function testDataField(DataField $dataField): void } } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -150,9 +138,6 @@ public function viewTransform(DataField $dataField) return $out; } - /** - * {@inheritDoc} - */ public function modelTransform($data, FieldType $fieldType): DataField { if (\is_array($data)) { diff --git a/EMS/core-bundle/src/Form/DataField/IntegerFieldType.php b/EMS/core-bundle/src/Form/DataField/IntegerFieldType.php index 08bc906bc..2926fc873 100644 --- a/EMS/core-bundle/src/Form/DataField/IntegerFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/IntegerFieldType.php @@ -19,9 +19,6 @@ public static function getIcon(): string return 'glyphicon glyphicon-sort-by-order'; } - /** - * {@inheritDoc} - */ public function isValid(DataField &$dataField, DataField $parent = null, mixed &$masterRawData = null): bool { if ($this->hasDeletedParent($parent)) { @@ -58,9 +55,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -68,9 +62,6 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ @@ -78,9 +69,6 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -98,9 +86,6 @@ public function getBlockPrefix(): string return 'bypassdatafield'; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -109,8 +94,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/JSONFieldType.php b/EMS/core-bundle/src/Form/DataField/JSONFieldType.php index a861f501b..f51196502 100644 --- a/EMS/core-bundle/src/Form/DataField/JSONFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/JSONFieldType.php @@ -54,8 +54,6 @@ public function viewTransform(DataField $dataField): array } /** - * {@inheritDoc} - * * @param ?array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -74,9 +72,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return $dataField; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -89,9 +84,6 @@ public function getBlockPrefix(): string return 'bypassdatafield'; } - /** - * {@inheritDoc} - */ public function isValid(DataField &$dataField, DataField $parent = null, mixed &$masterRawData = null): bool { if ($this->hasDeletedParent($parent)) { @@ -119,9 +111,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('prettyPrint', false); } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { if (!empty($current->getMappingOptions()) && !empty($current->getMappingOptions()['mappingOptions'])) { @@ -131,9 +120,6 @@ public function generateMapping(FieldType $current): array return []; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/JsonMenuEditorFieldType.php b/EMS/core-bundle/src/Form/DataField/JsonMenuEditorFieldType.php index 0c3da0328..1db5d9d85 100644 --- a/EMS/core-bundle/src/Form/DataField/JsonMenuEditorFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/JsonMenuEditorFieldType.php @@ -77,9 +77,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('nodeTypes', 'node'); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/JsonMenuLinkFieldType.php b/EMS/core-bundle/src/Form/DataField/JsonMenuLinkFieldType.php index 565def5e5..4854733b0 100644 --- a/EMS/core-bundle/src/Form/DataField/JsonMenuLinkFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/JsonMenuLinkFieldType.php @@ -38,9 +38,6 @@ public static function getIcon(): string return 'fa fa-link'; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -132,9 +129,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('query', false); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -162,9 +156,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -179,8 +170,6 @@ public function getBlockPrefix(): string } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -193,9 +182,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return parent::reverseViewTransform($value, $fieldType); } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $temp = parent::viewTransform($dataField); diff --git a/EMS/core-bundle/src/Form/DataField/JsonMenuNestedEditorFieldType.php b/EMS/core-bundle/src/Form/DataField/JsonMenuNestedEditorFieldType.php index 1a442d4e7..397e9ef55 100644 --- a/EMS/core-bundle/src/Form/DataField/JsonMenuNestedEditorFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/JsonMenuNestedEditorFieldType.php @@ -52,17 +52,11 @@ public function configureOptions(OptionsResolver $resolver): void ]); } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [$current->getName() => ['type' => 'text']]; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/JsonMenuNestedLinkFieldType.php b/EMS/core-bundle/src/Form/DataField/JsonMenuNestedLinkFieldType.php index 1ebf60a67..2639c09ab 100644 --- a/EMS/core-bundle/src/Form/DataField/JsonMenuNestedLinkFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/JsonMenuNestedLinkFieldType.php @@ -50,9 +50,6 @@ public static function getIcon(): string return 'fa fa-link'; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { $fieldType = $data->getFieldType(); @@ -131,9 +128,6 @@ public function configureOptions(OptionsResolver $resolver): void ; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -164,9 +158,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -181,8 +172,6 @@ public function getBlockPrefix(): string } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -195,9 +184,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return parent::reverseViewTransform($value, $fieldType); } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $temp = parent::viewTransform($dataField); @@ -245,9 +231,9 @@ public function viewTransform(DataField $dataField) */ private function buildChoices( FieldType $fieldType, - ?string $jmnQuery = null, - ?string $jmnField = null, - ?string $jmnChoicesTemplate = null, + string $jmnQuery = null, + string $jmnField = null, + string $jmnChoicesTemplate = null, array $jmnTypes = [], bool $jmnUnique = false, array $rawData = [], diff --git a/EMS/core-bundle/src/Form/DataField/MultiplexedTabContainerFieldType.php b/EMS/core-bundle/src/Form/DataField/MultiplexedTabContainerFieldType.php index 7756c77f0..3a44189cf 100644 --- a/EMS/core-bundle/src/Form/DataField/MultiplexedTabContainerFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/MultiplexedTabContainerFieldType.php @@ -46,9 +46,6 @@ public static function isNested(): bool return true; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -88,9 +85,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault(self::ICON_DISPLAY_OPTION, null); } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { $values = $current->getDisplayOption(self::VALUES_DISPLAY_OPTION); @@ -107,9 +101,6 @@ public function generateMapping(FieldType $current): array return $mapping; } - /** - * {@inheritDoc} - */ public static function getJsonNames(FieldType $current): array { $values = $current->getDisplayOption(self::VALUES_DISPLAY_OPTION); @@ -155,9 +146,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void } } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, float|int|bool|array|string|null $sourceArray, bool $isMigration): array { parent::importData($dataField, $sourceArray, $isMigration); @@ -165,17 +153,11 @@ public function importData(DataField $dataField, float|int|bool|array|string|nul return self::getJsonNames($dataField->giveFieldType()); } - /** - * {@inheritDoc} - */ public static function isVirtual(array $option = []): bool { return true; } - /** - * {@inheritDoc} - */ public function reverseViewTransform($data, FieldType $fieldType): DataField { if (\is_array($data)) { @@ -192,7 +174,7 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField /** * @return array */ - private function getChoices(FieldType $fieldType, ?string $locale = null): array + private function getChoices(FieldType $fieldType, string $locale = null): array { $choices = []; $labels = $fieldType->getDisplayOption(self::LABELS_DISPLAY_OPTION) ?? ''; diff --git a/EMS/core-bundle/src/Form/DataField/NestedFieldType.php b/EMS/core-bundle/src/Form/DataField/NestedFieldType.php index d7992eb89..6f834a5cb 100644 --- a/EMS/core-bundle/src/Form/DataField/NestedFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/NestedFieldType.php @@ -28,9 +28,6 @@ public static function getIcon(): string return 'glyphicon glyphicon-modal-window'; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { $migrationOptions = $dataField->giveFieldType()->getMigrationOptions(); @@ -85,17 +82,14 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('multiple', false); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (null == $data->giveFieldType()) { $tmp = []; /** @var DataField $child */ foreach ($data->getChildren() as $child) { -// $className = $child->getFieldType()->getType(); -// $class = new $className; + // $className = $child->getFieldType()->getType(); + // $class = new $className; $class = $this->formRegistry->getType($child->giveFieldType()->getType()); if (\method_exists($class, 'buildObjectArray')) { @@ -113,18 +107,12 @@ public static function isNested(): bool return true; } - /** - * {@inheritDoc} - */ public static function isContainer(): bool { /* this kind of compound field may contain children */ return true; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -137,9 +125,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): ]); } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ diff --git a/EMS/core-bundle/src/Form/DataField/NumberFieldType.php b/EMS/core-bundle/src/Form/DataField/NumberFieldType.php index 37b4dbd9f..45ff80186 100644 --- a/EMS/core-bundle/src/Form/DataField/NumberFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/NumberFieldType.php @@ -35,9 +35,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function isValid(DataField &$dataField, DataField $parent = null, mixed &$masterRawData = null): bool { if ($this->hasDeletedParent($parent)) { @@ -55,9 +52,6 @@ public function isValid(DataField &$dataField, DataField $parent = null, mixed & return $isValid; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -69,9 +63,6 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ @@ -79,23 +70,20 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); $optionsForm = $builder->get('options'); -// // String specific display options -// $optionsForm->get ( 'displayOptions' )->add ( 'choices', TextareaType::class, [ -// 'required' => false, -// ] )->add ( 'labels', TextareaType::class, [ -// 'required' => false, -// ] ); + // // String specific display options + // $optionsForm->get ( 'displayOptions' )->add ( 'choices', TextareaType::class, [ + // 'required' => false, + // ] )->add ( 'labels', TextareaType::class, [ + // 'required' => false, + // ] ); -// // String specific mapping options -// $optionsForm->get ( 'mappingOptions' )->add ( 'analyzer', AnalyzerPickerType::class); + // // String specific mapping options + // $optionsForm->get ( 'mappingOptions' )->add ( 'analyzer', AnalyzerPickerType::class); } public function getBlockPrefix(): string @@ -103,9 +91,6 @@ public function getBlockPrefix(): string return 'bypassdatafield'; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -114,8 +99,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/PasswordFieldType.php b/EMS/core-bundle/src/Form/DataField/PasswordFieldType.php index 78eddb5ef..d7130413a 100644 --- a/EMS/core-bundle/src/Form/DataField/PasswordFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/PasswordFieldType.php @@ -28,9 +28,6 @@ public static function getIcon(): string return 'glyphicon glyphicon-asterisk'; } - /** - * {@inheritDoc} - */ public function buildForm(FormBuilderInterface $builder, array $options): void { /** @var FieldType $fieldType */ @@ -58,9 +55,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('encryption', null); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -86,9 +80,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -101,8 +92,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -121,9 +110,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return parent::reverseViewTransform($out, $fieldType); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -134,9 +120,6 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); diff --git a/EMS/core-bundle/src/Form/DataField/RadioFieldType.php b/EMS/core-bundle/src/Form/DataField/RadioFieldType.php index 3d354d03e..bf40b841f 100644 --- a/EMS/core-bundle/src/Form/DataField/RadioFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/RadioFieldType.php @@ -62,9 +62,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('labels', []); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -82,9 +79,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -99,9 +93,6 @@ public function getBlockPrefix(): string return 'bypassdatafield'; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -110,8 +101,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/SelectFieldType.php b/EMS/core-bundle/src/Form/DataField/SelectFieldType.php index f57eb9105..12953526c 100644 --- a/EMS/core-bundle/src/Form/DataField/SelectFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/SelectFieldType.php @@ -23,9 +23,6 @@ public static function getIcon(): string return 'fa fa-caret-square-o-down'; } - /** - * {@inheritDoc} - */ public function buildForm(FormBuilderInterface $builder, array $options): void { /** @var FieldType $fieldType */ @@ -62,9 +59,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('multiple', false); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -76,9 +70,6 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -99,9 +90,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -117,8 +105,6 @@ public function getBlockPrefix(): string } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/SelectUserPropertyFieldType.php b/EMS/core-bundle/src/Form/DataField/SelectUserPropertyFieldType.php index c1ffcbc10..08de60f94 100644 --- a/EMS/core-bundle/src/Form/DataField/SelectUserPropertyFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/SelectUserPropertyFieldType.php @@ -84,9 +84,6 @@ public function configureOptions(OptionsResolver $resolver): void ; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -118,9 +115,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $test = parent::viewTransform($dataField); @@ -129,8 +123,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param ?array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/SubfieldType.php b/EMS/core-bundle/src/Form/DataField/SubfieldType.php index 7b6376d08..f6cde8a86 100644 --- a/EMS/core-bundle/src/Form/DataField/SubfieldType.php +++ b/EMS/core-bundle/src/Form/DataField/SubfieldType.php @@ -21,17 +21,11 @@ public static function getIcon(): string return 'fa fa-sitemap'; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { return []; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -45,9 +39,6 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): } } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { $options = $this->elasticsearchService->updateMapping(\array_merge(['type' => 'string'], \array_filter($current->getMappingOptions()))); @@ -57,9 +48,6 @@ public function generateMapping(FieldType $current): array ]; } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { // do nothing as it's a virtual field diff --git a/EMS/core-bundle/src/Form/DataField/TabsFieldType.php b/EMS/core-bundle/src/Form/DataField/TabsFieldType.php index dd7c32352..ca41cfb5c 100644 --- a/EMS/core-bundle/src/Form/DataField/TabsFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/TabsFieldType.php @@ -19,17 +19,11 @@ public function getLabel(): string return 'Visual tab container (invisible in Elasticsearch)'; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { throw new \Exception('This method should never be called'); } - /** - * {@inheritDoc} - */ public function getBlockPrefix(): string { return 'tabsfieldtype'; @@ -56,25 +50,16 @@ public function buildForm(FormBuilderInterface $builder, array $options): void } } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { } - /** - * {@inheritDoc} - */ public static function isContainer(): bool { /* this kind of compound field may contain children */ return true; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -86,25 +71,16 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options): $optionsForm->get('restrictionOptions')->remove('mandatory_if'); } - /** - * {@inheritDoc} - */ public static function isVirtual(array $option = []): bool { return true; } - /** - * {@inheritDoc} - */ public static function getJsonNames(FieldType $current): array { return []; } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return []; diff --git a/EMS/core-bundle/src/Form/DataField/TextStringFieldType.php b/EMS/core-bundle/src/Form/DataField/TextStringFieldType.php index d70411d0f..bb9021720 100644 --- a/EMS/core-bundle/src/Form/DataField/TextStringFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/TextStringFieldType.php @@ -35,18 +35,18 @@ public function buildView(FormView $view, FormInterface $form, array $options): $view->vars['attr']['placeholder'] = $options['placeholder']; } -// /** -// * -// * {@inheritDoc} -// * @see \EMS\CoreBundle\Form\DataField\DataFieldType::viewTransform() -// */ -// public function viewTransform(DataField $data){ -// $out = parent::viewTransform($data); -// if(empty($out)) { -// return ""; -// } -// return $out; -// } + // /** + // * + // * {@inheritDoc} + // * @see \EMS\CoreBundle\Form\DataField\DataFieldType::viewTransform() + // */ + // public function viewTransform(DataField $data){ + // $out = parent::viewTransform($data); + // if(empty($out)) { + // return ""; + // } + // return $out; + // } public static function getIcon(): string { @@ -71,9 +71,6 @@ public function configureOptions(OptionsResolver $resolver): void ]); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/TextareaFieldType.php b/EMS/core-bundle/src/Form/DataField/TextareaFieldType.php index f305f6f3f..bc4d53b6a 100644 --- a/EMS/core-bundle/src/Form/DataField/TextareaFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/TextareaFieldType.php @@ -70,9 +70,6 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setDefault('placeholder', null); } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); @@ -95,9 +92,6 @@ public function getBlockPrefix(): string return 'bypassdatafield'; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -106,8 +100,6 @@ public function viewTransform(DataField $dataField) } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/TimeFieldType.php b/EMS/core-bundle/src/Form/DataField/TimeFieldType.php index 657b3f865..3958b051b 100644 --- a/EMS/core-bundle/src/Form/DataField/TimeFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/TimeFieldType.php @@ -33,9 +33,6 @@ public static function getIcon(): string return 'fa fa-clock-o'; } - /** - * {@inheritDoc} - */ public function importData(DataField $dataField, array|string|int|float|bool|null $sourceArray, bool $isMigration): array { $migrationOptions = $dataField->giveFieldType()->getMigrationOptions(); @@ -78,9 +75,6 @@ public static function getFormat(array $options): string return $format; } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -99,9 +93,6 @@ public function viewTransform(DataField $dataField) return ''; } - /** - * {@inheritDoc} - */ public function reverseViewTransform($data, FieldType $fieldType): DataField { $format = static::getFormat($fieldType->getOptions()); @@ -115,9 +106,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return parent::reverseViewTransform($out, $fieldType); } - /** - * {@inheritDoc} - */ public function generateMapping(FieldType $current): array { return [ @@ -155,7 +143,7 @@ public function buildView(FormView $view, FormInterface $form, array $options): $attr['class'] .= ' timepicker'; $attr['data-show-meridian'] = $options['showMeridian'] ? 'true' : 'false'; -// $attr['data-provide'] = 'timepicker'; + // $attr['data-provide'] = 'timepicker'; $attr['data-default-time'] = $options['defaultTime']; $attr['data-show-seconds'] = $options['showSeconds']; $attr['data-explicit-mode'] = $options['explicitMode']; @@ -172,9 +160,6 @@ public function getParent(): string return IconTextType::class; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/DataField/VersionTagFieldType.php b/EMS/core-bundle/src/Form/DataField/VersionTagFieldType.php index cd18c4b8e..79c23b142 100644 --- a/EMS/core-bundle/src/Form/DataField/VersionTagFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/VersionTagFieldType.php @@ -86,9 +86,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function buildObjectArray(DataField $data, array &$out): void { if (!$data->giveFieldType()->getDeleted()) { @@ -96,17 +93,12 @@ public function buildObjectArray(DataField $data, array &$out): void } } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { return ['value' => parent::viewTransform($dataField)]; } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField diff --git a/EMS/core-bundle/src/Form/DataField/WysiwygFieldType.php b/EMS/core-bundle/src/Form/DataField/WysiwygFieldType.php index 533f240a8..abc22e20d 100644 --- a/EMS/core-bundle/src/Form/DataField/WysiwygFieldType.php +++ b/EMS/core-bundle/src/Form/DataField/WysiwygFieldType.php @@ -108,8 +108,6 @@ public function configureOptions(OptionsResolver $resolver): void } /** - * {@inheritDoc} - * * @param array $data */ public function reverseViewTransform($data, FieldType $fieldType): DataField @@ -128,9 +126,6 @@ public function reverseViewTransform($data, FieldType $fieldType): DataField return parent::reverseViewTransform($out, $fieldType); } - /** - * {@inheritDoc} - */ public function viewTransform(DataField $dataField) { $out = parent::viewTransform($dataField); @@ -150,9 +145,6 @@ public function viewTransform(DataField $dataField) return $out; } - /** - * {@inheritDoc} - */ public function getDefaultOptions(string $name): array { $out = parent::getDefaultOptions($name); @@ -165,9 +157,6 @@ public function getDefaultOptions(string $name): array return $out; } - /** - * {@inheritDoc} - */ public function buildOptionsForm(FormBuilderInterface $builder, array $options): void { parent::buildOptionsForm($builder, $options); diff --git a/EMS/core-bundle/src/Form/Factory/ObjectChoiceListFactory.php b/EMS/core-bundle/src/Form/Factory/ObjectChoiceListFactory.php index daff2bc15..4ef012317 100644 --- a/EMS/core-bundle/src/Form/Factory/ObjectChoiceListFactory.php +++ b/EMS/core-bundle/src/Form/Factory/ObjectChoiceListFactory.php @@ -16,7 +16,7 @@ public function __construct(private readonly ContentTypeService $contentTypes, p { } - public function createLoader(?string $types = null, bool $loadAll = false, bool $circleOnly = false, bool $withWarning = true, ?string $querySearchName = null): ObjectChoiceLoader + public function createLoader(string $types = null, bool $loadAll = false, bool $circleOnly = false, bool $withWarning = true, string $querySearchName = null): ObjectChoiceLoader { if (null === $types) { if ($loadAll && null === $querySearchName) { diff --git a/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceList.php b/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceList.php index 0160c71e3..c549de5b7 100644 --- a/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceList.php +++ b/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceList.php @@ -18,8 +18,6 @@ public function __construct(private readonly array $mapping, private readonly ar } /** - * {@inheritDoc} - * * @return array */ public function getChoices(): array @@ -30,8 +28,6 @@ public function getChoices(): array } /** - * {@inheritDoc} - * * @return array */ public function getValues(): array @@ -53,8 +49,6 @@ public function getStructuredValues(): array } /** - * {@inheritDoc} - * * @return array */ public function getOriginalKeys(): array @@ -68,8 +62,6 @@ public function getOriginalKeys(): array } /** - * {@inheritDoc} - * * @param array $choices * * @return array @@ -80,8 +72,6 @@ public function getChoicesForValues(array $choices): array } /** - * {@inheritDoc} - * * @param array $choices * * @return array diff --git a/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceLoader.php b/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceLoader.php index 546ff5782..179dbd98f 100644 --- a/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceLoader.php +++ b/EMS/core-bundle/src/Form/Field/ContentTypeFieldChoiceLoader.php @@ -17,9 +17,6 @@ public function __construct(array $mapping, array $types, bool $firstLevelOnly) $this->contentTypeFieldChoiceList = new ContentTypeFieldChoiceList($mapping, $types, $firstLevelOnly); } - /** - * {@inheritDoc} - */ public function loadChoiceList($value = null): ContentTypeFieldChoiceList { return $this->contentTypeFieldChoiceList; @@ -34,8 +31,6 @@ public function loadAll(): array } /** - * {@inheritDoc} - * * @param array $values * * @return array @@ -48,8 +43,6 @@ public function loadChoicesForValues(array $values, $value = null): array } /** - * {@inheritDoc} - * * @param array $choices * * @return array diff --git a/EMS/core-bundle/src/Form/Field/ObjectChoiceList.php b/EMS/core-bundle/src/Form/Field/ObjectChoiceList.php index 8ea31ee85..1841365cd 100644 --- a/EMS/core-bundle/src/Form/Field/ObjectChoiceList.php +++ b/EMS/core-bundle/src/Form/Field/ObjectChoiceList.php @@ -20,8 +20,6 @@ public function getTypes(): string } /** - * {@inheritDoc} - * * @return array */ public function getChoices(): array @@ -32,8 +30,6 @@ public function getChoices(): array } /** - * {@inheritDoc} - * * @return array */ public function getValues(): array @@ -55,8 +51,6 @@ public function getStructuredValues(): array } /** - * {@inheritDoc} - * * @return array */ public function getOriginalKeys(): array @@ -70,8 +64,6 @@ public function getOriginalKeys(): array } /** - * {@inheritDoc} - * * @param array $choices * * @return array @@ -84,8 +76,6 @@ public function getChoicesForValues(array $choices): array } /** - * {@inheritDoc} - * * @param array $choices * * @return array diff --git a/EMS/core-bundle/src/Form/Field/ObjectChoiceLoader.php b/EMS/core-bundle/src/Form/Field/ObjectChoiceLoader.php index 62dfd29f5..67d8cf5d0 100644 --- a/EMS/core-bundle/src/Form/Field/ObjectChoiceLoader.php +++ b/EMS/core-bundle/src/Form/Field/ObjectChoiceLoader.php @@ -20,9 +20,6 @@ public function __construct( $this->objectChoiceList = new ObjectChoiceList($objectChoiceCacheService, $types, $loadAll, $circleOnly, $withWarning, $querySearchName); } - /** - * {@inheritDoc} - */ public function loadChoiceList($value = null): ObjectChoiceList { return $this->objectChoiceList; @@ -37,8 +34,6 @@ public function loadAll(): array } /** - * {@inheritDoc} - * * @param array $values * * @return array @@ -51,8 +46,6 @@ public function loadChoicesForValues(array $values, $value = null): array } /** - * {@inheritDoc} - * * @param array $choices * * @return array diff --git a/EMS/core-bundle/src/Form/View/CalendarViewType.php b/EMS/core-bundle/src/Form/View/CalendarViewType.php index 5a5fec5cc..1ac9aee90 100644 --- a/EMS/core-bundle/src/Form/View/CalendarViewType.php +++ b/EMS/core-bundle/src/Form/View/CalendarViewType.php @@ -65,9 +65,6 @@ public function getBlockPrefix(): string return 'calendar_view'; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { $search = new Search(); diff --git a/EMS/core-bundle/src/Form/View/CriteriaViewType.php b/EMS/core-bundle/src/Form/View/CriteriaViewType.php index 8ed698402..15226ddae 100644 --- a/EMS/core-bundle/src/Form/View/CriteriaViewType.php +++ b/EMS/core-bundle/src/Form/View/CriteriaViewType.php @@ -70,9 +70,6 @@ public function getBlockPrefix(): string return 'criteria_view'; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { $criteriaUpdateConfig = new CriteriaUpdateConfig($view, $this->logger); diff --git a/EMS/core-bundle/src/Form/View/DataLinkViewType.php b/EMS/core-bundle/src/Form/View/DataLinkViewType.php index 391ea9499..b96761f02 100644 --- a/EMS/core-bundle/src/Form/View/DataLinkViewType.php +++ b/EMS/core-bundle/src/Form/View/DataLinkViewType.php @@ -60,9 +60,6 @@ public function render(View $view, DataLinks $dataLinks): void ]); } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { return []; diff --git a/EMS/core-bundle/src/Form/View/ExportViewType.php b/EMS/core-bundle/src/Form/View/ExportViewType.php index 5f888840d..814bafbd9 100644 --- a/EMS/core-bundle/src/Form/View/ExportViewType.php +++ b/EMS/core-bundle/src/Form/View/ExportViewType.php @@ -145,9 +145,6 @@ public function generateResponse(View $view, Request $request): Response return $response; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { try { diff --git a/EMS/core-bundle/src/Form/View/GalleryViewType.php b/EMS/core-bundle/src/Form/View/GalleryViewType.php index c610487d9..40c23ba19 100644 --- a/EMS/core-bundle/src/Form/View/GalleryViewType.php +++ b/EMS/core-bundle/src/Form/View/GalleryViewType.php @@ -58,9 +58,6 @@ public function getBlockPrefix(): string return 'gallery_view'; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { $search = new Search(); diff --git a/EMS/core-bundle/src/Form/View/HierarchicalViewType.php b/EMS/core-bundle/src/Form/View/HierarchicalViewType.php index 372452605..e89b4a5f5 100644 --- a/EMS/core-bundle/src/Form/View/HierarchicalViewType.php +++ b/EMS/core-bundle/src/Form/View/HierarchicalViewType.php @@ -126,9 +126,6 @@ public function getBlockPrefix(): string return 'hierarchical_view'; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { return []; diff --git a/EMS/core-bundle/src/Form/View/ImporterViewType.php b/EMS/core-bundle/src/Form/View/ImporterViewType.php index 8301a1506..864e323d4 100644 --- a/EMS/core-bundle/src/Form/View/ImporterViewType.php +++ b/EMS/core-bundle/src/Form/View/ImporterViewType.php @@ -78,9 +78,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { return []; diff --git a/EMS/core-bundle/src/Form/View/KeywordsViewType.php b/EMS/core-bundle/src/Form/View/KeywordsViewType.php index 12487aa96..85ef43d59 100644 --- a/EMS/core-bundle/src/Form/View/KeywordsViewType.php +++ b/EMS/core-bundle/src/Form/View/KeywordsViewType.php @@ -54,9 +54,6 @@ public function getBlockPrefix(): string return 'keywords_view'; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { $searchQuery = [ diff --git a/EMS/core-bundle/src/Form/View/ReportViewType.php b/EMS/core-bundle/src/Form/View/ReportViewType.php index 9737cfb80..33daa7198 100644 --- a/EMS/core-bundle/src/Form/View/ReportViewType.php +++ b/EMS/core-bundle/src/Form/View/ReportViewType.php @@ -70,9 +70,6 @@ public function getBlockPrefix(): string return 'report_view'; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { try { diff --git a/EMS/core-bundle/src/Form/View/SorterViewType.php b/EMS/core-bundle/src/Form/View/SorterViewType.php index 2d4a3b478..c9dd24de9 100644 --- a/EMS/core-bundle/src/Form/View/SorterViewType.php +++ b/EMS/core-bundle/src/Form/View/SorterViewType.php @@ -92,9 +92,6 @@ public function getBlockPrefix(): string return 'sorter_view'; } - /** - * {@inheritDoc} - */ public function getParameters(View $view, FormFactoryInterface $formFactory, Request $request): array { return []; diff --git a/EMS/core-bundle/src/Repository/FormSubmissionRepository.php b/EMS/core-bundle/src/Repository/FormSubmissionRepository.php index 8e74613e1..3e0d5507e 100644 --- a/EMS/core-bundle/src/Repository/FormSubmissionRepository.php +++ b/EMS/core-bundle/src/Repository/FormSubmissionRepository.php @@ -92,7 +92,7 @@ public function removeAllOutdatedSubmission(): int /** * @return FormSubmission[] */ - public function findFormSubmissions(?string $formInstance = null): array + public function findFormSubmissions(string $formInstance = null): array { $qb = $this->createQueryBuilder('fs'); diff --git a/EMS/core-bundle/src/Repository/RevisionRepository.php b/EMS/core-bundle/src/Repository/RevisionRepository.php index b43327862..b18cdeee6 100644 --- a/EMS/core-bundle/src/Repository/RevisionRepository.php +++ b/EMS/core-bundle/src/Repository/RevisionRepository.php @@ -26,7 +26,7 @@ */ class RevisionRepository extends EntityRepository { - public function findRevision(string $ouuid, string $contentTypeName, ?\DateTimeInterface $dateTime = null): ?Revision + public function findRevision(string $ouuid, string $contentTypeName, \DateTimeInterface $dateTime = null): ?Revision { $qb = $this->createQueryBuilder('r'); $qb @@ -575,7 +575,7 @@ public function deleteByOuuids(array $ouuids): int return $this->deleteByQueryBuilder($qb); } - public function lockRevisions(?ContentType $contentType, \DateTime $until, string $by, bool $force = false, ?string $ouuid = null, bool $onlyCurrentRevision = true): int + public function lockRevisions(?ContentType $contentType, \DateTime $until, string $by, bool $force = false, string $ouuid = null, bool $onlyCurrentRevision = true): int { $qbSelect = $this->createQueryBuilder('s'); $qbSelect @@ -838,7 +838,7 @@ public function getDraftInProgress(int $from, int $size, ?string $orderField, st return $qb->getQuery()->execute(); } - public function findLatestVersion(ContentType $contentType, string $versionOuuid, ?Environment $environment = null): ?Revision + public function findLatestVersion(ContentType $contentType, string $versionOuuid, Environment $environment = null): ?Revision { $toField = $contentType->getVersionDateToField(); diff --git a/EMS/core-bundle/src/Repository/ScheduleRepository.php b/EMS/core-bundle/src/Repository/ScheduleRepository.php index 75aecff0c..40345357b 100644 --- a/EMS/core-bundle/src/Repository/ScheduleRepository.php +++ b/EMS/core-bundle/src/Repository/ScheduleRepository.php @@ -112,7 +112,7 @@ private function addSearchFilters(QueryBuilder $qb, string $searchValue): void } } - public function findNext(?string $tag = null): ?Schedule + public function findNext(string $tag = null): ?Schedule { $qb = $this->createQueryBuilder('schedule'); $qb diff --git a/EMS/core-bundle/src/Repository/TemplateRepository.php b/EMS/core-bundle/src/Repository/TemplateRepository.php index cde781dac..d0bf3505b 100644 --- a/EMS/core-bundle/src/Repository/TemplateRepository.php +++ b/EMS/core-bundle/src/Repository/TemplateRepository.php @@ -26,7 +26,7 @@ public function __construct(Registry $registry) * * @return Template[] */ - public function findByRenderOptionAndContentType(string $option, ?array $contentTypes = null): array + public function findByRenderOptionAndContentType(string $option, array $contentTypes = null): array { $qb = $this->createQueryBuilder('t') ->select('t') diff --git a/EMS/core-bundle/src/Repository/UserRepository.php b/EMS/core-bundle/src/Repository/UserRepository.php index e4ee6f8ed..8202aba8b 100644 --- a/EMS/core-bundle/src/Repository/UserRepository.php +++ b/EMS/core-bundle/src/Repository/UserRepository.php @@ -36,7 +36,7 @@ public function save(User $user): void /** * @return array{count: int, results: iterable} */ - public function countFindAll(?string $email = null): array + public function countFindAll(string $email = null): array { $qb = $this->createQueryBuilder('u'); @@ -89,9 +89,6 @@ public function search(string $search): ?User return isset($result[0]) && $result[0] instanceof User ? $result[0] : null; } - /** - * {@inheritDoc} - */ public function findForRoleAndCircles(string $role, array $circles): array { $resultSet = $this->createQueryBuilder('u') diff --git a/EMS/core-bundle/src/Resources/DoctrineMigrations/pdo_pgsql/Version20170603232326.php b/EMS/core-bundle/src/Resources/DoctrineMigrations/pdo_pgsql/Version20170603232326.php index 51c115072..d07cd2ebd 100644 --- a/EMS/core-bundle/src/Resources/DoctrineMigrations/pdo_pgsql/Version20170603232326.php +++ b/EMS/core-bundle/src/Resources/DoctrineMigrations/pdo_pgsql/Version20170603232326.php @@ -38,10 +38,10 @@ public function down(Schema $schema): void $this->addSql('ALTER TABLE "user" DROP CONSTRAINT FK_8D93D649A282F7EA'); $this->addSql('DROP INDEX IDX_8D93D649A282F7EA'); $this->addSql('ALTER TABLE "user" ADD wysiwyg_profile TEXT DEFAULT NULL'); -// $this->addSql('UPDATE "user" SET wysiwyg_profile = '1'); -// $this->addSql('UPDATE "user" SET wysiwyg_profile_id = 3 where wysiwyg_profile = \'full\''); -// $this->addSql('UPDATE "user" SET wysiwyg_profile_id = 2 where wysiwyg_profile = \'light\''); -// $this->addSql('UPDATE "user" SET wysiwyg_profile_id = NULL where wysiwyg_profile = \'custom\''); + // $this->addSql('UPDATE "user" SET wysiwyg_profile = '1'); + // $this->addSql('UPDATE "user" SET wysiwyg_profile_id = 3 where wysiwyg_profile = \'full\''); + // $this->addSql('UPDATE "user" SET wysiwyg_profile_id = 2 where wysiwyg_profile = \'light\''); + // $this->addSql('UPDATE "user" SET wysiwyg_profile_id = NULL where wysiwyg_profile = \'custom\''); $this->addSql('ALTER TABLE "user" DROP wysiwyg_profile_id'); } } diff --git a/EMS/core-bundle/src/Service/ActionService.php b/EMS/core-bundle/src/Service/ActionService.php index 19b39bfa8..3cc054f2b 100644 --- a/EMS/core-bundle/src/Service/ActionService.php +++ b/EMS/core-bundle/src/Service/ActionService.php @@ -117,7 +117,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Service/Channel/ChannelService.php b/EMS/core-bundle/src/Service/Channel/ChannelService.php index e34cbe3f3..7d9f35e15 100644 --- a/EMS/core-bundle/src/Service/Channel/ChannelService.php +++ b/EMS/core-bundle/src/Service/Channel/ChannelService.php @@ -129,7 +129,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $schedule; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $channel = Channel::fromJson($json); if (null !== $name && $channel->getName() !== $name) { diff --git a/EMS/core-bundle/src/Service/ContentTypeService.php b/EMS/core-bundle/src/Service/ContentTypeService.php index be9ed22d1..9913b6326 100644 --- a/EMS/core-bundle/src/Service/ContentTypeService.php +++ b/EMS/core-bundle/src/Service/ContentTypeService.php @@ -137,7 +137,7 @@ public function getIndex(ContentType $contentType, Environment $environment = nu return $environment->getAlias(); } - public function updateMapping(ContentType $contentType, ?string $envs = null): void + public function updateMapping(ContentType $contentType, string $envs = null): void { try { $body = $this->environmentService->getIndexAnalysisConfiguration(); @@ -613,7 +613,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $this->updateFromJson($entity, $json, false, false); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $firstEnvironment = null; foreach ($this->environmentService->getEnvironments() as $environment) { diff --git a/EMS/core-bundle/src/Service/DataService.php b/EMS/core-bundle/src/Service/DataService.php index 5f3f1b83f..682cd42cf 100644 --- a/EMS/core-bundle/src/Service/DataService.php +++ b/EMS/core-bundle/src/Service/DataService.php @@ -122,7 +122,7 @@ public function __construct( } } - public function unlockRevision(Revision $revision, ?string $lockerUsername = null): void + public function unlockRevision(Revision $revision, string $lockerUsername = null): void { $lockerUsername ??= $this->userService->getCurrentUser()->getUsername(); @@ -136,7 +136,7 @@ public function unlockRevision(Revision $revision, ?string $lockerUsername = nul * @throws PrivilegeException * @throws \Exception */ - public function lockRevision(Revision $revision, Environment $publishEnv = null, bool $super = false, ?string $username = null): string + public function lockRevision(Revision $revision, Environment $publishEnv = null, bool $super = false, string $username = null): string { if (!empty($publishEnv) && !$this->authorizationChecker->isGranted($revision->giveContentType()->role(ContentTypeRoles::PUBLISH))) { throw new PrivilegeException($revision, 'You don\'t have publisher role for this content'); @@ -714,7 +714,7 @@ public function refresh(Environment $environment): bool * @throws \Exception * @throws \Throwable */ - public function finalizeDraft(Revision $revision, ?FormInterface &$form = null, ?string $username = null, bool $computeFields = true): Revision + public function finalizeDraft(Revision $revision, FormInterface &$form = null, string $username = null, bool $computeFields = true): Revision { if ($revision->getDeleted()) { throw new \Exception('Can not finalized a deleted revision'); @@ -872,7 +872,6 @@ private function logFormErrors(FormInterface $form): void * Parcours all fields and call DataFieldsType postFinalizeTreament function. * * @param FormInterface $form - * @param mixed $previousObjectArray */ public function postFinalizeTreatment(string $type, string $id, FormInterface $form, mixed $previousObjectArray = null): void { @@ -939,7 +938,7 @@ public function getNewestRevision(string $type, string $ouuid): Revision * @throws HasNotCircleException * @throws \Throwable */ - public function newDocument(ContentType $contentType, ?string $ouuid = null, ?array $rawData = null, ?string $username = null): Revision + public function newDocument(ContentType $contentType, string $ouuid = null, array $rawData = null, string $username = null): Revision { $this->hasCreateRights($contentType); /** @var RevisionRepository $revisionRepository */ @@ -1090,9 +1089,9 @@ private function setLabelField(Revision $revision): void { $objectArray = $revision->getRawData(); $labelField = $revision->giveContentType()->getLabelField(); - if (!empty($labelField) && - isset($objectArray[$labelField]) && - !empty($objectArray[$labelField])) { + if (!empty($labelField) + && isset($objectArray[$labelField]) + && !empty($objectArray[$labelField])) { $revision->setLabelField($objectArray[$labelField]); } else { $revision->setLabelField(null); @@ -1106,7 +1105,7 @@ private function setLabelField(Revision $revision): void * @throws OptimisticLockException * @throws \Exception */ - public function initNewDraft(string $type, string $ouuid, ?Revision $fromRev = null, ?string $username = null): Revision + public function initNewDraft(string $type, string $ouuid, Revision $fromRev = null, string $username = null): Revision { /** @var EntityManager $em */ $em = $this->doctrine->getManager(); @@ -1170,7 +1169,7 @@ public function initNewDraft(string $type, string $ouuid, ?Revision $fromRev = n * @throws OptimisticLockException * @throws PrivilegeException */ - public function discardDraft(Revision $revision, bool $super = false, ?string $username = null): ?int + public function discardDraft(Revision $revision, bool $super = false, string $username = null): ?int { $this->lockRevision($revision, null, $super, $username); @@ -1556,7 +1555,7 @@ public function getSubmitData(FormInterface $form) return $out; } - public function getEmptyRevision(ContentType $contentType, ?string $user = null): Revision + public function getEmptyRevision(ContentType $contentType, string $user = null): Revision { $now = new \DateTime(); $until = $now->add(new \DateInterval('PT5M')); // +5 minutes diff --git a/EMS/core-bundle/src/Service/EntityServiceInterface.php b/EMS/core-bundle/src/Service/EntityServiceInterface.php index 91555051b..791aa2f58 100644 --- a/EMS/core-bundle/src/Service/EntityServiceInterface.php +++ b/EMS/core-bundle/src/Service/EntityServiceInterface.php @@ -33,7 +33,7 @@ public function getByItemName(string $name): ?EntityInterface; public function updateEntityFromJson(EntityInterface $entity, string $json): EntityInterface; - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface; + public function createEntityFromJson(string $json, string $name = null): EntityInterface; public function deleteByItemName(string $name): string; } diff --git a/EMS/core-bundle/src/Service/EnvironmentService.php b/EMS/core-bundle/src/Service/EnvironmentService.php index 2e642383f..dd01b31e1 100644 --- a/EMS/core-bundle/src/Service/EnvironmentService.php +++ b/EMS/core-bundle/src/Service/EnvironmentService.php @@ -408,7 +408,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $environment; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $meta = JsonClass::fromJsonString($json); $environment = $meta->jsonDeserialize(); diff --git a/EMS/core-bundle/src/Service/FileService.php b/EMS/core-bundle/src/Service/FileService.php index e47a4d694..c2c17f30e 100644 --- a/EMS/core-bundle/src/Service/FileService.php +++ b/EMS/core-bundle/src/Service/FileService.php @@ -433,7 +433,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Service/Form/Submission/FormSubmissionService.php b/EMS/core-bundle/src/Service/Form/Submission/FormSubmissionService.php index b9346a897..556727ddc 100644 --- a/EMS/core-bundle/src/Service/Form/Submission/FormSubmissionService.php +++ b/EMS/core-bundle/src/Service/Form/Submission/FormSubmissionService.php @@ -153,7 +153,7 @@ public function getAllFormSubmissions(): array /** * @return FormSubmission[] */ - public function getFormSubmissions(?string $formInstance = null): array + public function getFormSubmissions(string $formInstance = null): array { return $this->formSubmissionRepository->findFormSubmissions($formInstance); } @@ -266,7 +266,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Service/I18nService.php b/EMS/core-bundle/src/Service/I18nService.php index 61d6d196f..12cc22900 100644 --- a/EMS/core-bundle/src/Service/I18nService.php +++ b/EMS/core-bundle/src/Service/I18nService.php @@ -126,7 +126,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $i18n; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $i18n = I18n::fromJson($json); if (null !== $name && $i18n->getIdentifier() !== $name) { diff --git a/EMS/core-bundle/src/Service/IndexService.php b/EMS/core-bundle/src/Service/IndexService.php index 3a8f3930e..ce98864ad 100644 --- a/EMS/core-bundle/src/Service/IndexService.php +++ b/EMS/core-bundle/src/Service/IndexService.php @@ -50,7 +50,7 @@ public function deleteIndex(string $indexName): void } } - public function indexRevision(Revision $revision, ?Environment $environment = null): bool + public function indexRevision(Revision $revision, Environment $environment = null): bool { $contentType = $revision->getContentType(); if (null === $contentType) { @@ -112,7 +112,7 @@ public function updateAlias(string $aliasName, array $indexesToRemove, array $in $this->aliasService->updateAlias($aliasName, $actions); } - public function delete(Revision $revision, ?Environment $environment = null): void + public function delete(Revision $revision, Environment $environment = null): void { $contentType = $revision->getContentType(); if (null === $contentType) { diff --git a/EMS/core-bundle/src/Service/JobService.php b/EMS/core-bundle/src/Service/JobService.php index 5b5b53ab7..8352cc445 100644 --- a/EMS/core-bundle/src/Service/JobService.php +++ b/EMS/core-bundle/src/Service/JobService.php @@ -35,7 +35,7 @@ public function __construct( $this->em = $doctrine->getManager(); } - public function nextJob(?string $tag = null): ?Job + public function nextJob(string $tag = null): ?Job { return $this->repository->findOneBy( ['started' => false, 'done' => false, 'tag' => $tag], @@ -102,7 +102,7 @@ public function newJob(UserInterface $user): Job return $job; } - public function createCommand(UserInterface $user, ?string $command, ?string $tag = null): Job + public function createCommand(UserInterface $user, ?string $command, string $tag = null): Job { $job = $this->newJob($user); $job->setCommand($command); @@ -167,7 +167,7 @@ public function start(Job $job): JobOutput return $output; } - public function finish(int $jobId, ?string $errorMessage = null): void + public function finish(int $jobId, string $errorMessage = null): void { $job = $this->repository->findById($jobId); $job->setDone(true); @@ -267,7 +267,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('Job entities doesn\'t support JSON update'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { if (null !== $name) { throw new \RuntimeException('Job entities doesn\'t support JSON update'); diff --git a/EMS/core-bundle/src/Service/Mapping.php b/EMS/core-bundle/src/Service/Mapping.php index 0cd0155e7..5513f2201 100644 --- a/EMS/core-bundle/src/Service/Mapping.php +++ b/EMS/core-bundle/src/Service/Mapping.php @@ -148,7 +148,7 @@ public function getMapping(array $environmentNames): ?array /** * @param array $body */ - public function createIndex(string $indexName, array $body, ?string $aliasName = null): bool + public function createIndex(string $indexName, array $body, string $aliasName = null): bool { $existsEndpoint = new Exists(); $existsEndpoint->setIndex($indexName); diff --git a/EMS/core-bundle/src/Service/NotificationService.php b/EMS/core-bundle/src/Service/NotificationService.php index 3dd902993..cdb0ba8c7 100644 --- a/EMS/core-bundle/src/Service/NotificationService.php +++ b/EMS/core-bundle/src/Service/NotificationService.php @@ -130,7 +130,7 @@ public function setStatus(Notification $notification, string $status, string $le /** * Call addNotification when click on a request. */ - public function addNotification(Template $template, Revision $revision, Environment $environment, ?string $username = null): ?bool + public function addNotification(Template $template, Revision $revision, Environment $environment, string $username = null): ?bool { $out = false; try { @@ -217,7 +217,7 @@ public function addNotification(Template $template, Revision $revision, Environm /** * @param ?array $filters */ - public function menuNotification(?array $filters = null): int + public function menuNotification(array $filters = null): int { $contentTypes = null; $environments = null; diff --git a/EMS/core-bundle/src/Service/ObjectChoiceCacheService.php b/EMS/core-bundle/src/Service/ObjectChoiceCacheService.php index e8b305061..1f997c2b7 100644 --- a/EMS/core-bundle/src/Service/ObjectChoiceCacheService.php +++ b/EMS/core-bundle/src/Service/ObjectChoiceCacheService.php @@ -31,7 +31,7 @@ public function __construct(private readonly LoggerInterface $logger, private re /** * @param ObjectChoiceListItem[] $choices */ - public function loadAll(array &$choices, string $types, bool $circleOnly = false, bool $withWarning = true, ?string $querySearchName = null): void + public function loadAll(array &$choices, string $types, bool $circleOnly = false, bool $withWarning = true, string $querySearchName = null): void { if (null !== $querySearchName) { $this->loadAllFromQuerySearch($choices, $querySearchName); diff --git a/EMS/core-bundle/src/Service/PublishService.php b/EMS/core-bundle/src/Service/PublishService.php index aa3284bcd..76dad2b43 100644 --- a/EMS/core-bundle/src/Service/PublishService.php +++ b/EMS/core-bundle/src/Service/PublishService.php @@ -102,7 +102,7 @@ public function silentUnpublish(Revision $revision, bool $flush = true): void } } - public function bulkStart(int $bulkSize, ?LoggerInterface $logger = null): void + public function bulkStart(int $bulkSize, LoggerInterface $logger = null): void { $this->bulker->setSize($bulkSize); $this->bulker->setLogger($logger ?? new NullLogger()); @@ -214,7 +214,7 @@ public function getEnvironmentPublisher(Environment $environment): EnvironmentPu * @throws NonUniqueResultException * @throws DBALException */ - public function publish(Revision $revision, Environment $environment, ?string $commandUser = null, bool $canPublish = false): int + public function publish(Revision $revision, Environment $environment, string $commandUser = null, bool $canPublish = false): int { $logContext = LogRevisionContext::publish($revision, $environment); if (null === $commandUser && !$canPublish && !$this->canPublish($revision, $environment)) { @@ -378,7 +378,7 @@ private function runAlignRevision(string $ouuid, ContentType $contentType, Envir } } - private function publishVersion(Revision $revision, Environment $environment, ?string $commandUser = null): void + private function publishVersion(Revision $revision, Environment $environment, string $commandUser = null): void { if (!$revision->hasVersionTags()) { return; diff --git a/EMS/core-bundle/src/Service/QuerySearchService.php b/EMS/core-bundle/src/Service/QuerySearchService.php index 2174004b3..82a874eb1 100644 --- a/EMS/core-bundle/src/Service/QuerySearchService.php +++ b/EMS/core-bundle/src/Service/QuerySearchService.php @@ -211,7 +211,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $querySearch; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $querySearch = $this->buildQuerySearch($json); if (null !== $name && $querySearch->getName() !== $name) { @@ -234,7 +234,7 @@ public function deleteByItemName(string $name): string return $id; } - private function buildQuerySearch(string $json, ?EntityInterface $entity = null): QuerySearch + private function buildQuerySearch(string $json, EntityInterface $entity = null): QuerySearch { $querySearch = QuerySearch::fromJson($json, $entity); foreach ($querySearch->getEnvironments() as $environment) { diff --git a/EMS/core-bundle/src/Service/ReleaseRevisionService.php b/EMS/core-bundle/src/Service/ReleaseRevisionService.php index 33854988f..317ac7c53 100644 --- a/EMS/core-bundle/src/Service/ReleaseRevisionService.php +++ b/EMS/core-bundle/src/Service/ReleaseRevisionService.php @@ -151,7 +151,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Service/ReleaseService.php b/EMS/core-bundle/src/Service/ReleaseService.php index 72193677d..43e95e9a9 100644 --- a/EMS/core-bundle/src/Service/ReleaseService.php +++ b/EMS/core-bundle/src/Service/ReleaseService.php @@ -258,7 +258,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not supported for releases'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not supported for releases'); } diff --git a/EMS/core-bundle/src/Service/Revision/RevisionService.php b/EMS/core-bundle/src/Service/Revision/RevisionService.php index c18f26e72..1373fdc53 100644 --- a/EMS/core-bundle/src/Service/Revision/RevisionService.php +++ b/EMS/core-bundle/src/Service/Revision/RevisionService.php @@ -124,7 +124,7 @@ public function deleteOldest(ContentType $contentType): int return $this->revisionRepository->deleteOldest($contentType); } - public function display(Revision|Document|string $value, ?string $expression = null): string + public function display(Revision|Document|string $value, string $expression = null): string { if (\is_string($value)) { if (null === $object = $this->getByEmsLink(EMSLink::fromText($value))) { @@ -197,12 +197,12 @@ public function findAllDraftsByContentTypeName(string $contentTypeName): iterabl return $this->revisionRepository->findAllDraftsByContentTypeName($contentTypeName); } - public function get(string $ouuid, string $contentType, ?\DateTimeInterface $dateTime = null): ?Revision + public function get(string $ouuid, string $contentType, \DateTimeInterface $dateTime = null): ?Revision { return $this->revisionRepository->findRevision($ouuid, $contentType, $dateTime); } - public function getByEmsLink(EMSLink $emsLink, ?\DateTimeInterface $dateTime = null): ?Revision + public function getByEmsLink(EMSLink $emsLink, \DateTimeInterface $dateTime = null): ?Revision { if (!$emsLink->isValid()) { return null; @@ -281,7 +281,7 @@ public function getDocumentsInfo(EMSLink ...$documentLinks): array /** * @param array $rawData */ - public function create(ContentType $contentType, ?UuidInterface $uuid = null, array $rawData = [], ?string $username = null): Revision + public function create(ContentType $contentType, UuidInterface $uuid = null, array $rawData = [], string $username = null): Revision { return $this->dataService->newDocument($contentType, null === $uuid ? null : $uuid->toString(), $rawData, $username); } @@ -289,7 +289,7 @@ public function create(ContentType $contentType, ?UuidInterface $uuid = null, ar /** * @param array $mergeRawData */ - public function copy(Revision $revision, ?array $mergeRawData = null): void + public function copy(Revision $revision, array $mergeRawData = null): void { $copiedRevision = $revision->clone(); @@ -305,7 +305,7 @@ public function copy(Revision $revision, ?array $mergeRawData = null): void /** * @param array $rawData */ - public function updateRawData(Revision $revision, array $rawData, ?string $username = null, bool $merge = true): Revision + public function updateRawData(Revision $revision, array $rawData, string $username = null, bool $merge = true): Revision { $contentTypeName = $revision->giveContentType()->getName(); if ($revision->getDraft()) { diff --git a/EMS/core-bundle/src/Service/SearchService.php b/EMS/core-bundle/src/Service/SearchService.php index f31500f25..5a171b9e4 100644 --- a/EMS/core-bundle/src/Service/SearchService.php +++ b/EMS/core-bundle/src/Service/SearchService.php @@ -103,7 +103,7 @@ public function generateSearch(Search $search): CommonSearch return $commonSearch; } - public function getDocument(ContentType $contentType, string $ouuid, ?Environment $environment = null): ElasticsearchDocument + public function getDocument(ContentType $contentType, string $ouuid, Environment $environment = null): ElasticsearchDocument { $environment ??= $contentType->giveEnvironment(); $index = $this->contentTypeService->getIndex($contentType, $environment); diff --git a/EMS/core-bundle/src/Service/TemplateService.php b/EMS/core-bundle/src/Service/TemplateService.php index 6ef1d8667..daa7cce23 100644 --- a/EMS/core-bundle/src/Service/TemplateService.php +++ b/EMS/core-bundle/src/Service/TemplateService.php @@ -75,7 +75,7 @@ public function renderFilename(DocumentInterface $document, ContentType $content /** * @param array $source */ - public function getXml(ContentType $contentType, array $source, bool $arrayOfDocument, ?string $ouuid = null): string + public function getXml(ContentType $contentType, array $source, bool $arrayOfDocument, string $ouuid = null): string { $xmlDocument = new \DOMDocument(); if ($arrayOfDocument) { diff --git a/EMS/core-bundle/src/Service/UserService.php b/EMS/core-bundle/src/Service/UserService.php index 326041a3d..4a3182e77 100644 --- a/EMS/core-bundle/src/Service/UserService.php +++ b/EMS/core-bundle/src/Service/UserService.php @@ -293,7 +293,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent throw new \RuntimeException('updateEntityFromJson method not yet implemented'); } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { throw new \RuntimeException('createEntityFromJson method not yet implemented'); } diff --git a/EMS/core-bundle/src/Service/WysiwygProfileService.php b/EMS/core-bundle/src/Service/WysiwygProfileService.php index 9dc87ae84..2179ea103 100644 --- a/EMS/core-bundle/src/Service/WysiwygProfileService.php +++ b/EMS/core-bundle/src/Service/WysiwygProfileService.php @@ -100,7 +100,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $profile; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $profile = WysiwygProfile::fromJson($json); if (null !== $name && $profile->getName() !== $name) { diff --git a/EMS/core-bundle/src/Service/WysiwygStylesSetService.php b/EMS/core-bundle/src/Service/WysiwygStylesSetService.php index bea1c19f2..5065492b6 100644 --- a/EMS/core-bundle/src/Service/WysiwygStylesSetService.php +++ b/EMS/core-bundle/src/Service/WysiwygStylesSetService.php @@ -117,7 +117,7 @@ public function updateEntityFromJson(EntityInterface $entity, string $json): Ent return $stylesSet; } - public function createEntityFromJson(string $json, ?string $name = null): EntityInterface + public function createEntityFromJson(string $json, string $name = null): EntityInterface { $styleSet = WysiwygStylesSet::fromJson($json); if (null !== $name && $styleSet->getName() !== $name) { diff --git a/EMS/core-bundle/src/Twig/AppExtension.php b/EMS/core-bundle/src/Twig/AppExtension.php index 6e7f9c44a..3a0f81cac 100644 --- a/EMS/core-bundle/src/Twig/AppExtension.php +++ b/EMS/core-bundle/src/Twig/AppExtension.php @@ -78,9 +78,6 @@ public function __construct( ) { } - /** - * {@inheritDoc} - */ public function getFunctions(): array { return [ @@ -130,9 +127,6 @@ public function getFunctions(): array ]; } - /** - * {@inheritDoc} - */ public function getFilters(): array { return [ @@ -353,7 +347,7 @@ public function diffIcon($rawData, bool $compare, string $fieldName, $compareRaw /** * @param mixed|null $rawData - * @param mixed|null$compareRawData + * @param mixed|null $compareRawData */ public function diffTime($rawData, bool $compare, string $fieldName, $compareRawData, string $format1, string $format2): string { @@ -701,7 +695,7 @@ public function deprecatedSearch(array $params): array * @param array|null $sort * @param string[]|null $sources */ - public function search(array $indexes, array $body = [], array $contentTypes = [], ?int $size = null, int $from = 0, ?array $sort = null, ?array $sources = null): ResultSet + public function search(array $indexes, array $body = [], array $contentTypes = [], int $size = null, int $from = 0, array $sort = null, array $sources = null): ResultSet { $query = $this->elasticaService->filterByContentTypes(null, $contentTypes); @@ -979,7 +973,7 @@ public function data(?string $key): ?array return $this->get($key)?->getSource(); } - public function get(?string $key, ?Environment $environment = null): ?DocumentInterface + public function get(?string $key, Environment $environment = null): ?DocumentInterface { if (empty($key)) { return null; diff --git a/EMS/core-bundle/src/Twig/RevisionRuntime.php b/EMS/core-bundle/src/Twig/RevisionRuntime.php index f2a5673e5..8a7a30635 100644 --- a/EMS/core-bundle/src/Twig/RevisionRuntime.php +++ b/EMS/core-bundle/src/Twig/RevisionRuntime.php @@ -19,7 +19,7 @@ public function __construct(private readonly RevisionService $revisionService) { } - public function display(Revision|Document|string $display, ?string $expression = null): string + public function display(Revision|Document|string $display, string $expression = null): string { return $this->revisionService->display($display, $expression); } diff --git a/EMS/form-bundle/src/Components/EventSubscriber/NestedChoiceEventSubscriber.php b/EMS/form-bundle/src/Components/EventSubscriber/NestedChoiceEventSubscriber.php index ac4dec916..fd53bf22f 100644 --- a/EMS/form-bundle/src/Components/EventSubscriber/NestedChoiceEventSubscriber.php +++ b/EMS/form-bundle/src/Components/EventSubscriber/NestedChoiceEventSubscriber.php @@ -89,7 +89,7 @@ private function initialFieldName(FormInterface $form): string /** * @param FormInterface $form */ - private function addField(string $fieldName, string $choice, FormInterface $form, ?string $defaultData = null): void + private function addField(string $fieldName, string $choice, FormInterface $form, string $defaultData = null): void { $options = $this->field->getOptions(); diff --git a/EMS/form-bundle/src/Controller/DebugController.php b/EMS/form-bundle/src/Controller/DebugController.php index 73438ea47..554b97620 100644 --- a/EMS/form-bundle/src/Controller/DebugController.php +++ b/EMS/form-bundle/src/Controller/DebugController.php @@ -14,7 +14,7 @@ class DebugController extends AbstractFormController { /** - * @param string [] $locales + * @param string[] $locales */ public function __construct(private readonly FormFactory $formFactory, private readonly Client $client, private readonly Environment $twig, private readonly RouterInterface $router, private readonly array $locales) { diff --git a/EMS/form-bundle/src/DependencyInjection/EMSFormExtension.php b/EMS/form-bundle/src/DependencyInjection/EMSFormExtension.php index 4b06bedd8..0e443aeb2 100644 --- a/EMS/form-bundle/src/DependencyInjection/EMSFormExtension.php +++ b/EMS/form-bundle/src/DependencyInjection/EMSFormExtension.php @@ -10,8 +10,6 @@ class EMSFormExtension extends Extension { /** - * {@inheritdoc} - * * @param mixed[] $configs */ public function load(array $configs, ContainerBuilder $container): void diff --git a/EMS/form-bundle/src/Submission/AbstractHandleResponse.php b/EMS/form-bundle/src/Submission/AbstractHandleResponse.php index d8d8bd7f7..204cab7f0 100644 --- a/EMS/form-bundle/src/Submission/AbstractHandleResponse.php +++ b/EMS/form-bundle/src/Submission/AbstractHandleResponse.php @@ -48,9 +48,6 @@ public function getResponse(): string } } - /** - * {@inheritDoc} - */ public function getSummary(): array { /** @var array{status: string, data: string, success: string} $summary */ diff --git a/EMS/form-bundle/src/Submission/FormData.php b/EMS/form-bundle/src/Submission/FormData.php index 812968e10..7c4b2625f 100644 --- a/EMS/form-bundle/src/Submission/FormData.php +++ b/EMS/form-bundle/src/Submission/FormData.php @@ -86,7 +86,7 @@ public function getFileFromUuid(string $uuid): UploadedFile */ private function recursiveFilesAsUuid(array &$raw): void { - foreach ($raw as $key => &$data) { + foreach ($raw as $key => &$data) { if (\is_array($data)) { $this->recursiveFilesAsUuid($data); continue; diff --git a/EMS/helpers/src/File/TempFile.php b/EMS/helpers/src/File/TempFile.php index 7c1d18e76..7a2436a9a 100644 --- a/EMS/helpers/src/File/TempFile.php +++ b/EMS/helpers/src/File/TempFile.php @@ -14,7 +14,7 @@ private function __construct(public readonly string $path) { } - public static function create(?string $cacheFolder = null): self + public static function create(string $cacheFolder = null): self { if (!$path = \tempnam($cacheFolder ?? \sys_get_temp_dir(), self::PREFIX)) { throw new \RuntimeException(\sprintf('Could not create temp file in "%s"', \sys_get_temp_dir())); @@ -23,7 +23,7 @@ public static function create(?string $cacheFolder = null): self return new self($path); } - public static function createNamed(string $name, ?string $cacheFolder = null): self + public static function createNamed(string $name, string $cacheFolder = null): self { return new self(\implode(\DIRECTORY_SEPARATOR, [$cacheFolder ?? \sys_get_temp_dir(), self::PREFIX.$name])); } diff --git a/EMS/helpers/src/Standard/Hash.php b/EMS/helpers/src/Standard/Hash.php index c54575cb5..fb6773b35 100644 --- a/EMS/helpers/src/Standard/Hash.php +++ b/EMS/helpers/src/Standard/Hash.php @@ -6,7 +6,7 @@ final class Hash { - public static function string(string $value, ?string $prefix = null): string + public static function string(string $value, string $prefix = null): string { return self::hash($value, $prefix); } @@ -14,12 +14,12 @@ public static function string(string $value, ?string $prefix = null): string /** * @param array $value */ - public static function array(array $value, ?string $prefix = null): string + public static function array(array $value, string $prefix = null): string { return self::hash(Json::encode($value), $prefix); } - private static function hash(string $value, ?string $prefix = null): string + private static function hash(string $value, string $prefix = null): string { return $prefix.\sha1($value); } diff --git a/EMS/submission-bundle/src/DependencyInjection/EMSSubmissionExtension.php b/EMS/submission-bundle/src/DependencyInjection/EMSSubmissionExtension.php index 658fb038b..97449068a 100644 --- a/EMS/submission-bundle/src/DependencyInjection/EMSSubmissionExtension.php +++ b/EMS/submission-bundle/src/DependencyInjection/EMSSubmissionExtension.php @@ -13,9 +13,6 @@ final class EMSSubmissionExtension extends Extension implements PrependExtensionInterface { - /** - * {@inheritDoc} - */ public function load(array $configs, ContainerBuilder $container): void { $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); diff --git a/EMS/submission-bundle/src/Entity/FormSubmissionFile.php b/EMS/submission-bundle/src/Entity/FormSubmissionFile.php index 691049cfd..4279f7137 100644 --- a/EMS/submission-bundle/src/Entity/FormSubmissionFile.php +++ b/EMS/submission-bundle/src/Entity/FormSubmissionFile.php @@ -75,7 +75,7 @@ public function __construct(/** * * @ORM\JoinColumn(name="form_submission_id", referencedColumnName="id") */ - private FormSubmission $formSubmission, array $file) + private FormSubmission $formSubmission, array $file) { $now = new \DateTime(); diff --git a/EMS/xliff/src/Xliff/Extractor.php b/EMS/xliff/src/Xliff/Extractor.php index 1abd0ead6..4cd39923f 100644 --- a/EMS/xliff/src/Xliff/Extractor.php +++ b/EMS/xliff/src/Xliff/Extractor.php @@ -185,7 +185,7 @@ public function getDom(): \DOMDocument return $this->dom; } - public function addSimpleField(\DOMElement $document, string $fieldPath, string $source, ?string $target = null, bool $isFinal = false): void + public function addSimpleField(\DOMElement $document, string $fieldPath, string $source, string $target = null, bool $isFinal = false): void { $xliffAttributes = [ 'id' => $fieldPath, @@ -204,7 +204,7 @@ public function addSimpleField(\DOMElement $document, string $fieldPath, string $this->addTextSegment($unit, $this->escapeSpecialCharacters($source), null === $target ? null : $this->escapeSpecialCharacters($target), $isFinal); } - public function addHtmlField(\DOMElement $document, string $fieldPath, ?string $sourceHtml, ?string $targetHtml = null, ?string $baselineHtml = null, bool $isFinal = false): void + public function addHtmlField(\DOMElement $document, string $fieldPath, ?string $sourceHtml, string $targetHtml = null, string $baselineHtml = null, bool $isFinal = false): void { $sourceCrawler = new Crawler(HtmlHelper::prettyPrint($sourceHtml)); $targetCrawler = new Crawler(HtmlHelper::prettyPrint($targetHtml)); @@ -395,7 +395,7 @@ public function getSourceLocale(): string return $this->sourceLocale; } - private function getId(\DOMNode $domNode, ?string $attributeName = null): string + private function getId(\DOMNode $domNode, string $attributeName = null): string { $id = $domNode->getNodePath(); if (null === $id) { diff --git a/EMS/xliff/src/Xliff/InsertionRevision.php b/EMS/xliff/src/Xliff/InsertionRevision.php index d8ff66aa8..f3421b996 100644 --- a/EMS/xliff/src/Xliff/InsertionRevision.php +++ b/EMS/xliff/src/Xliff/InsertionRevision.php @@ -156,7 +156,7 @@ private function importSimpleField(InsertReport $insertReport, \DOMElement $segm $this->importField($insertReport, $segment, $sourceLocale, $targetLocale, $extractedRawData, $sourceValue, $insertRawData, $targetValue, null); } - public function getAttributeValue(\DOMElement $field, string $attributeName, ?string $defaultValue = null): ?string + public function getAttributeValue(\DOMElement $field, string $attributeName, string $defaultValue = null): ?string { if (!\str_contains($attributeName, ':')) { $nameSpace = null; diff --git a/EMS/xliff/tests/Unit/Xliff/BaselineTest.php b/EMS/xliff/tests/Unit/Xliff/BaselineTest.php index f1ed1a31d..1911e940f 100644 --- a/EMS/xliff/tests/Unit/Xliff/BaselineTest.php +++ b/EMS/xliff/tests/Unit/Xliff/BaselineTest.php @@ -24,8 +24,8 @@ public function testLoadBaseline2(): void $document->extractTranslations($insertReport, $extractedRawData, $insertRawData); $this->assertEquals('Lohn für Arbeitsanfänger', $insertRawData['title'] ?? null); $this->assertEquals('Lohn für Arbeitsanfänger', $insertRawData['title_short'] ?? null); -// \file_put_contents(\join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'Resources', 'Baseline', 'baseline2_description.html']), $insertRawData['description']); -// \file_put_contents(\join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'Resources', 'Baseline', 'baseline2_introduction.html']), $insertRawData['introduction']); + // \file_put_contents(\join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'Resources', 'Baseline', 'baseline2_description.html']), $insertRawData['description']); + // \file_put_contents(\join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'Resources', 'Baseline', 'baseline2_introduction.html']), $insertRawData['introduction']); $this->assertEquals(\file_get_contents(\join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'Resources', 'Baseline', 'baseline2_description.html'])), $insertRawData['description'] ?? null); $this->assertEquals(\file_get_contents(\join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'Resources', 'Baseline', 'baseline2_introduction.html'])), $insertRawData['introduction'] ?? null); } diff --git a/elasticms-admin/tests/Controller/DefaultControllerTest.php b/elasticms-admin/tests/Controller/DefaultControllerTest.php index 8dc8b6db6..021c4d86a 100644 --- a/elasticms-admin/tests/Controller/DefaultControllerTest.php +++ b/elasticms-admin/tests/Controller/DefaultControllerTest.php @@ -22,31 +22,31 @@ public function testRedirect(): void $this->assertEquals('/dashboard', $client->getResponse()->headers->get('location')); } -// public function testIndex() -// { -// $client = static::createClient(); -// $crawler = $client->request('GET', '/login'); -// $this->assertEquals(401, $client->getResponse()->getStatusCode()); -// $this->assertContains('Sign in to start your session', $crawler->filter('p.login-box-msg')->text()); -// } -// -// public function testLogin() -// { -// $client = static::createClient(); -// -// $crawler = $client->request('GET', '/login'); -// -// $this->assertEquals(200, $client->getResponse()->getStatusCode()); -// $this->assertContains('Sign in to start your session', $crawler->filter('p.login-box-msg')->text()); -// } -// -// public function testHealthCheck() -// { -// $client = static::createClient(); -// -// $crawler = $client->request('GET', '/health_check'); -// -// $this->assertEquals(200, $client->getResponse()->getStatusCode()); -// $this->assertContains('Status of the cluster', $crawler->filter('h1')->text()); -// } + // public function testIndex() + // { + // $client = static::createClient(); + // $crawler = $client->request('GET', '/login'); + // $this->assertEquals(401, $client->getResponse()->getStatusCode()); + // $this->assertContains('Sign in to start your session', $crawler->filter('p.login-box-msg')->text()); + // } + // + // public function testLogin() + // { + // $client = static::createClient(); + // + // $crawler = $client->request('GET', '/login'); + // + // $this->assertEquals(200, $client->getResponse()->getStatusCode()); + // $this->assertContains('Sign in to start your session', $crawler->filter('p.login-box-msg')->text()); + // } + // + // public function testHealthCheck() + // { + // $client = static::createClient(); + // + // $crawler = $client->request('GET', '/health_check'); + // + // $this->assertEquals(200, $client->getResponse()->getStatusCode()); + // $this->assertContains('Status of the cluster', $crawler->filter('h1')->text()); + // } } diff --git a/elasticms-cli/src/Client/Audit/Cache.php b/elasticms-cli/src/Client/Audit/Cache.php index 6d02193b5..8d7cfdd20 100644 --- a/elasticms-cli/src/Client/Audit/Cache.php +++ b/elasticms-cli/src/Client/Audit/Cache.php @@ -29,7 +29,7 @@ class Cache private int $startedAt; private Report $report; - public function __construct(?Url $baseUrl = null) + public function __construct(Url $baseUrl = null) { if (null !== $baseUrl) { $this->addUrl($baseUrl); diff --git a/elasticms-cli/src/Client/Data/Data.php b/elasticms-cli/src/Client/Data/Data.php index f38f319b2..677836f4b 100644 --- a/elasticms-cli/src/Client/Data/Data.php +++ b/elasticms-cli/src/Client/Data/Data.php @@ -16,7 +16,7 @@ public function __construct(private array $data) { } - public function slice(?int $offset, ?int $length = null): void + public function slice(?int $offset, int $length = null): void { $this->data = \array_slice($this->data, $offset ?? 0, $length); } diff --git a/elasticms-cli/src/Client/WebToElasticms/Helper/Url.php b/elasticms-cli/src/Client/WebToElasticms/Helper/Url.php index a5c9bce5b..704c04b6e 100644 --- a/elasticms-cli/src/Client/WebToElasticms/Helper/Url.php +++ b/elasticms-cli/src/Client/WebToElasticms/Helper/Url.php @@ -29,7 +29,7 @@ class Url private ?string $fragment; private ?string $referer; - public function __construct(string $url, ?string $referer = null, private readonly ?string $refererLabel = null) + public function __construct(string $url, string $referer = null, private readonly ?string $refererLabel = null) { $parsed = self::mb_parse_url($url, $referer); $relativeParsed = []; @@ -238,7 +238,7 @@ public function isCrawlable(): bool /** * @return array{scheme?: string, host?: string, port?: int, user?: string, pass?: string, query?: string, path?: string, fragment?: string} */ - public static function mb_parse_url(string $url, ?string $referer = null): array + public static function mb_parse_url(string $url, string $referer = null): array { $enc_url = \preg_replace_callback( '%[^:/@?&=#]+%usD', diff --git a/elasticms-cli/src/ExpressionLanguage/Functions.php b/elasticms-cli/src/ExpressionLanguage/Functions.php index f172aafef..7ff30d5fb 100644 --- a/elasticms-cli/src/ExpressionLanguage/Functions.php +++ b/elasticms-cli/src/ExpressionLanguage/Functions.php @@ -10,7 +10,7 @@ class Functions { - public static function domToJsonMenu(string $html, string $tag, string $fieldName, string $typeName, ?string $labelField = null): string + public static function domToJsonMenu(string $html, string $tag, string $fieldName, string $typeName, string $labelField = null): string { if ('' === \preg_replace('!\s+!', ' ', $html)) { return '[]'; @@ -107,7 +107,7 @@ public static function pa11y(string $url): string } /** - * @param array $values, + * @param array $values * @param array $labels */ public static function listToJsonMenuNested(array $values, string $fieldName, string $typeName, ?array $labels, ?string $labelField, bool $multiplex = false): string @@ -146,8 +146,8 @@ public static function listToJsonMenuNested(array $values, string $fieldName, st } /** - * @param array $values, - * @param array $keys, + * @param array $values + * @param array $keys */ public static function arrayToJsonMenuNested(array $values, array $keys): string { @@ -170,8 +170,8 @@ public static function arrayToJsonMenuNested(array $values, array $keys): string } /** - * @param string|array|array $values, - * @param array|array $keys, + * @param string|array|array $values + * @param array|array $keys * * @return array */ diff --git a/elasticms-cli/src/Helper/Tika/TikaHelper.php b/elasticms-cli/src/Helper/Tika/TikaHelper.php index b95ed7788..cad6e3100 100644 --- a/elasticms-cli/src/Helper/Tika/TikaHelper.php +++ b/elasticms-cli/src/Helper/Tika/TikaHelper.php @@ -18,12 +18,12 @@ private function __construct(private readonly ?string $tikaBaseUrl, private read $this->mimeTypes = new MimeTypes(); } - public static function initTikaJar(?string $tikaCacheFolder = null): TikaHelper + public static function initTikaJar(string $tikaCacheFolder = null): TikaHelper { return new self(null, $tikaCacheFolder); } - public static function initTikaServer(string $tikaBaseUrl, ?string $tikaCacheFolder = null): TikaHelper + public static function initTikaServer(string $tikaBaseUrl, string $tikaCacheFolder = null): TikaHelper { return new self($tikaBaseUrl, $tikaCacheFolder); }