From d95512d5d9602df4dc17a9b0fc50b27dc22255f6 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Tue, 10 Nov 2026 15:04:13 +0100 Subject: [PATCH 01/66] Declared the dependency on ibexa/api-platform --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 92945b8989..2976b53fb5 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ "require-dev": { "phpunit/phpunit": "^11.0", "symfony/yaml": "^7.0", + "ibexa/api-platform": "~6.0.x-dev", "ibexa/connector-gemini": "6.0.x-dev", "ibexa/code-style": "~2.0.0", "friendsofphp/php-cs-fixer": "^3.30", From 6d423abc7e0f67d47eda03228315b92e83d15a66 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Nov 2026 10:01:15 +0100 Subject: [PATCH 02/66] Update PHP version in workflow matrix --- .github/workflows/code_samples.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/code_samples.yaml b/.github/workflows/code_samples.yaml index e4a89fccce..bf51b16776 100644 --- a/.github/workflows/code_samples.yaml +++ b/.github/workflows/code_samples.yaml @@ -11,8 +11,7 @@ jobs: fail-fast: false matrix: php: - - "8.4" # Upper supported version - - "8.3" # Lower supported version + - "8.5" steps: - uses: actions/checkout@v7 From 143a4126ad4a3f5578602829975bfe87660cdaff Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Nov 2026 10:07:05 +0100 Subject: [PATCH 03/66] Update composer.json Update symfony/yaml Remove ibexa/personalization --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2976b53fb5..77fb3057c9 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require-dev": { "phpunit/phpunit": "^11.0", - "symfony/yaml": "^7.0", + "symfony/yaml": "^8.1", "ibexa/api-platform": "~6.0.x-dev", "ibexa/connector-gemini": "6.0.x-dev", "ibexa/code-style": "~2.0.0", @@ -47,7 +47,6 @@ "ibexa/installer": "6.0.x-dev", "ibexa/product-catalog": "6.0.x-dev", "ibexa/graphql": "6.0.x-dev", - "ibexa/personalization": "6.0.x-dev", "ibexa/taxonomy": "6.0.x-dev", "ibexa/scheduler": "6.0.x-dev", "ibexa/cron": "6.0.x-dev", From e0358fa464c815104db446f52535493beb2df944 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Nov 2026 10:50:56 +0100 Subject: [PATCH 04/66] composer.json: add ibexa/admin-ui-extras --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 77fb3057c9..be85e8b3da 100644 --- a/composer.json +++ b/composer.json @@ -65,6 +65,7 @@ "ibexa/seo": "6.0.x-dev", "ibexa/core": "6.0.x-dev", "ibexa/admin-ui": "6.0.x-dev", + "ibexa/admin-ui-extras": "6.0.x-dev", "ibexa/activity-log": "6.0.x-dev", "ibexa/workflow": "6.0.x-dev", "ibexa/checkout": "6.0.x-dev", From b25cb81f18e8139fa86357bce77450a5bde3b97c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:23:10 +0100 Subject: [PATCH 05/66] composer.json: add ibexa/featured & DIL --- composer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composer.json b/composer.json index be85e8b3da..54b4b0340c 100644 --- a/composer.json +++ b/composer.json @@ -92,9 +92,11 @@ "deptrac/deptrac": "^3.0", "ibexa/cdp": "~6.0.x-dev", "ibexa/connector-raptor": "~6.0.x-dev", + "ibexa/featured": "~6.0.x-dev", "ibexa/image-editor": "~6.0.x-dev", "ibexa/integrated-help": "~6.0.x-dev", "ibexa/translations-management": "~6.0.x-dev", + "ibexa/data-intelligence-layer": "~6.0.x-dev", "ibexa/site-context": "~6.0.x-dev", "ibexa/fieldtype-richtext-rte": "~6.0.x-dev", "ibexa/site-factory": "~6.0.x-dev", From 19c9b4899a7ad2ef0746a75c07152b7e137a3bac Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:35:44 +0100 Subject: [PATCH 06/66] composer.json: set cron/cron:dev-master Should fix symfony/process dependency conflict between - cron/cron:1.9.1 requires symfony/process:^7.0 - ibexa/cron:6.0.x-dev requires symfony/process:^8.1 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 54b4b0340c..7177c83edd 100644 --- a/composer.json +++ b/composer.json @@ -50,6 +50,7 @@ "ibexa/taxonomy": "6.0.x-dev", "ibexa/scheduler": "6.0.x-dev", "ibexa/cron": "6.0.x-dev", + "cron/cron": "dev-master", "ibexa/dashboard": "6.0.x-dev", "ibexa/corporate-account": "6.0.x-dev", "ibexa/fieldtype-address": "6.0.x-dev", From b70285eb06c390f67df4de671ac7cedf58707171 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 16:15:35 +0100 Subject: [PATCH 07/66] Usable PHP for 6.0 --- .github/workflows/code_samples.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_samples.yaml b/.github/workflows/code_samples.yaml index bf51b16776..689a21e36a 100644 --- a/.github/workflows/code_samples.yaml +++ b/.github/workflows/code_samples.yaml @@ -11,7 +11,8 @@ jobs: fail-fast: false matrix: php: - - "8.5" + - "8.6" # Upper supported version + - "8.5" # Lower supported version steps: - uses: actions/checkout@v7 From d0909d487457e71dc1298c1ee5c30a8e2f9a81bc Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 16:21:29 +0100 Subject: [PATCH 08/66] Revert "Usable PHP for 6.0" This reverts commit b70285eb06c390f67df4de671ac7cedf58707171. --- .github/workflows/code_samples.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/code_samples.yaml b/.github/workflows/code_samples.yaml index 689a21e36a..bf51b16776 100644 --- a/.github/workflows/code_samples.yaml +++ b/.github/workflows/code_samples.yaml @@ -11,8 +11,7 @@ jobs: fail-fast: false matrix: php: - - "8.6" # Upper supported version - - "8.5" # Lower supported version + - "8.5" steps: - uses: actions/checkout@v7 From 960f2fe761d9d42090f2aba322a0da741d29d912 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 16:32:31 +0100 Subject: [PATCH 09/66] Fix Variable $argc might not be defined. --- code_samples/api/rest_api/create_image.json.php | 5 +++++ code_samples/api/rest_api/create_image.xml.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/code_samples/api/rest_api/create_image.json.php b/code_samples/api/rest_api/create_image.json.php index 501931004e..6a9736d1ff 100644 --- a/code_samples/api/rest_api/create_image.json.php +++ b/code_samples/api/rest_api/create_image.json.php @@ -5,6 +5,11 @@ use Symfony\Component\HttpClient\HttpClient; use Symfony\Contracts\HttpClient\Exception as HttpException; +if (!isset($argv) || !isset($argc) || PHP_SAPI !== 'cli') { + echo "This script must be run from the command line.\n"; + exit(9); +} + if ($argc < 2) { // Print script usage echo "Usage: php {$argv[0]} []\n"; diff --git a/code_samples/api/rest_api/create_image.xml.php b/code_samples/api/rest_api/create_image.xml.php index 4522d9fd9e..ae18dab196 100644 --- a/code_samples/api/rest_api/create_image.xml.php +++ b/code_samples/api/rest_api/create_image.xml.php @@ -5,6 +5,11 @@ use Symfony\Component\HttpClient\HttpClient; use Symfony\Contracts\HttpClient\Exception as HttpException; +if (!isset($argv) || !isset($argc) || PHP_SAPI !== 'cli') { + echo "This script must be run from the command line.\n"; + exit(9); +} + if ($argc < 2) { // Print script usage echo "Usage: php {$argv[0]} []\n"; From 57e337e57dfc2758fee1d897682c2c1c25f1a2a9 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 16:42:56 +0100 Subject: [PATCH 10/66] Fix TransitionEvent missingType.generics --- docs/content_management/workflow/add_custom_workflow_action.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content_management/workflow/add_custom_workflow_action.md b/docs/content_management/workflow/add_custom_workflow_action.md index 344b2f9fca..4fe26b1534 100644 --- a/docs/content_management/workflow/add_custom_workflow_action.md +++ b/docs/content_management/workflow/add_custom_workflow_action.md @@ -83,7 +83,7 @@ For example, you can override the message typed by the user: ``` php /** * @var array $context - * @var \Symfony\Component\Workflow\Event\TransitionEvent $event + * @var \Symfony\Component\Workflow\Event\TransitionEvent $event */ $new_context = $context; $new_context['message'] = 'This article went through proofreading'; From 0f2bc7cd75d84bf6c2871487c7c55f6e81b8e972 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 16:57:14 +0100 Subject: [PATCH 11/66] Format FormSubmissionsTabDecorator.php --- .../src/Security/Form/FormSubmissionsTabDecorator.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index ea0f249f8f..ae46c6839c 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -30,7 +30,16 @@ public function __construct( private readonly SubmissionsTab $innerTab, private readonly PermissionResolver $permissionResolver ) { - parent::__construct($twig, $translator, $formSubmissionService, $formFactory, $contentTypeService, $languageService, $formBuilderType, $configResolver); + parent::__construct( + $twig, + $translator, + $formSubmissionService, + $formFactory, + $contentTypeService, + $languageService, + $formBuilderType, + $configResolver + ); } #[\Override] From 64609904208810feafdc8c14c1f1bd434f06ea2e Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 16:59:42 +0100 Subject: [PATCH 12/66] Fix FormSubmissionsTabDecorator.php --- .../src/Security/Form/FormSubmissionsTabDecorator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index ae46c6839c..493df39e9b 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -38,7 +38,8 @@ public function __construct( $contentTypeService, $languageService, $formBuilderType, - $configResolver + $configResolver, + $permissionResolver ); } From 110bdd6478b4ac6546a8d7cfdc3773cf683d962e Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 17:08:32 +0100 Subject: [PATCH 13/66] Fix LegalTransitionListener.php --- .../src/EventListener/LegalTransitionListener.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php index 067f46ee14..d6c44ba7bd 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php @@ -6,11 +6,15 @@ use Ibexa\Contracts\AdminUi\Notification\TranslatableNotificationHandlerInterface as NotificationInterface; use Ibexa\Contracts\Workflow\Event\Action\AbstractTransitionWorkflowActionListener; +use Ibexa\Contracts\Workflow\Registry\WorkflowRegistryInterface; use Symfony\Component\Workflow\Event\TransitionEvent; class LegalTransitionListener extends AbstractTransitionWorkflowActionListener { - public function __construct(private readonly NotificationInterface $notificationHandler) + public function __construct( + private readonly NotificationInterface $notificationHandler, + protected WorkflowRegistryInterface $workflowRegistry + ) { } @@ -21,7 +25,8 @@ public function getIdentifier(): string public function onWorkflowEvent(TransitionEvent $event): void { - $metadata = $this->getActionMetadata($event->getWorkflow(), $event->getTransition()); + $workflow = $this->workflowRegistry->getWorkflow($event->getWorkflowName()); + $metadata = $this->getActionMetadata($workflow, $event->getTransition()); $message = $metadata['data']['message'] ?? ''; $this->notificationHandler->info( From 310427269efa1c55f07f6aa2f55cd6c4ef257529 Mon Sep 17 00:00:00 2001 From: adriendupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 16:21:16 +0000 Subject: [PATCH 14/66] PHP & JS CS Fixes --- .../src/EventListener/LegalTransitionListener.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php index d6c44ba7bd..9534a666a9 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php @@ -14,8 +14,7 @@ class LegalTransitionListener extends AbstractTransitionWorkflowActionListener public function __construct( private readonly NotificationInterface $notificationHandler, protected WorkflowRegistryInterface $workflowRegistry - ) - { + ) { } public function getIdentifier(): string From faa0ff211267bd36faddf2438fee8a8dcb56d7d2 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 20:01:10 +0100 Subject: [PATCH 15/66] Update deptrac.baseline.yaml after #3479 --- deptrac.baseline.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/deptrac.baseline.yaml b/deptrac.baseline.yaml index 0d74c2a7ef..c9dbf54fe9 100644 --- a/deptrac.baseline.yaml +++ b/deptrac.baseline.yaml @@ -59,9 +59,6 @@ deptrac: - Ibexa\ProductCatalog\Money\IntlMoneyFactory App\Command\PaymentMethodCommand: - Ibexa\Payment\Values\PaymentMethodType - App\Command\SegmentCommand: - - Ibexa\Segmentation\Value\SegmentCreateStruct - - Ibexa\Segmentation\Value\SegmentGroupCreateStruct App\Command\ShippingMethodCommand: - Ibexa\ProductCatalog\Local\Repository\Values\Region - Ibexa\Shipping\Value\ShippingMethodType From 5ef6429447ffa399dae8530674e176eead283cd0 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 20:08:41 +0100 Subject: [PATCH 16/66] template_configuration.md: Skip YAML `Duplicate key "match"` error --- docs/templating/templates/template_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/templating/templates/template_configuration.md b/docs/templating/templates/template_configuration.md index bd4f410754..1525978c94 100644 --- a/docs/templating/templates/template_configuration.md +++ b/docs/templating/templates/template_configuration.md @@ -95,7 +95,7 @@ In the example above, content which is either an article or a blog post is match When you use no matcher in a rule, this rule always match. Several values are available to declare no matcher: -``` yaml +``` yaml {skip-validation} match: ~ match: true match: [] From d61774c8942956750bab4f60210cd547019a1c75 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:03:58 +0100 Subject: [PATCH 17/66] enable_stripe_payments.md: Skip translation YAML validation It's not a config but a translation --- docs/commerce/payment/enable_stripe_payments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commerce/payment/enable_stripe_payments.md b/docs/commerce/payment/enable_stripe_payments.md index 5d03bd8829..2390ce4e72 100644 --- a/docs/commerce/payment/enable_stripe_payments.md +++ b/docs/commerce/payment/enable_stripe_payments.md @@ -37,7 +37,7 @@ Ensure that the `publishable_key` and `secret_key` fields contain the Stripe API You can now provide language translations for the Stripe payment platform name. To do it, within the `ibexa_payment_type` namespace in your translation files, use the provided translation key structure within your translation files: -```yaml +```yaml {skip-validation} ibexa: payment_method: type: From 6a55b0b242e5824f364e4aa1cf0fac6b86ef1364 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:05:03 +0100 Subject: [PATCH 18/66] enable_paypal_payments.md: Skip translation YAML validation It's not a config but a translation --- docs/commerce/payment/enable_paypal_payments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commerce/payment/enable_paypal_payments.md b/docs/commerce/payment/enable_paypal_payments.md index 945f4a8606..70e30670dd 100644 --- a/docs/commerce/payment/enable_paypal_payments.md +++ b/docs/commerce/payment/enable_paypal_payments.md @@ -36,7 +36,7 @@ Ensure that the `username`, `password,` and `signature` fields contain the PayPa You can now provide language translations for the PayPal payment service name. To do it, within the `ibexa_payment_type` namespace in your translation files, use the provided translation key structure for each of your supported languages: -```yaml +```yaml {skip-validation} ibexa: payment_method: type: From b8f3c97349f8adaf413a01fc38e09169b4fa76bb Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:07:18 +0100 Subject: [PATCH 19/66] payum_integration.md: Skip translation YAML validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's not a config but a translation Ibexa\Tests\Documentation\Yaml\YamlTest::testBundleConfigurationIsValid with data set "ibexa (docs/commerce/payment/payum_integration.md:55)" ('ibexa', [[[['Translated payment service name']]]], 'docs/commerce/payment/payum_i...ion.md', 55, 'c3f14ff441a95545c360aaab30805...6ad30d') Invalid configuration for "ibexa" in docs/commerce/payment/payum_integration.md:55 [hash:c3f14ff441a95545c360aaab308050a2629a81f07d76d4fb65133ab89a6ad30d] — Unrecognized option "payment_method" under "ibexa". Available options are "http_cache", "image_placeholder", "installer", "locale_conversion", "orm", "repositories", "router", "siteaccess", "system", "ui", "url_alias", "url_wildcards". /home/runner/work/documentation-developer/documentation-developer/tests/Yaml/YamlTest.php:83 --- docs/commerce/payment/payum_integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commerce/payment/payum_integration.md b/docs/commerce/payment/payum_integration.md index f7b41ecc17..aa8509244a 100644 --- a/docs/commerce/payment/payum_integration.md +++ b/docs/commerce/payment/payum_integration.md @@ -51,7 +51,7 @@ ibexa_connector_payum: Within the `ibexa_payment_type` namespace in your translation files, add translations for each payment service that you configure. For language translations of payment service names, structure the translation files as follows: -```yaml +```yaml {skip-validation} ibexa: payment_method: type: From 91a766b02b96cc8fdaae49412c950d43d22c9885 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:25:56 +0100 Subject: [PATCH 20/66] =?UTF-8?q?user=5Fauthentication.md:=20Update=20enco?= =?UTF-8?q?ders=20=E2=86=92=20password=5Fhashers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://symfony.com/doc/5.x/security/passwords.html#configuring-a-password-hasher "The password_hashers option was introduced in Symfony 5.3. In previous versions it was called encoders." --- docs/users/user_authentication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/users/user_authentication.md b/docs/users/user_authentication.md index 60039c3c00..b2577a37a3 100644 --- a/docs/users/user_authentication.md +++ b/docs/users/user_authentication.md @@ -53,7 +53,7 @@ security: # You will then be able to login with username "user" and password "userpass" user: { password: userpass, roles: [ 'ROLE_USER' ] } # The "in memory" provider requires an encoder for Symfony\Component\Security\Core\User\User - encoders: + password_hashers: Symfony\Component\Security\Core\User\User: plaintext ``` From b2af04013aacb07e87bb428a558e0ec922d35ccb Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 09:23:08 +0100 Subject: [PATCH 21/66] update_from_*.md: Ignore old Elasticsearch configuration --- docs/update_and_migration/from_4.6/update_from_4.6.md | 4 ++-- docs/update_and_migration/from_5.0/update_from_5.0.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_from_4.6.md b/docs/update_and_migration/from_4.6/update_from_4.6.md index 2fd179a1fc..a42ea652c4 100644 --- a/docs/update_and_migration/from_4.6/update_from_4.6.md +++ b/docs/update_and_migration/from_4.6/update_from_4.6.md @@ -496,7 +496,7 @@ Update your configuration in `config/packages/ibexa_elasticsearch.yaml` as descr The `connection_pool` and `connection_selector` settings are ignored when using Elasticsearch 8. Replace them with appropriate `node_pool_selector` and `node_pool_resurrect` settings: -``` yaml +``` yaml {skip-validation} # Elasticsearch 7 configuration ibexa_elasticsearch: connections: @@ -520,7 +520,7 @@ For more information, see [Connection pool and node pool settings](https://doc.i The `trace` debugging option is no longer available in Elasticsearch 8: -``` yaml +``` yaml {skip-validation} # Elasticsearch 7 configuration ibexa_elasticsearch: connections: diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md index 027a850a73..3377690bd6 100644 --- a/docs/update_and_migration/from_5.0/update_from_5.0.md +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -210,7 +210,7 @@ Update your configuration in `config/packages/ibexa_elasticsearch.yaml`. The deprecated `connection_pool` and `connection_selector` settings are now ignored and don't have any effect. Replace them with appropriate `node_pool_selector` and `node_pool_resurrect` settings: -``` yaml +``` yaml {skip-validation} # Old configuration (Elasticsearch 7 - deprecated) ibexa_elasticsearch: connections: @@ -234,7 +234,7 @@ For more information, see [Node pool settings](https://doc.ibexa.co/en/5.0/searc The `trace` debugging option is no longer available. -``` yaml +``` yaml {skip-validation} # Old configuration (Elasticsearch 7) ibexa_elasticsearch: connections: From 77a84bb227aa6359eeb090352d0b2920ade30bb2 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 09:29:13 +0100 Subject: [PATCH 22/66] user_authentication.md: Fix `"firewalls" under "security" must be configured.` --- docs/users/user_authentication.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/users/user_authentication.md b/docs/users/user_authentication.md index b2577a37a3..e3e3d85167 100644 --- a/docs/users/user_authentication.md +++ b/docs/users/user_authentication.md @@ -55,6 +55,8 @@ security: # The "in memory" provider requires an encoder for Symfony\Component\Security\Core\User\User password_hashers: Symfony\Component\Security\Core\User\User: plaintext + firewalls: + # … ``` ### Implement the listener From e54300c2ade63a26b26b7ac2d47772ddebca37a8 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 09:31:35 +0100 Subject: [PATCH 23/66] user_authentication.md: Fix `"security.firewalls" should have at least 1 element(s) defined.` --- docs/users/user_authentication.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/users/user_authentication.md b/docs/users/user_authentication.md index e3e3d85167..dde79f6e88 100644 --- a/docs/users/user_authentication.md +++ b/docs/users/user_authentication.md @@ -56,7 +56,8 @@ security: password_hashers: Symfony\Component\Security\Core\User\User: plaintext firewalls: - # … + dev: + # … ``` ### Implement the listener From 1cd5aeb0623000765a8a21cac8ba6162aa9392d2 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 10:36:17 +0100 Subject: [PATCH 24/66] ibexa_connector_gemini.yaml: Update config See https://github.com/ibexa/connector-gemini/pull/18 --- .../config/packages/ibexa_connector_gemini.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code_samples/ai_actions/config/packages/ibexa_connector_gemini.yaml b/code_samples/ai_actions/config/packages/ibexa_connector_gemini.yaml index 5d20dac63a..ddbac0529a 100644 --- a/code_samples/ai_actions/config/packages/ibexa_connector_gemini.yaml +++ b/code_samples/ai_actions/config/packages/ibexa_connector_gemini.yaml @@ -3,10 +3,14 @@ ibexa_connector_gemini: models: gemini-pro-latest: label: 'Gemini Pro Latest' - max_tokens: 4096 + options: + max_tokens: + max: 4096 gemini-flash-latest: label: 'Gemini Flash Latest' - max_tokens: 4096 + options: + max_tokens: + max: 4096 default_model: gemini-pro-latest default_max_tokens: 4096 # Must be <= the model’s max_tokens default_temperature: 0.8 @@ -14,7 +18,9 @@ ibexa_connector_gemini: models: gemini-flash-latest: label: 'Gemini Flash Latest' - max_tokens: 4096 + options: + max_tokens: + max: 4096 default_model: gemini-flash-latest default_max_tokens: 4096 default_temperature: 1.0 From d9c5c4ac58f01d21f0c01ee5d82dd91ec12d74a8 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 10:39:03 +0100 Subject: [PATCH 25/66] composer.json: Update minimal PHP --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7177c83edd..ca8f37eff0 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^8.3" + "php": "^8.5" }, "require-dev": { "phpunit/phpunit": "^11.0", From efc5d4aa0ef834c5400575c37d2a84add6e22ba9 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:42:31 +0100 Subject: [PATCH 26/66] php-cs-fixer: PHP_CS_FIXER_IGNORE_ENV is deprecated --- .github/workflows/code_samples.yaml | 2 -- .php-cs-fixer-inline.php | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/code_samples.yaml b/.github/workflows/code_samples.yaml index bf51b16776..0a4f2aaa14 100644 --- a/.github/workflows/code_samples.yaml +++ b/.github/workflows/code_samples.yaml @@ -34,8 +34,6 @@ jobs: - name: Run code sample quality tests id: phpstan run: composer test --ansi - env: - PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.php == '8.4' && '1' || '' }} code-samples-inclusion-check: diff --git a/.php-cs-fixer-inline.php b/.php-cs-fixer-inline.php index b30b9978a5..9e653f56e6 100644 --- a/.php-cs-fixer-inline.php +++ b/.php-cs-fixer-inline.php @@ -22,6 +22,7 @@ return $configFactory ->buildConfig() + ->setUnsupportedPhpVersionAllowed(true) ->setFinder( PhpCsFixer\Finder::create() ->in(__DIR__ . '/code_samples/_inline_php') From c43c909ad7179649ca4ece958df61a440672dad5 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:50:13 +0100 Subject: [PATCH 27/66] custom_policies.md: NewMethodCallWithoutParenthesesRector --- docs/permissions/custom_policies.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/permissions/custom_policies.md b/docs/permissions/custom_policies.md index 9894dd3c17..dc05fdb88d 100644 --- a/docs/permissions/custom_policies.md +++ b/docs/permissions/custom_policies.md @@ -125,10 +125,10 @@ class MyPolicyProvider implements PolicyProviderInterface, TranslationContainerI public static function getTranslationMessages(): array { return [ - (new Message('role.policy.custom_module', 'forms'))->setDesc('Custom module'), - (new Message('role.policy.custom_module.all_functions', 'forms'))->setDesc('Custom module / All functions'), - (new Message('role.policy.custom_module.custom_function_1', 'forms'))->setDesc('Custom module / Function #1'), - (new Message('role.policy.custom_module.custom_function_2', 'forms'))->setDesc('Custom module / Function #2'), + new Message('role.policy.custom_module', 'forms')->setDesc('Custom module'), + new Message('role.policy.custom_module.all_functions', 'forms')->setDesc('Custom module / All functions'), + new Message('role.policy.custom_module.custom_function_1', 'forms')->setDesc('Custom module / Function #1'), + new Message('role.policy.custom_module.custom_function_2', 'forms')->setDesc('Custom module / Function #2'), ]; } } From 6a3106d0ae4af61bd80000472ffb5f39757d5f7f Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:51:49 +0100 Subject: [PATCH 28/66] AddMissingAltTextCommand.php: NewMethodCallWithoutParenthesesRector --- .../ai_actions/src/Command/AddMissingAltTextCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php b/code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php index dee23735e9..a7454579c6 100644 --- a/code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php +++ b/code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php @@ -119,7 +119,7 @@ private function convertImageToBase64(string $uri): string private function getModifiedImages(): ContentList { - $filter = (new Filter()) + $filter = new Filter() ->withCriterion( new DateMetadata(DateMetadata::MODIFIED, Operator::GTE, strtotime('-1 day')) ) From f4b239d23fefdd5d926572b2fdff9d0ada8515db Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:52:37 +0100 Subject: [PATCH 29/66] NotificationSenderController.php: NewMethodCallWithoutParenthesesRector --- .../src/Controller/NotificationSenderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/api/notifications/src/Controller/NotificationSenderController.php b/code_samples/api/notifications/src/Controller/NotificationSenderController.php index 2f8ee32037..62188f4dd4 100644 --- a/code_samples/api/notifications/src/Controller/NotificationSenderController.php +++ b/code_samples/api/notifications/src/Controller/NotificationSenderController.php @@ -20,7 +20,7 @@ public function __construct( public function index(): Response { $this->notificationService->send( - new SymfonyNotificationAdapter((new ControllerFeedback('Message sent from controller'))->emoji('👍')), + new SymfonyNotificationAdapter(new ControllerFeedback('Message sent from controller')->emoji('👍')), ); return $this->render('@ibexadesign/notification-sender-controller.html.twig'); From 558868d40584bc2e40bd24e0fbe76e90d1edbb72 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:53:11 +0100 Subject: [PATCH 30/66] RestLocation.php: NewMethodCallWithoutParenthesesRector --- .../api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php b/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php index fcc739e4ff..53ebb31a85 100644 --- a/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php +++ b/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php @@ -21,7 +21,7 @@ public function visit(Visitor $visitor, Generator $generator, $data): void $generator->startHashElement('Location'); $generator->attribute( 'media-type', - 'application/app.api.Location+' . strtolower((new \ReflectionClass($generator))->getShortName()) + 'application/app.api.Location+' . strtolower(new \ReflectionClass($generator)->getShortName()) ); $generator->attribute( 'href', From 4d5b05f57b68d17d98740a7f17d15203553564d5 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:53:45 +0100 Subject: [PATCH 31/66] SectionNameSortingDefinitionProvider.php: NewMethodCallWithoutParenthesesRector --- .../Provider/SectionNameSortingDefinitionProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php b/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php index 82db0c90ef..ab8575dfea 100644 --- a/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php +++ b/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php @@ -41,8 +41,8 @@ public function getSortingDefinitions(): array public static function getTranslationMessages(): array { return [ - (new Message('sort_definition.section_name_asc.label'))->setDesc('Sort by section A-Z'), - (new Message('sort_definition.section_name_desc.label'))->setDesc('Sort by section Z-A'), + new Message('sort_definition.section_name_asc.label')->setDesc('Sort by section A-Z'), + new Message('sort_definition.section_name_desc.label')->setDesc('Sort by section Z-A'), ]; } } From dce7babfa32210cd8ec5ea73784241835f8930b3 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:54:31 +0100 Subject: [PATCH 32/66] FormPolicyProvider.php: NewMethodCallWithoutParenthesesRector --- .../limitation/src/Security/FormPolicyProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code_samples/back_office/limitation/src/Security/FormPolicyProvider.php b/code_samples/back_office/limitation/src/Security/FormPolicyProvider.php index 4396cfe02c..a8221ec71e 100644 --- a/code_samples/back_office/limitation/src/Security/FormPolicyProvider.php +++ b/code_samples/back_office/limitation/src/Security/FormPolicyProvider.php @@ -21,9 +21,9 @@ public function addPolicies(ConfigBuilderInterface $configBuilder): void public static function getTranslationMessages(): array { return [ - (new Message('role.policy.form', 'forms'))->setDesc('Forms'), - (new Message('role.policy.form.all_functions', 'forms'))->setDesc('Forms / All functions'), - (new Message('role.policy.form.read_submissions', 'forms'))->setDesc('Forms / Read submissions'), + new Message('role.policy.form', 'forms')->setDesc('Forms'), + new Message('role.policy.form.all_functions', 'forms')->setDesc('Forms / All functions'), + new Message('role.policy.form.read_submissions', 'forms')->setDesc('Forms / Read submissions'), ]; } } From 872fd67f7133599c2b816050bb40e9e513e320e5 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:55:12 +0100 Subject: [PATCH 33/66] AnniversaryConditionStepFormListener.php: NewMethodCallWithoutParenthesesRector --- .../src/Discounts/Step/AnniversaryConditionStepFormListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php index 0d23b7f7e9..801605a7d9 100644 --- a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php +++ b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php @@ -31,7 +31,7 @@ public function addFields(FormInterface $form, DiscountStepData $data, PreSetDat public static function getTranslationMessages(): array { return [ - (new Message('discount.step.custom.label', 'discount'))->setDesc('Custom'), + new Message('discount.step.custom.label', 'discount')->setDesc('Custom'), ]; } } From 90eb2fbc998d7f9479190cf4e90edc5ea8868736 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:55:44 +0100 Subject: [PATCH 34/66] MyFeatureNameMapper.php: NewMethodCallWithoutParenthesesRector --- .../src/ActivityLog/ClassNameMapper/MyFeatureNameMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/recent_activity/src/ActivityLog/ClassNameMapper/MyFeatureNameMapper.php b/code_samples/recent_activity/src/ActivityLog/ClassNameMapper/MyFeatureNameMapper.php index 92b08b11d8..dcdfa62b08 100644 --- a/code_samples/recent_activity/src/ActivityLog/ClassNameMapper/MyFeatureNameMapper.php +++ b/code_samples/recent_activity/src/ActivityLog/ClassNameMapper/MyFeatureNameMapper.php @@ -17,7 +17,7 @@ public function getClassNameToShortNameMap(): iterable public static function getTranslationMessages(): array { return [ - (new Message('ibexa.activity_log.search_form.object_class.my_feature', 'ibexa_activity_log')) + new Message('ibexa.activity_log.search_form.object_class.my_feature', 'ibexa_activity_log') ->setDesc('My Feature'), ]; } From 6f7b1c0bd42f259cd85184ca027f6249cf214dce Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 13:08:20 +0100 Subject: [PATCH 35/66] WikimediaCommonsHandler: ArrayFirstLastRector --- .../src/Connector/Dam/Handler/WikimediaCommonsHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php b/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php index a6ecdac15c..63160d678f 100644 --- a/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php +++ b/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php @@ -80,7 +80,7 @@ public function fetchAsset(string $id): Asset throw new \RuntimeException('Couldn\'t parse asset metadata'); } - $pageData = array_values($response['query']['pages'])[0] ?? null; + $pageData = array_first($response['query']['pages']) ?? null; if (!isset($pageData['imageinfo'][0]['extmetadata'])) { throw new \RuntimeException('Couldn\'t parse image asset metadata'); } From 87fc477dfa9c7c8c43a990e4bf210f3be75be2bb Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 13:10:16 +0100 Subject: [PATCH 36/66] CartShoppingListTransferController: ForeachToArrayFindRector --- .../src/Controller/CartShoppingListTransferController.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index e65fce2e1d..c5529305b6 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -49,13 +49,7 @@ public function __invoke(Request $request): Response $cartQuery = new CartQuery(); $cartQuery->setOwnerId($user->getId()); $cartsList = $this->cartService->findCarts($cartQuery); - $cart = null; - foreach ($cartsList->getCarts() as $cartItem) { - if ($cartItem->getName() === $name) { - $cart = $cartItem; - break; - } - } + $cart = array_find($cartsList->getCarts(), fn($cartItem) => $cartItem->getName() === $name); if (null === $cart) { $cart = $this->cartService->createCart(new CartCreateStruct($name, $this->currencyService->getCurrencyByCode($currency), $user)); } From f6bee144ac5d0157167426f145e376091111cc1e Mon Sep 17 00:00:00 2001 From: adriendupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:23:20 +0000 Subject: [PATCH 37/66] PHP & JS CS Fixes --- .../src/Controller/CartShoppingListTransferController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index c5529305b6..a5a516e65e 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -49,7 +49,7 @@ public function __invoke(Request $request): Response $cartQuery = new CartQuery(); $cartQuery->setOwnerId($user->getId()); $cartsList = $this->cartService->findCarts($cartQuery); - $cart = array_find($cartsList->getCarts(), fn($cartItem) => $cartItem->getName() === $name); + $cart = array_find($cartsList->getCarts(), static fn ($cartItem) => $cartItem->getName() === $name); if (null === $cart) { $cart = $this->cartService->createCart(new CartCreateStruct($name, $this->currencyService->getCurrencyByCode($currency), $user)); } From 5d21748fc8bacbe64bb3bcb993a89bbaf03d9450 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 13:25:35 +0100 Subject: [PATCH 38/66] CartShoppingListTransferController: Ibexa.requireClosureReturnType --- .../src/Controller/CartShoppingListTransferController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index a5a516e65e..141e9199b6 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -49,7 +49,7 @@ public function __invoke(Request $request): Response $cartQuery = new CartQuery(); $cartQuery->setOwnerId($user->getId()); $cartsList = $this->cartService->findCarts($cartQuery); - $cart = array_find($cartsList->getCarts(), static fn ($cartItem) => $cartItem->getName() === $name); + $cart = array_find($cartsList->getCarts(), static fn ($cartItem): bool => $cartItem->getName() === $name); if (null === $cart) { $cart = $this->cartService->createCart(new CartCreateStruct($name, $this->currencyService->getCurrencyByCode($currency), $user)); } From d38cc5248e70ebef696db1818b155ef683c7339c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 13:55:02 +0100 Subject: [PATCH 39/66] CartShoppingListTransferController: argument.type --- .../src/Controller/CartShoppingListTransferController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index 141e9199b6..c6a9721824 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -5,6 +5,7 @@ use Ibexa\Contracts\Cart\CartServiceInterface; use Ibexa\Contracts\Cart\CartShoppingListTransferServiceInterface; use Ibexa\Contracts\Cart\Value\CartCreateStruct; +use Ibexa\Contracts\Cart\Value\CartInterface; use Ibexa\Contracts\Cart\Value\CartQuery; use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\UserService; @@ -49,7 +50,7 @@ public function __invoke(Request $request): Response $cartQuery = new CartQuery(); $cartQuery->setOwnerId($user->getId()); $cartsList = $this->cartService->findCarts($cartQuery); - $cart = array_find($cartsList->getCarts(), static fn ($cartItem): bool => $cartItem->getName() === $name); + $cart = array_find($cartsList->getCarts(), static fn (CartInterface $cartItem): bool => $cartItem->getName() === $name); if (null === $cart) { $cart = $this->cartService->createCart(new CartCreateStruct($name, $this->currencyService->getCurrencyByCode($currency), $user)); } From 6a6c022d82c37ed1fde9f56179a6f428b88c9d6e Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:02:29 +0100 Subject: [PATCH 40/66] Update deptrac.baseline.yaml --- deptrac.baseline.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/deptrac.baseline.yaml b/deptrac.baseline.yaml index c9dbf54fe9..5f75c85563 100644 --- a/deptrac.baseline.yaml +++ b/deptrac.baseline.yaml @@ -36,9 +36,6 @@ deptrac: - Ibexa\Collaboration\Persistence\Values\AbstractSessionCreateStruct App\Collaboration\Cart\Persistence\Values\CartSessionUpdateStruct: - Ibexa\Collaboration\Persistence\Values\AbstractSessionUpdateStruct - App\Command\AddMissingAltTextCommand: - - Ibexa\Core\FieldType\Image\Value - - Ibexa\Core\IO\IOBinarydataHandler App\Command\CalendarCommand: - Ibexa\Scheduler\Calendar\EventAction\RescheduleEventActionContext App\Command\CatalogCommand: @@ -224,9 +221,6 @@ deptrac: - Ibexa\Core\QueryType\QueryType App\Search\Model\Suggestion\ProductSuggestion: - Ibexa\ProductCatalog\Local\Repository\Values\Product - App\Security\FormPolicyProvider: - - Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigBuilderInterface - - Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface App\Security\FormSubmissionServiceDecorator: - Ibexa\Core\Base\Exceptions\NotFoundException - Ibexa\Core\Base\Exceptions\UnauthorizedException From 20d714b10375226aa2933814f6ebf7cfe0d71999 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 19:07:09 +0100 Subject: [PATCH 41/66] Allow ibexa/code-style v2.3.1 (latest) May fix new_expression_parentheses VS NewMethodCallWithoutParenthesesRector issue https://cs.symfony.com/doc/rules/operator/new_expression_parentheses.html https://getrector.com/rule-detail/new-method-call-without-parentheses-rector --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ca8f37eff0..56e3905b79 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "symfony/yaml": "^8.1", "ibexa/api-platform": "~6.0.x-dev", "ibexa/connector-gemini": "6.0.x-dev", - "ibexa/code-style": "~2.0.0", + "ibexa/code-style": "~2.0", "friendsofphp/php-cs-fixer": "^3.30", "phpstan/phpstan": "^2.0", "phpstan/phpstan-symfony": "^2.0", From 20d02495a5d2e759beb0e8413cc26112c17d4626 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 19:20:50 +0100 Subject: [PATCH 42/66] fix-cs --- .../src/AI/Action/TranscribeAudioAction.php | 4 +- .../ActionType/TranscribeAudioActionType.php | 13 ++++--- .../ai_actions/src/AI/DataType/Audio.php | 4 +- .../Handler/LLaVaTextToTextActionHandler.php | 11 +++--- .../WhisperAudioToTextActionHandler.php | 9 +++-- .../AI/REST/Input/Parser/TranscribeAudio.php | 6 ++- .../Output/ValueObjectVisitor/AudioText.php | 7 +++- .../src/AI/REST/Value/AudioText.php | 4 +- .../AI/REST/Value/TranscribeAudioAction.php | 3 +- .../ActionConfigurationCreateCommand.php | 8 ++-- .../src/Command/AddMissingAltTextCommand.php | 17 +++++--- .../src/Form/Type/TextToTextOptionsType.php | 6 ++- .../Form/Type/TranscribeAudioOptionsType.php | 6 ++- code_samples/ai_actions/src/Query/Search.php | 3 +- .../api/commerce/src/Command/CartCommand.php | 6 ++- .../api/commerce/src/Command/OrderCommand.php | 8 ++-- .../commerce/src/Command/PaymentCommand.php | 6 ++- .../src/Command/PaymentMethodCommand.php | 6 ++- .../commerce/src/Command/ShipmentCommand.php | 6 ++- .../src/Command/ShippingMethodCommand.php | 6 ++- .../Controller/CustomCheckoutController.php | 3 +- .../Schema/MyFieldDefinitionMapper.php | 12 ++++-- .../src/Command/MigrationCommand.php | 6 ++- .../api/notifications/notification_send.php | 9 +++-- .../src/Command/NotificationSenderCommand.php | 6 ++- .../NotificationSenderController.php | 3 +- .../src/Notifications/CommandExecuted.php | 12 ++++-- .../src/Notifications/ControllerFeedback.php | 4 +- .../src/Notifier/Channel/LogChannel.php | 13 +++++-- .../src/Command/AttributeCommand.php | 6 ++- .../src/Command/CatalogCommand.php | 6 ++- .../src/Command/CurrencyCommand.php | 6 ++- .../src/Command/ProductAssetCommand.php | 6 ++- .../src/Command/ProductCommand.php | 6 ++- .../src/Command/ProductPriceCommand.php | 6 ++- .../src/Command/ProductTypeCommand.php | 6 ++- .../src/Command/ProductVariantCommand.php | 6 ++- .../src/Command/VatCommand.php | 6 ++- .../src/Command/AddLanguageCommand.php | 6 ++- .../Command/AddLocationToContentCommand.php | 6 ++- .../src/Command/BookmarkCommand.php | 6 ++- .../src/Command/BrowseLocationsCommand.php | 13 +++++-- .../src/Command/CalendarCommand.php | 6 ++- .../src/Command/CreateContentCommand.php | 6 ++- .../src/Command/CreateContentTypeCommand.php | 6 ++- .../src/Command/CreateImageCommand.php | 6 ++- .../src/Command/DeleteContentCommand.php | 6 ++- .../src/Command/FilterCommand.php | 6 ++- .../src/Command/FilterLocationCommand.php | 6 ++- .../FindByTaxonomyEmbeddingCommand.php | 3 +- .../src/Command/FindComplexCommand.php | 6 ++- .../src/Command/FindContentCommand.php | 6 ++- .../src/Command/FindContentTypeCommand.php | 6 ++- .../src/Command/FindInTrashCommand.php | 6 ++- .../src/Command/FindUrlCommand.php | 6 ++- .../Command/FindWithAggregationCommand.php | 6 ++- .../src/Command/FormSubmissionCommand.php | 6 ++- .../src/Command/HideLocationCommand.php | 6 ++- .../src/Command/MoveContentCommand.php | 10 +++-- .../src/Command/ObjectStateCommand.php | 6 ++- .../src/Command/SectionCommand.php | 6 ++- .../src/Command/SegmentCommand.php | 6 ++- .../src/Command/SetMainLocationCommand.php | 6 ++- .../src/Command/TaxonomyCommand.php | 6 ++- .../src/Command/TranslateContentCommand.php | 6 ++- .../src/Command/TrashContentCommand.php | 6 ++- .../src/Command/UpdateContentCommand.php | 6 ++- .../src/Command/ViewContentCommand.php | 6 ++- .../Command/ViewContentMetaDataCommand.php | 6 ++- .../src/Command/WorkflowCommand.php | 6 ++- .../src/Controller/CustomController.php | 4 +- .../src/Controller/CustomFilterController.php | 4 +- .../src/Controller/PaginationController.php | 10 ++--- .../public_php_api/src/embedding_fields.php | 3 +- .../api/public_php_api/src/perform_count.php | 3 +- code_samples/api/rest_api/load_content.php | 3 +- .../src/Rest/InputParser/GreetingInput.php | 6 ++- .../src/Rest/ValueObjectVisitor/Greeting.php | 7 +++- .../Rest/ValueObjectVisitor/RestLocation.php | 11 +++--- .../api/rest_api/src/Rest/Values/Greeting.php | 3 +- .../calendar/src/Calendar/Holidays/Event.php | 7 +++- .../Calendar/Holidays/EventSourceFactory.php | 10 ++--- .../src/Command/DashboardCommand.php | 8 ++-- .../Dam/Handler/WikimediaCommonsHandler.php | 7 +++- .../WikimediaCommonsTransformationFactory.php | 6 ++- .../back_office/images/src/SvgController.php | 9 +++-- .../back_office/images/src/SvgExtension.php | 11 +++--- .../Controller/CustomLimitationController.php | 3 +- .../back_office/limitation/src/Kernel.php | 3 +- .../Form/FormSubmissionServiceDecorator.php | 39 ++++++++++++------- .../Form/FormSubmissionsTabDecorator.php | 3 +- .../Limitation/CustomLimitationType.php | 17 +++++--- .../Mapper/CustomLimitationFormMapper.php | 10 ++--- .../Controller/AllContentListController.php | 3 +- .../EventSubscriber/HelpMenuSubscriber.php | 3 +- .../ContentPublishEventListener.php | 4 +- .../src/Notification/ListRenderer.php | 8 ++-- .../src/Notification/MyRenderer.php | 3 +- .../subscriber/RichTextBlockSubscriber.php | 8 ++-- .../NotificationScenarioSubscriber.php | 4 +- .../MySuggestionEventSubscriber.php | 10 ++--- .../src/Query/DateTimeAttributeQuery.php | 3 +- .../src/Query/DateTimeAttributeRangeQuery.php | 3 +- .../src/Query/ProductCategorySubtreeQuery.php | 3 +- .../src/Query/SymbolAttributeTypeQuery.php | 3 +- .../search/src/Query/UpdatedAtQuery.php | 3 +- .../search/src/Query/UpdatedAtRangeQuery.php | 3 +- .../ProductSuggestionNormalizer.php | 16 +++++--- .../SectionNameSortingDefinitionProvider.php | 4 +- .../back_office/settings/src/Setting/Unit.php | 6 ++- .../src/Strategy/StaticThumbnailStrategy.php | 11 +++--- .../cache/http_cache/src/response_tagging.php | 13 +++++-- .../Percent/PercentAttributeOptionsType.php | 6 ++- .../Percent/PercentOptionsFormMapper.php | 7 +++- .../Percent/PercentValueFormatter.php | 6 ++- .../Percent/PercentValueValidator.php | 6 ++- .../ProductNameFilterFormMapper.php | 4 +- .../NameSchema/PercentNameSchemaStrategy.php | 13 +++++-- .../Cart/CartResolverDecorator.php | 5 +-- .../Cart/Mapper/CartProxyMapper.php | 3 +- .../Cart/Mapper/CartSessionDomainMapper.php | 3 +- .../Cart/PermissionResolverDecorator.php | 7 ++-- .../Persistence/Gateway/DatabaseGateway.php | 11 ++++-- .../src/Command/ManageSessionsCommand.php | 6 ++- .../Controller/ShareCartCreateController.php | 6 +-- .../Controller/ShareCartJoinController.php | 9 +++-- .../src/Form/Data/ShareCartData.php | 3 +- .../src/Form/Type/ShareCartType.php | 6 ++- .../collaboration/src/Query/Search.php | 3 +- .../ApplicationDetailsViewSubscriber.php | 2 +- .../VerifyStateEventSubscriber.php | 3 +- .../src/Migrations/Action/AssignSection.php | 4 +- .../Action/AssignSectionDenormalizer.php | 16 +++++--- .../Action/AssignSectionExecutor.php | 14 ++++--- .../Matcher/SectionIdentifierNormalizer.php | 15 +++++-- .../Step/ReplaceNameStepExecutor.php | 4 +- .../src/Command/ManageDiscountsCommand.php | 9 +++-- .../src/Command/OrderPriceCommand.php | 11 ++++-- .../CurrentUserRegistrationDateResolver.php | 7 ++-- .../IsAnniversaryResolver.php | 6 ++- .../RecentDiscountPrioritizationStrategy.php | 4 +- .../Rule/PurchaseParityValueFormatter.php | 6 ++- .../Step/AnniversaryConditionStep.php | 7 ++-- .../AnniversaryConditionStepFormListener.php | 7 +++- ...nniversaryConditionStepEventSubscriber.php | 4 +- ...nniversaryConditionStepEventSubscriber.php | 4 +- .../PurchasingPowerParityFormMapper.php | 6 ++- .../PurchasingPowerParityValueMapper.php | 14 ++++--- .../Type/AnniversaryConditionStepType.php | 6 ++- .../PurchasingPowerParityValueType.php | 11 ++++-- code_samples/discounts/src/Query/Search.php | 3 +- .../2dpoint_ft/src/FieldType/Point2D/Type.php | 12 ++++-- .../src/FieldType/Point2D/Value.php | 3 +- .../src/Form/Type/Point2DSettingsType.php | 6 ++- .../2dpoint_ft/src/Form/Type/Point2DType.php | 6 ++- .../Serializer/Point2D/ValueDenormalizer.php | 16 ++++++-- .../Serializer/Point2D/ValueNormalizer.php | 14 +++++-- .../2dpoint_ft/steps/step_1/Value.php | 3 +- .../2dpoint_ft/steps/step_3/Point2DType.php | 6 ++- .../2dpoint_ft/steps/step_3/Type.php | 6 ++- .../2dpoint_ft/steps/step_6/Type.php | 6 ++- .../Comparison/HelloWorldComparisonEngine.php | 25 ++++++------ .../Comparison/HelloWorldComparisonResult.php | 4 +- .../FieldType/HelloWorld/Comparison/Value.php | 5 ++- .../src/FieldType/HelloWorld/Type.php | 6 ++- .../src/Form/Type/HelloWorldType.php | 6 ++- ...kboxWithRichtextDescriptionFieldMapper.php | 6 ++- .../CheckboxWithRichtextDescriptionType.php | 7 +++- ...extDescriptionFieldSubmissionConverter.php | 4 +- .../Field/Mapper/CountryFieldMapper.php | 6 ++- .../src/Controller/RelationController.php | 9 +++-- .../src/Controller/BreadcrumbController.php | 3 +- .../layouts/menu/src/Menu/MenuBuilder.php | 4 +- .../src/Command/ViewCommand.php | 6 ++- .../src/Form/Type/OnePageCheckoutType.php | 6 ++- .../checkout/src/Form/Type/SelectSeatType.php | 6 ++- .../Voter/NewPaymentMethodTypeVoter.php | 6 ++- .../Cost/CustomCostFormatter.php | 6 ++- .../Type/CustomShippingMethodOptionsType.php | 6 ++- .../ShippingMethodType/Voter/CustomVoter.php | 6 ++- .../view_matcher/src/View/Matcher/Owner.php | 13 +++---- .../mcp/src/Command/McpServerListCommand.php | 6 +-- .../siteaccess/AcmeExampleExtension.php | 18 ++++++--- .../multisite/siteaccess/Configuration.php | 2 +- .../notifications/Src/Query/search.php | 4 +- .../Attribute/MyStringAttributeMapper.php | 8 ++-- .../Form/Extension/AttributeTypeExtension.php | 9 +++-- .../src/Validator/AlphaOnlyValidator.php | 6 ++- .../BlockEmbedEventEventSubscriber.php | 7 ++-- .../src/Block/Listener/MyBlockListener.php | 3 +- ...abilityPurchasableWithoutStockStrategy.php | 4 +- ...hasableWithoutStockAvailabilityContext.php | 4 +- .../Symbol/Format/Checksum/LuhnChecksum.php | 6 ++- .../User/DateOfBirthUserItemProcessor.php | 6 ++- .../Command/ActivityLogContextTestCommand.php | 6 ++- .../Command/DispatchMyFeatureEventCommand.php | 6 ++- .../MonitorRecentContentCreationCommand.php | 6 ++- .../src/Event/MyFeatureEvent.php | 3 +- .../MyFeatureEventSubscriber.php | 7 ++-- ...urePostActivityListLoadEventSubscriber.php | 6 +-- .../src/recent_activity_disable.php | 3 +- code_samples/recommendations/EventData.php | 3 +- code_samples/recommendations/EventMapper.php | 3 +- .../recommendations/EventSubscriber.php | 3 +- .../search/content/customfield_criterion.php | 3 +- .../content/taxonomy_no_entries_criterion.php | 3 +- .../content/taxonomy_subtree_criterion.php | 3 +- .../ContentTypeGroupGroupResolver.php | 4 +- ...riorityRangeAggregationResultExtractor.php | 13 +++++-- .../PriorityRangeAggregationVisitor.php | 15 ++++--- .../Aggregation/PriorityRangeAggregation.php | 4 +- ...riorityRangeAggregationResultExtractor.php | 13 +++++-- .../Solr/PriorityRangeAggregationVisitor.php | 8 ++-- .../CameraManufacturerVisitor.php | 15 ++++--- .../Solr/CameraManufacturerVisitor.php | 8 ++-- .../SortClause/Elasticsearch/ScoreVisitor.php | 13 +++++-- .../WebinarEventParentNameFieldMapper.php | 8 ++-- .../location/isbookmarked_criterion.php | 3 +- .../src/Controller/ProductViewController.php | 10 ++--- .../src/Command/ShoppingListFilterCommand.php | 12 ++++-- .../src/Command/ShoppingListMoveCommand.php | 12 ++++-- .../CartShoppingListTransferController.php | 3 +- .../shopping_list/search/criteria.php | 3 +- .../shopping_list/search/sort_clauses.php | 3 +- .../ImageAltTextTransformer.php | 7 +++- .../TranslationsManagement/MyApiClient.php | 7 +++- .../MyCustomAiProvider.php | 3 +- .../MyCustomProvider.php | 3 +- .../src/Event/RandomBlockListener.php | 6 +-- .../AuthenticationTokenCreatedSubscriber.php | 3 +- .../src/OAuth/GoogleResourceOwnerMapper.php | 4 +- .../ApprovedTransitionListener.php | 4 +- .../EventListener/LegalTransitionListener.php | 3 +- 233 files changed, 947 insertions(+), 622 deletions(-) diff --git a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php index 6ab3027e0f..3e27de2c4b 100644 --- a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php @@ -9,9 +9,7 @@ final class TranscribeAudioAction extends Action { - public function __construct(private readonly Audio $audio) - { - } + public function __construct(private readonly Audio $audio) {} public function getParameters(): array { diff --git a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php index d6b4b87f48..4c132398ce 100644 --- a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php +++ b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php @@ -6,6 +6,7 @@ use App\AI\Action\TranscribeAudioAction; use App\AI\DataType\Audio; +use Ibexa\Contracts\ConnectorAi\Action\ActionHandlerInterface; use Ibexa\Contracts\ConnectorAi\Action\DataType\Text; use Ibexa\Contracts\ConnectorAi\ActionInterface; use Ibexa\Contracts\ConnectorAi\ActionType\ActionTypeInterface; @@ -16,10 +17,8 @@ { public const string IDENTIFIER = 'transcribe_audio'; - /** @param iterable<\Ibexa\Contracts\ConnectorAi\Action\ActionHandlerInterface> $actionHandlers*/ - public function __construct(private iterable $actionHandlers) - { - } + /** @param iterable $actionHandlers*/ + public function __construct(private iterable $actionHandlers) {} public function getIdentifier(): string { @@ -46,8 +45,10 @@ public function getOptions(): array return []; } - public function createAction(DataType $input, array $parameters = []): ActionInterface - { + public function createAction( + DataType $input, + array $parameters = [] + ): ActionInterface { if (!$input instanceof Audio) { throw new InvalidArgumentException( 'audio', diff --git a/code_samples/ai_actions/src/AI/DataType/Audio.php b/code_samples/ai_actions/src/AI/DataType/Audio.php index bea562a1c9..5ec4ba854b 100644 --- a/code_samples/ai_actions/src/AI/DataType/Audio.php +++ b/code_samples/ai_actions/src/AI/DataType/Audio.php @@ -14,9 +14,7 @@ final class Audio implements DataType /** * @param non-empty-array $base64 */ - public function __construct(private array $base64) - { - } + public function __construct(private array $base64) {} public function getBase64(): string { diff --git a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php index 547a00aa72..05d8bb3532 100644 --- a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php @@ -19,17 +19,18 @@ public function __construct( private HttpClientInterface $client, private string $host = 'http://localhost:8080' - ) { - } + ) {} public function supports(ActionInterface $action): bool { return $action instanceof TextToTextAction; } - public function handle(ActionInterface $action, array $context = []): ActionResponseInterface - { - /** @var \Ibexa\Contracts\ConnectorAi\Action\DataType\Text */ + public function handle( + ActionInterface $action, + array $context = [] + ): ActionResponseInterface { + /** @var Text */ $input = $action->getInput(); $text = $this->sanitizeInput($input->getText()); diff --git a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php index 0e6781204e..1d73bcdbae 100644 --- a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php @@ -5,6 +5,7 @@ namespace App\AI\Handler; use App\AI\ActionType\TranscribeAudioActionType; +use App\AI\DataType\Audio; use Ibexa\Contracts\ConnectorAi\Action\ActionHandlerInterface; use Ibexa\Contracts\ConnectorAi\Action\DataType\Text; use Ibexa\Contracts\ConnectorAi\Action\Response\TextResponse; @@ -22,9 +23,11 @@ public function supports(ActionInterface $action): bool return $action->getActionTypeIdentifier() === TranscribeAudioActionType::IDENTIFIER; } - public function handle(ActionInterface $action, array $context = []): ActionResponseInterface - { - /** @var \App\AI\DataType\Audio $input */ + public function handle( + ActionInterface $action, + array $context = [] + ): ActionResponseInterface { + /** @var Audio $input */ $input = $action->getInput(); $path = $this->saveInputToFile($input->getBase64()); diff --git a/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php b/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php index 78520a1e4e..be675e804d 100644 --- a/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php +++ b/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php @@ -17,8 +17,10 @@ final class TranscribeAudio extends BaseParser public const string BASE64_KEY = 'base64'; /** @param array $data */ - public function parse(array $data, ParsingDispatcher $parsingDispatcher): TranscribeAudioAction - { + public function parse( + array $data, + ParsingDispatcher $parsingDispatcher + ): TranscribeAudioAction { $this->assertInputIsValid($data); $runtimeContext = $this->getRuntimeContext($data); diff --git a/code_samples/ai_actions/src/AI/REST/Output/ValueObjectVisitor/AudioText.php b/code_samples/ai_actions/src/AI/REST/Output/ValueObjectVisitor/AudioText.php index 1c8277f585..696bb8a292 100644 --- a/code_samples/ai_actions/src/AI/REST/Output/ValueObjectVisitor/AudioText.php +++ b/code_samples/ai_actions/src/AI/REST/Output/ValueObjectVisitor/AudioText.php @@ -15,8 +15,11 @@ final class AudioText extends ValueObjectVisitor /** * @param \App\AI\REST\Value\AudioText $data */ - public function visit(Visitor $visitor, Generator $generator, $data): void - { + public function visit( + Visitor $visitor, + Generator $generator, + $data + ): void { $mediaType = 'ai.' . self::OBJECT_IDENTIFIER; $text = $data->getOutput(); diff --git a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php index d9f2cbc417..99c01975b4 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php +++ b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php @@ -6,6 +6,4 @@ use Ibexa\ConnectorAi\REST\Value\RestActionResponse; -final class AudioText extends RestActionResponse -{ -} +final class AudioText extends RestActionResponse {} diff --git a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php index 6e33f288a0..ef19ccbb0d 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php @@ -12,8 +12,7 @@ public function __construct( private Audio $input, private RuntimeContext $runtimeContext - ) { - } + ) {} public function getInput(): Audio { diff --git a/code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php b/code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php index 0c6ef19854..e62467a6c0 100644 --- a/code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php +++ b/code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php @@ -39,8 +39,10 @@ protected function configure(): void $this->addArgument('user', InputArgument::OPTIONAL, 'Login of the user executing the actions', 'admin'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $input->getArgument('user'); $this->permissionResolver->setCurrentUserReference($this->userService->loadUserByLogin($user)); @@ -63,7 +65,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->actionConfigurationService->createActionConfiguration($actionConfigurationCreateStruct); $action = new RefineTextAction(new Text([ -<<addArgument('user', InputArgument::OPTIONAL, 'Login of the user executing the actions', 'admin'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $this->setUser($input->getArgument('user')); $modifiedImages = $this->getModifiedImages(); $output->writeln(sprintf('Found %d modified image in the last 24h', $modifiedImages->getTotalCount())); - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ + /** @var Content $content */ foreach ($modifiedImages as $content) { - /** @var \Ibexa\Core\FieldType\Image\Value $value */ + /** @var Value $value */ $value = $content->getFieldValue(self::IMAGE_FIELD_IDENTIFIER); if ($value === null || !$this->shouldGenerateAltText($value)) { @@ -82,8 +85,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::SUCCESS; } - private function getSuggestedAltText(string $imageEncodedInBase64, string $languageCode): string - { + private function getSuggestedAltText( + string $imageEncodedInBase64, + string $languageCode + ): string { $action = new GenerateAltTextAction(new Image([$imageEncodedInBase64])); $action->setRuntimeContext(new RuntimeContext(['languageCode' => $languageCode])); diff --git a/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php b/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php index bc2d4306d3..89297ddde6 100644 --- a/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php +++ b/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php @@ -11,8 +11,10 @@ final class TextToTextOptionsType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('system_prompt', TextareaType::class, [ 'required' => true, 'disabled' => $options['translation_mode'], diff --git a/code_samples/ai_actions/src/Form/Type/TranscribeAudioOptionsType.php b/code_samples/ai_actions/src/Form/Type/TranscribeAudioOptionsType.php index c387716b26..df14a9147f 100644 --- a/code_samples/ai_actions/src/Form/Type/TranscribeAudioOptionsType.php +++ b/code_samples/ai_actions/src/Form/Type/TranscribeAudioOptionsType.php @@ -11,8 +11,10 @@ final class TranscribeAudioOptionsType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('include_timestamps', CheckboxType::class, [ 'required' => false, 'disabled' => $options['translation_mode'], diff --git a/code_samples/ai_actions/src/Query/Search.php b/code_samples/ai_actions/src/Query/Search.php index 2069f83899..108968d3b7 100644 --- a/code_samples/ai_actions/src/Query/Search.php +++ b/code_samples/ai_actions/src/Query/Search.php @@ -5,6 +5,7 @@ use Ibexa\Contracts\ConnectorAi\ActionConfiguration\ActionConfigurationQuery; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\Criterion; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\SortClause; +use Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\AbstractSortClause; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; @@ -21,5 +22,5 @@ new SortClause\Identifier(AbstractSortClause::SORT_ASC), ] ); -/** @var \Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface $actionConfigurationService */ +/** @var ActionConfigurationServiceInterface $actionConfigurationService */ $results = $actionConfigurationService->findActionConfigurations($query); diff --git a/code_samples/api/commerce/src/Command/CartCommand.php b/code_samples/api/commerce/src/Command/CartCommand.php index 7d4bc1a02e..015a1e3829 100644 --- a/code_samples/api/commerce/src/Command/CartCommand.php +++ b/code_samples/api/commerce/src/Command/CartCommand.php @@ -40,8 +40,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $this->permissionResolver->setCurrentUserReference( $this->userService->loadUserByLogin('admin') ); diff --git a/code_samples/api/commerce/src/Command/OrderCommand.php b/code_samples/api/commerce/src/Command/OrderCommand.php index 15eb8206f5..833b8cfe03 100644 --- a/code_samples/api/commerce/src/Command/OrderCommand.php +++ b/code_samples/api/commerce/src/Command/OrderCommand.php @@ -39,8 +39,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $currentUser = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($currentUser); @@ -73,7 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int 'Desk 1' ) ), - ]; + ]; $value = new OrderValue( new Money\Money(20, new Money\Currency('EUR')), diff --git a/code_samples/api/commerce/src/Command/PaymentCommand.php b/code_samples/api/commerce/src/Command/PaymentCommand.php index 0e6ff5ba64..939170a2d8 100644 --- a/code_samples/api/commerce/src/Command/PaymentCommand.php +++ b/code_samples/api/commerce/src/Command/PaymentCommand.php @@ -36,8 +36,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $currentUser = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($currentUser); diff --git a/code_samples/api/commerce/src/Command/PaymentMethodCommand.php b/code_samples/api/commerce/src/Command/PaymentMethodCommand.php index 4f4d6054e7..c2f479bf2d 100644 --- a/code_samples/api/commerce/src/Command/PaymentMethodCommand.php +++ b/code_samples/api/commerce/src/Command/PaymentMethodCommand.php @@ -32,8 +32,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $currentUser = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($currentUser); diff --git a/code_samples/api/commerce/src/Command/ShipmentCommand.php b/code_samples/api/commerce/src/Command/ShipmentCommand.php index 6dc246ee3e..e828ad73f0 100644 --- a/code_samples/api/commerce/src/Command/ShipmentCommand.php +++ b/code_samples/api/commerce/src/Command/ShipmentCommand.php @@ -37,8 +37,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $currentUser = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($currentUser); diff --git a/code_samples/api/commerce/src/Command/ShippingMethodCommand.php b/code_samples/api/commerce/src/Command/ShippingMethodCommand.php index 85368142f8..6787a4d443 100644 --- a/code_samples/api/commerce/src/Command/ShippingMethodCommand.php +++ b/code_samples/api/commerce/src/Command/ShippingMethodCommand.php @@ -32,8 +32,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $currentUser = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($currentUser); diff --git a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php index 6dead11eb5..4101afa7c6 100644 --- a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php +++ b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php @@ -14,8 +14,7 @@ class CustomCheckoutController extends Controller public function __construct( private readonly CartServiceInterface $cartService, private readonly CheckoutServiceInterface $checkoutService - ) { - } + ) {} public function showContentAction(): Response { diff --git a/code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php b/code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php index b2a4432f86..e5daebeee0 100644 --- a/code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php +++ b/code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php @@ -16,8 +16,10 @@ protected function getFieldTypeIdentifier(): string } #[\Override] - public function mapToFieldValueInputType(ContentType $contentType, FieldDefinition $fieldDefinition): ?string - { + public function mapToFieldValueInputType( + ContentType $contentType, + FieldDefinition $fieldDefinition + ): ?string { if (!$this->canMap($fieldDefinition)) { return parent::mapToFieldValueInputType($contentType, $fieldDefinition); } @@ -25,8 +27,10 @@ public function mapToFieldValueInputType(ContentType $contentType, FieldDefiniti return $this->nameMyFieldInputType($contentType, $fieldDefinition); } - private function nameMyFieldInputType(ContentType $contentType, FieldDefinition $fieldDefinition): string - { + private function nameMyFieldInputType( + ContentType $contentType, + FieldDefinition $fieldDefinition + ): string { $converter = new CamelCaseToSnakeCaseNameConverter(null, false); return sprintf( diff --git a/code_samples/api/migration/src/Command/MigrationCommand.php b/code_samples/api/migration/src/Command/MigrationCommand.php index 7f4938bbea..142c59c102 100644 --- a/code_samples/api/migration/src/Command/MigrationCommand.php +++ b/code_samples/api/migration/src/Command/MigrationCommand.php @@ -19,8 +19,10 @@ public function __construct(private readonly MigrationService $migrationService) parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $string_with_migration_content = ''; $this->migrationService->add( new Migration( diff --git a/code_samples/api/notifications/notification_send.php b/code_samples/api/notifications/notification_send.php index ce542c33a3..3a584bebbd 100644 --- a/code_samples/api/notifications/notification_send.php +++ b/code_samples/api/notifications/notification_send.php @@ -1,6 +1,9 @@ send( new SymfonyNotificationAdapter(new MyNotification($subject)), diff --git a/code_samples/api/notifications/src/Command/NotificationSenderCommand.php b/code_samples/api/notifications/src/Command/NotificationSenderCommand.php index ddd75f2e24..f11e10b828 100644 --- a/code_samples/api/notifications/src/Command/NotificationSenderCommand.php +++ b/code_samples/api/notifications/src/Command/NotificationSenderCommand.php @@ -28,8 +28,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { /** @var array $exceptions */ $exceptions = []; diff --git a/code_samples/api/notifications/src/Controller/NotificationSenderController.php b/code_samples/api/notifications/src/Controller/NotificationSenderController.php index 62188f4dd4..66dac00562 100644 --- a/code_samples/api/notifications/src/Controller/NotificationSenderController.php +++ b/code_samples/api/notifications/src/Controller/NotificationSenderController.php @@ -13,8 +13,7 @@ class NotificationSenderController extends AbstractController { public function __construct( private readonly NotificationServiceInterface $notificationService, - ) { - } + ) {} #[Route('/notification-sender')] public function index(): Response diff --git a/code_samples/api/notifications/src/Notifications/CommandExecuted.php b/code_samples/api/notifications/src/Notifications/CommandExecuted.php index 6f01028477..1f26069265 100644 --- a/code_samples/api/notifications/src/Notifications/CommandExecuted.php +++ b/code_samples/api/notifications/src/Notifications/CommandExecuted.php @@ -25,8 +25,10 @@ public function __construct( $this->importance(Command::SUCCESS === $this->exitCode ? Notification::IMPORTANCE_LOW : Notification::IMPORTANCE_HIGH); } - public function asEmailMessage(EmailRecipientInterface $recipient, ?string $transport = null): ?EmailMessage - { + public function asEmailMessage( + EmailRecipientInterface $recipient, + ?string $transport = null + ): ?EmailMessage { $body = ''; foreach ($this->exceptions as $exception) { $body .= $exception->getMessage() . '
'; @@ -40,8 +42,10 @@ public function asEmailMessage(EmailRecipientInterface $recipient, ?string $tran return new EmailMessage($email); } - public function asSystemNotification(UserRecipientInterface $recipient, ?string $transport = null): ?SystemMessage - { + public function asSystemNotification( + UserRecipientInterface $recipient, + ?string $transport = null + ): ?SystemMessage { $message = new SystemMessage($recipient->getUser()); $message->setContext([ 'icon' => Command::SUCCESS === $this->exitCode ? 'check-circle' : 'discard-circle', diff --git a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php index 0c82a0be11..7effa66575 100644 --- a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php +++ b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php @@ -4,6 +4,4 @@ use Symfony\Component\Notifier\Notification\Notification; -class ControllerFeedback extends Notification -{ -} +class ControllerFeedback extends Notification {} diff --git a/code_samples/api/notifications/src/Notifier/Channel/LogChannel.php b/code_samples/api/notifications/src/Notifier/Channel/LogChannel.php index 39abce608e..9a6d533fa9 100644 --- a/code_samples/api/notifications/src/Notifier/Channel/LogChannel.php +++ b/code_samples/api/notifications/src/Notifier/Channel/LogChannel.php @@ -12,8 +12,11 @@ class LogChannel implements ChannelInterface, LoggerAwareInterface { use LoggerAwareTrait; - public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void - { + public function notify( + Notification $notification, + RecipientInterface $recipient, + ?string $transportName = null + ): void { if (isset($this->logger)) { $this->logger->info($notification->getSubject(), [ 'class' => $notification::class, @@ -23,8 +26,10 @@ public function notify(Notification $notification, RecipientInterface $recipient } } - public function supports(Notification $notification, RecipientInterface $recipient): bool - { + public function supports( + Notification $notification, + RecipientInterface $recipient + ): bool { return true; } } diff --git a/code_samples/api/product_catalog/src/Command/AttributeCommand.php b/code_samples/api/product_catalog/src/Command/AttributeCommand.php index 397feb4ee1..5bc9916a17 100644 --- a/code_samples/api/product_catalog/src/Command/AttributeCommand.php +++ b/code_samples/api/product_catalog/src/Command/AttributeCommand.php @@ -31,8 +31,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/CatalogCommand.php b/code_samples/api/product_catalog/src/Command/CatalogCommand.php index eef9eb1d62..093120c648 100644 --- a/code_samples/api/product_catalog/src/Command/CatalogCommand.php +++ b/code_samples/api/product_catalog/src/Command/CatalogCommand.php @@ -41,8 +41,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/CurrencyCommand.php b/code_samples/api/product_catalog/src/Command/CurrencyCommand.php index 8162fadede..1a7b573b62 100644 --- a/code_samples/api/product_catalog/src/Command/CurrencyCommand.php +++ b/code_samples/api/product_catalog/src/Command/CurrencyCommand.php @@ -35,8 +35,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/ProductAssetCommand.php b/code_samples/api/product_catalog/src/Command/ProductAssetCommand.php index aa9ed43d9e..8a79141307 100644 --- a/code_samples/api/product_catalog/src/Command/ProductAssetCommand.php +++ b/code_samples/api/product_catalog/src/Command/ProductAssetCommand.php @@ -36,8 +36,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/ProductCommand.php b/code_samples/api/product_catalog/src/Command/ProductCommand.php index b94753257b..2317389d59 100644 --- a/code_samples/api/product_catalog/src/Command/ProductCommand.php +++ b/code_samples/api/product_catalog/src/Command/ProductCommand.php @@ -45,8 +45,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/ProductPriceCommand.php b/code_samples/api/product_catalog/src/Command/ProductPriceCommand.php index 0a3c40ecbb..ba6bde79cc 100644 --- a/code_samples/api/product_catalog/src/Command/ProductPriceCommand.php +++ b/code_samples/api/product_catalog/src/Command/ProductPriceCommand.php @@ -48,8 +48,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/ProductTypeCommand.php b/code_samples/api/product_catalog/src/Command/ProductTypeCommand.php index a544245d40..214198ef5f 100644 --- a/code_samples/api/product_catalog/src/Command/ProductTypeCommand.php +++ b/code_samples/api/product_catalog/src/Command/ProductTypeCommand.php @@ -39,8 +39,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php b/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php index 92c7dab42d..349fb3c14e 100644 --- a/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php +++ b/code_samples/api/product_catalog/src/Command/ProductVariantCommand.php @@ -40,8 +40,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/product_catalog/src/Command/VatCommand.php b/code_samples/api/product_catalog/src/Command/VatCommand.php index fc5ee046c6..43037e68c6 100644 --- a/code_samples/api/product_catalog/src/Command/VatCommand.php +++ b/code_samples/api/product_catalog/src/Command/VatCommand.php @@ -34,8 +34,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/AddLanguageCommand.php b/code_samples/api/public_php_api/src/Command/AddLanguageCommand.php index 94f045dbb8..53dccb6142 100644 --- a/code_samples/api/public_php_api/src/Command/AddLanguageCommand.php +++ b/code_samples/api/public_php_api/src/Command/AddLanguageCommand.php @@ -24,8 +24,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/AddLocationToContentCommand.php b/code_samples/api/public_php_api/src/Command/AddLocationToContentCommand.php index 4b5d4728f5..78a4580eb3 100644 --- a/code_samples/api/public_php_api/src/Command/AddLocationToContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/AddLocationToContentCommand.php @@ -36,8 +36,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/BookmarkCommand.php b/code_samples/api/public_php_api/src/Command/BookmarkCommand.php index aaff6fb034..bdf109e737 100644 --- a/code_samples/api/public_php_api/src/Command/BookmarkCommand.php +++ b/code_samples/api/public_php_api/src/Command/BookmarkCommand.php @@ -32,8 +32,10 @@ protected function configure(): void ->addOption('delete', 'd', InputOption::VALUE_NONE, 'Delete the created Favourites entry?', null); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $locationId = (int) $input->getArgument('locationId'); $location = $this->locationService->loadLocation($locationId); diff --git a/code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php b/code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php index 9f88f6ee9e..bbe0e56de7 100644 --- a/code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php +++ b/code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php @@ -29,8 +29,11 @@ protected function configure(): void ]); } - private function browseLocation(Location $location, OutputInterface $output, int $depth = 0): void - { + private function browseLocation( + Location $location, + OutputInterface $output, + int $depth = 0 + ): void { $output->writeln($location->contentInfo->name); $children = $this->locationService->loadLocationChildren($location); @@ -39,8 +42,10 @@ private function browseLocation(Location $location, OutputInterface $output, int } } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $locationId = (int) $input->getArgument('locationId'); $location = $this->locationService->loadLocation($locationId); diff --git a/code_samples/api/public_php_api/src/Command/CalendarCommand.php b/code_samples/api/public_php_api/src/Command/CalendarCommand.php index 4a48eedfaf..4e7f739ecd 100644 --- a/code_samples/api/public_php_api/src/Command/CalendarCommand.php +++ b/code_samples/api/public_php_api/src/Command/CalendarCommand.php @@ -26,8 +26,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/CreateContentCommand.php b/code_samples/api/public_php_api/src/Command/CreateContentCommand.php index 620c0932c6..8467de0271 100644 --- a/code_samples/api/public_php_api/src/Command/CreateContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/CreateContentCommand.php @@ -40,8 +40,10 @@ protected function configure(): void ->addOption('publish', 'p', InputOption::VALUE_NONE, 'Do you want to publish the content item?'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/CreateContentTypeCommand.php b/code_samples/api/public_php_api/src/Command/CreateContentTypeCommand.php index 2f9a9b694a..9db5048cd5 100644 --- a/code_samples/api/public_php_api/src/Command/CreateContentTypeCommand.php +++ b/code_samples/api/public_php_api/src/Command/CreateContentTypeCommand.php @@ -36,8 +36,10 @@ protected function configure(): void ->addOption('copy', 'c', InputOption::VALUE_NONE, 'Do you want to make a copy of the content type?'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/CreateImageCommand.php b/code_samples/api/public_php_api/src/Command/CreateImageCommand.php index 201b1d980b..ab4b10a2fa 100644 --- a/code_samples/api/public_php_api/src/Command/CreateImageCommand.php +++ b/code_samples/api/public_php_api/src/Command/CreateImageCommand.php @@ -40,8 +40,10 @@ protected function configure(): void ->addOption('publish', 'p', InputOption::VALUE_NONE, 'Do you want to publish the content item?'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/DeleteContentCommand.php b/code_samples/api/public_php_api/src/Command/DeleteContentCommand.php index 6c58ceeea6..e06d51413f 100644 --- a/code_samples/api/public_php_api/src/Command/DeleteContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/DeleteContentCommand.php @@ -31,8 +31,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/FilterCommand.php b/code_samples/api/public_php_api/src/Command/FilterCommand.php index 09f1afdd35..749e79118d 100644 --- a/code_samples/api/public_php_api/src/Command/FilterCommand.php +++ b/code_samples/api/public_php_api/src/Command/FilterCommand.php @@ -31,8 +31,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $parentLocationId = (int)$input->getArgument('parentLocationId'); $filter = new Filter(); diff --git a/code_samples/api/public_php_api/src/Command/FilterLocationCommand.php b/code_samples/api/public_php_api/src/Command/FilterLocationCommand.php index f1f05b5b23..b0682c6af8 100644 --- a/code_samples/api/public_php_api/src/Command/FilterLocationCommand.php +++ b/code_samples/api/public_php_api/src/Command/FilterLocationCommand.php @@ -31,8 +31,10 @@ public function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $parentLocationId = (int)$input->getArgument('parentLocationId'); $filter = new Filter(); diff --git a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php index 4d0af39535..34a93889ec 100644 --- a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php @@ -5,6 +5,7 @@ namespace App\Command; use Ibexa\Contracts\Core\Repository\SearchService; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\EmbeddingQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; @@ -53,7 +54,7 @@ protected function execute( foreach ($result->searchHits as $searchHit) { assert($searchHit instanceof SearchHit); - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ + /** @var Content $content */ $content = $searchHit->valueObject; $contentInfo = $content->versionInfo->contentInfo; diff --git a/code_samples/api/public_php_api/src/Command/FindComplexCommand.php b/code_samples/api/public_php_api/src/Command/FindComplexCommand.php index a60e28a59c..6babeef166 100644 --- a/code_samples/api/public_php_api/src/Command/FindComplexCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindComplexCommand.php @@ -36,8 +36,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $locationId = (int) $input->getArgument('locationId'); $contentTypeIdentifier = $input->getArgument('contentTypeIdentifier'); $text = $input->getArgument('text'); diff --git a/code_samples/api/public_php_api/src/Command/FindContentCommand.php b/code_samples/api/public_php_api/src/Command/FindContentCommand.php index ff72d55a46..6debd0e364 100644 --- a/code_samples/api/public_php_api/src/Command/FindContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindContentCommand.php @@ -30,8 +30,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $contentTypeIdentifier = $input->getArgument('contentTypeIdentifier'); $query = new LocationQuery(); diff --git a/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php b/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php index d8287a0229..79ad1e00e3 100644 --- a/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php @@ -22,8 +22,10 @@ public function __construct(private readonly ContentTypeService $contentTypeServ parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { // Find content types from the "Content" group that contains a specific field definition (in this case, a "Body" field). $query = new ContentTypeQuery( new Criterion\LogicalAnd([ diff --git a/code_samples/api/public_php_api/src/Command/FindInTrashCommand.php b/code_samples/api/public_php_api/src/Command/FindInTrashCommand.php index c663e92917..e8a6a17af9 100644 --- a/code_samples/api/public_php_api/src/Command/FindInTrashCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindInTrashCommand.php @@ -29,8 +29,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $contentTypeId = (int) $input->getArgument('contentTypeId'); $query = new Query(); diff --git a/code_samples/api/public_php_api/src/Command/FindUrlCommand.php b/code_samples/api/public_php_api/src/Command/FindUrlCommand.php index d9535189b3..9c4ac11e5e 100644 --- a/code_samples/api/public_php_api/src/Command/FindUrlCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindUrlCommand.php @@ -27,8 +27,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php b/code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php index 664d0a85fb..c225cd6650 100644 --- a/code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php @@ -23,8 +23,10 @@ public function __construct(private readonly SearchService $searchService) parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $query = new LocationQuery(); $query->query = new Criterion\ParentLocationId(2); diff --git a/code_samples/api/public_php_api/src/Command/FormSubmissionCommand.php b/code_samples/api/public_php_api/src/Command/FormSubmissionCommand.php index 54589ca95d..fc6e5c1d2b 100644 --- a/code_samples/api/public_php_api/src/Command/FormSubmissionCommand.php +++ b/code_samples/api/public_php_api/src/Command/FormSubmissionCommand.php @@ -25,8 +25,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/HideLocationCommand.php b/code_samples/api/public_php_api/src/Command/HideLocationCommand.php index 2ad1d224ad..48188f7823 100644 --- a/code_samples/api/public_php_api/src/Command/HideLocationCommand.php +++ b/code_samples/api/public_php_api/src/Command/HideLocationCommand.php @@ -33,8 +33,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/MoveContentCommand.php b/code_samples/api/public_php_api/src/Command/MoveContentCommand.php index 50b760fa96..51799751ba 100644 --- a/code_samples/api/public_php_api/src/Command/MoveContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/MoveContentCommand.php @@ -29,13 +29,15 @@ protected function configure(): void { $this ->setDefinition([ - new InputArgument('locationId', InputArgument::REQUIRED, 'Location to copy'), - new InputArgument('targetLocationId', InputArgument::REQUIRED, 'Target to copy or move to'), + new InputArgument('locationId', InputArgument::REQUIRED, 'Location to copy'), + new InputArgument('targetLocationId', InputArgument::REQUIRED, 'Target to copy or move to'), ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/ObjectStateCommand.php b/code_samples/api/public_php_api/src/Command/ObjectStateCommand.php index 5c133c6743..69c1aca8a8 100644 --- a/code_samples/api/public_php_api/src/Command/ObjectStateCommand.php +++ b/code_samples/api/public_php_api/src/Command/ObjectStateCommand.php @@ -37,8 +37,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/SectionCommand.php b/code_samples/api/public_php_api/src/Command/SectionCommand.php index 2ee4e31d2a..c2417a379f 100644 --- a/code_samples/api/public_php_api/src/Command/SectionCommand.php +++ b/code_samples/api/public_php_api/src/Command/SectionCommand.php @@ -41,8 +41,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/SegmentCommand.php b/code_samples/api/public_php_api/src/Command/SegmentCommand.php index 5dc67fc6bf..fd97302f87 100644 --- a/code_samples/api/public_php_api/src/Command/SegmentCommand.php +++ b/code_samples/api/public_php_api/src/Command/SegmentCommand.php @@ -25,8 +25,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/SetMainLocationCommand.php b/code_samples/api/public_php_api/src/Command/SetMainLocationCommand.php index 081cbabcc5..be5f4e1ed7 100644 --- a/code_samples/api/public_php_api/src/Command/SetMainLocationCommand.php +++ b/code_samples/api/public_php_api/src/Command/SetMainLocationCommand.php @@ -34,8 +34,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/TaxonomyCommand.php b/code_samples/api/public_php_api/src/Command/TaxonomyCommand.php index 2b98a23b6e..7ee1820a83 100644 --- a/code_samples/api/public_php_api/src/Command/TaxonomyCommand.php +++ b/code_samples/api/public_php_api/src/Command/TaxonomyCommand.php @@ -25,8 +25,10 @@ public function __construct( parent::__construct(); } - public function execute(InputInterface $input, OutputInterface $output): int - { + public function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/TranslateContentCommand.php b/code_samples/api/public_php_api/src/Command/TranslateContentCommand.php index c599ca0bbe..dc28a90e11 100644 --- a/code_samples/api/public_php_api/src/Command/TranslateContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/TranslateContentCommand.php @@ -36,8 +36,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/TrashContentCommand.php b/code_samples/api/public_php_api/src/Command/TrashContentCommand.php index 23bcdf7ad4..10da136a11 100644 --- a/code_samples/api/public_php_api/src/Command/TrashContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/TrashContentCommand.php @@ -36,8 +36,10 @@ protected function configure(): void ->addOption('restore', 'r', InputOption::VALUE_NONE, 'Do you want to restore the content item?'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/UpdateContentCommand.php b/code_samples/api/public_php_api/src/Command/UpdateContentCommand.php index 5783097e29..093f14ca67 100644 --- a/code_samples/api/public_php_api/src/Command/UpdateContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/UpdateContentCommand.php @@ -34,8 +34,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/ViewContentCommand.php b/code_samples/api/public_php_api/src/Command/ViewContentCommand.php index 0af99757e7..c926a65b2c 100644 --- a/code_samples/api/public_php_api/src/Command/ViewContentCommand.php +++ b/code_samples/api/public_php_api/src/Command/ViewContentCommand.php @@ -33,8 +33,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $contentId = (int) $input->getArgument('contentId'); $content = $this->contentService->loadContent($contentId); diff --git a/code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php b/code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php index 69f197bd3a..a2dea9eefc 100644 --- a/code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php +++ b/code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php @@ -42,8 +42,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $user = $this->userService->loadUserByLogin('admin'); $this->permissionResolver->setCurrentUserReference($user); diff --git a/code_samples/api/public_php_api/src/Command/WorkflowCommand.php b/code_samples/api/public_php_api/src/Command/WorkflowCommand.php index 7ed4d01efc..a4bf33b6b8 100644 --- a/code_samples/api/public_php_api/src/Command/WorkflowCommand.php +++ b/code_samples/api/public_php_api/src/Command/WorkflowCommand.php @@ -35,8 +35,10 @@ protected function configure(): void ]); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $contentId = (int) $input->getArgument('contentId'); $workflowName = $input->getArgument('workflowName'); $transitionName = $input->getArgument('transitionName'); diff --git a/code_samples/api/public_php_api/src/Controller/CustomController.php b/code_samples/api/public_php_api/src/Controller/CustomController.php index 1f00f31571..0b539852b0 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomController.php @@ -10,9 +10,7 @@ class CustomController extends Controller { - public function __construct(private readonly SearchService $searchService) - { - } + public function __construct(private readonly SearchService $searchService) {} public function showContentAction(int $locationId): Response { diff --git a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php index 07c057262d..cbbc14c6be 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php @@ -10,9 +10,7 @@ class CustomFilterController extends Controller { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} public function showChildrenAction(ContentView $view): ContentView { diff --git a/code_samples/api/public_php_api/src/Controller/PaginationController.php b/code_samples/api/public_php_api/src/Controller/PaginationController.php index 0a84d954d6..339adc98a0 100644 --- a/code_samples/api/public_php_api/src/Controller/PaginationController.php +++ b/code_samples/api/public_php_api/src/Controller/PaginationController.php @@ -13,12 +13,12 @@ class PaginationController extends Controller { - public function __construct(private readonly SearchService $searchService) - { - } + public function __construct(private readonly SearchService $searchService) {} - public function showContentAction(Request $request, int $locationId): Response - { + public function showContentAction( + Request $request, + int $locationId + ): Response { $query = new LocationQuery(); $query->filter = new Criterion\ParentLocationId($locationId); diff --git a/code_samples/api/public_php_api/src/embedding_fields.php b/code_samples/api/public_php_api/src/embedding_fields.php index 6276bab30e..61570a881e 100644 --- a/code_samples/api/public_php_api/src/embedding_fields.php +++ b/code_samples/api/public_php_api/src/embedding_fields.php @@ -1,8 +1,9 @@ create(); echo $embeddingField->getType(); // for example, "ibexa_dense_vector_model_123" diff --git a/code_samples/api/public_php_api/src/perform_count.php b/code_samples/api/public_php_api/src/perform_count.php index db61e36d73..0db9aae9ec 100644 --- a/code_samples/api/public_php_api/src/perform_count.php +++ b/code_samples/api/public_php_api/src/perform_count.php @@ -1,9 +1,10 @@ request('GET', $resource, [ 'headers' => ['Accept: application/vnd.ibexa.api.ContentInfo+json'], ]); diff --git a/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php b/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php index da1bb5a346..9d79d2e902 100644 --- a/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php +++ b/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php @@ -9,8 +9,10 @@ class GreetingInput extends BaseParser { - public function parse(array $data, ParsingDispatcher $parsingDispatcher): Greeting - { + public function parse( + array $data, + ParsingDispatcher $parsingDispatcher + ): Greeting { if (!isset($data['Salutation'])) { throw new Exceptions\Parser("Missing or invalid 'Salutation' element for Greeting."); } diff --git a/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php b/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php index dc2562caf7..6276ebcda6 100644 --- a/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php +++ b/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php @@ -11,8 +11,11 @@ class Greeting extends ValueObjectVisitor /** * @param \App\Rest\Values\Greeting $data */ - public function visit(Visitor $visitor, Generator $generator, $data): void - { + public function visit( + Visitor $visitor, + Generator $generator, + $data + ): void { $visitor->setHeader('Content-Type', $generator->getMediaType('Greeting')); $generator->startObjectElement('Greeting'); $generator->attribute('href', $this->router->generate('app.rest.greeting')); diff --git a/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php b/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php index 53ebb31a85..feec76a957 100644 --- a/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php +++ b/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php @@ -10,13 +10,14 @@ class RestLocation extends BaseRestLocation { - public function __construct(private readonly URLAliasService $urlAliasService) - { - } + public function __construct(private readonly URLAliasService $urlAliasService) {} #[\Override] - public function visit(Visitor $visitor, Generator $generator, $data): void - { + public function visit( + Visitor $visitor, + Generator $generator, + $data + ): void { // Not using $generator->startObjectElement to not have the XML Generator adding its own media-type attribute with the default vendor $generator->startHashElement('Location'); $generator->attribute( diff --git a/code_samples/api/rest_api/src/Rest/Values/Greeting.php b/code_samples/api/rest_api/src/Rest/Values/Greeting.php index 696289feab..8968db12fd 100644 --- a/code_samples/api/rest_api/src/Rest/Values/Greeting.php +++ b/code_samples/api/rest_api/src/Rest/Values/Greeting.php @@ -7,6 +7,5 @@ class Greeting public function __construct( public string $salutation = 'Hello', public string $recipient = 'World' - ) { - } + ) {} } diff --git a/code_samples/back_office/calendar/src/Calendar/Holidays/Event.php b/code_samples/back_office/calendar/src/Calendar/Holidays/Event.php index 099a8ae95c..8718d55f6d 100644 --- a/code_samples/back_office/calendar/src/Calendar/Holidays/Event.php +++ b/code_samples/back_office/calendar/src/Calendar/Holidays/Event.php @@ -7,8 +7,11 @@ class Event extends CalendarEvent { - public function __construct(string $id, DateTimeInterface $dateTime, EventType $type) - { + public function __construct( + string $id, + DateTimeInterface $dateTime, + EventType $type + ) { parent::__construct($type, $id, $dateTime); } } diff --git a/code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php b/code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php index 67478c33fd..a322f36d61 100644 --- a/code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php +++ b/code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php @@ -10,9 +10,7 @@ class EventSourceFactory { - public function __construct(private readonly EventType $eventType) - { - } + public function __construct(private readonly EventType $eventType) {} public function createEventSource(): EventSourceInterface { @@ -29,8 +27,10 @@ public function createEventSource(): EventSourceInterface return new InMemoryEventSource($collection); } - private function createEvent(string $id, DateTimeInterface $dateTime): Event - { + private function createEvent( + string $id, + DateTimeInterface $dateTime + ): Event { return new Event($id, $dateTime, $this->eventType); } } diff --git a/code_samples/back_office/dashboard/src/Command/DashboardCommand.php b/code_samples/back_office/dashboard/src/Command/DashboardCommand.php index 6e4616b788..4d63849b90 100644 --- a/code_samples/back_office/dashboard/src/Command/DashboardCommand.php +++ b/code_samples/back_office/dashboard/src/Command/DashboardCommand.php @@ -20,7 +20,7 @@ )] class DashboardCommand extends Command { - private readonly Locationservice $locationService; + private readonly LocationService $locationService; private readonly ContentService $contentService; @@ -47,8 +47,10 @@ public function configure(): void ->addArgument('group', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'User Group Content ID(s)'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $dashboardModelLocationId = (int)$input->getArgument('dashboard'); $userGroupLocationIdList = array_map(intval(...), $input->getArgument('group')); diff --git a/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php b/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php index 63160d678f..d00e111a53 100644 --- a/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php +++ b/code_samples/back_office/images/src/Connector/Dam/Handler/WikimediaCommonsHandler.php @@ -16,8 +16,11 @@ class WikimediaCommonsHandler implements HandlerInterface { private const string USER_AGENT = 'Ibexa DXP Commons Dam Connector'; - public function search(Query $query, int $offset = 0, int $limit = 20): AssetSearchResult - { + public function search( + Query $query, + int $offset = 0, + int $limit = 20 + ): AssetSearchResult { $searchUrl = 'https://commons.wikimedia.org/w/api.php?action=query&list=search&format=json&srnamespace=6' . '&srsearch=' . urlencode($query->getPhrase()) . '&sroffset=' . $offset diff --git a/code_samples/back_office/images/src/Connector/Dam/Transformation/WikimediaCommonsTransformationFactory.php b/code_samples/back_office/images/src/Connector/Dam/Transformation/WikimediaCommonsTransformationFactory.php index f900da52c3..26260c305f 100644 --- a/code_samples/back_office/images/src/Connector/Dam/Transformation/WikimediaCommonsTransformationFactory.php +++ b/code_samples/back_office/images/src/Connector/Dam/Transformation/WikimediaCommonsTransformationFactory.php @@ -8,8 +8,10 @@ class WikimediaCommonsTransformationFactory implements TransformationFactoryInterface { /** @param array $transformationParameters */ - public function build(?string $transformationName = null, array $transformationParameters = []): Transformation - { + public function build( + ?string $transformationName = null, + array $transformationParameters = [] + ): Transformation { if (null === $transformationName) { return new Transformation(null, array_map(strval(...), $transformationParameters)); } diff --git a/code_samples/back_office/images/src/SvgController.php b/code_samples/back_office/images/src/SvgController.php index 3d44e5b33b..38b8076447 100644 --- a/code_samples/back_office/images/src/SvgController.php +++ b/code_samples/back_office/images/src/SvgController.php @@ -5,6 +5,8 @@ namespace App\Controller; use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; +use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\Helper\TranslationHelper; use Ibexa\Core\IO\IOServiceInterface; @@ -22,12 +24,11 @@ public function __construct( private readonly ContentService $contentService, private readonly IOServiceInterface $ioService, private readonly TranslationHelper $translationHelper - ) { - } + ) {} /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws NotFoundException + * @throws UnauthorizedException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function downloadSvgAction( diff --git a/code_samples/back_office/images/src/SvgExtension.php b/code_samples/back_office/images/src/SvgExtension.php index 351661e476..b89140786b 100644 --- a/code_samples/back_office/images/src/SvgExtension.php +++ b/code_samples/back_office/images/src/SvgExtension.php @@ -12,13 +12,14 @@ class SvgExtension /** * SvgExtension constructor. */ - public function __construct(protected RouterInterface $router) - { - } + public function __construct(protected RouterInterface $router) {} #[AsTwigFunction(name: 'ibexa_svg_link')] - public function generateLink(int $contentId, string $fieldIdentifier, string $filename): string - { + public function generateLink( + int $contentId, + string $fieldIdentifier, + string $filename + ): string { return $this->router->generate('app.svg_download', [ 'contentId' => $contentId, 'fieldIdentifier' => $fieldIdentifier, diff --git a/code_samples/back_office/limitation/src/Controller/CustomLimitationController.php b/code_samples/back_office/limitation/src/Controller/CustomLimitationController.php index 1e4895d117..c3f97fd67b 100644 --- a/code_samples/back_office/limitation/src/Controller/CustomLimitationController.php +++ b/code_samples/back_office/limitation/src/Controller/CustomLimitationController.php @@ -17,8 +17,7 @@ public function __construct( // ..., private readonly PermissionResolver $permissionResolver, private readonly PermissionCheckerInterface $permissionChecker - ) { - } + ) {} // Controller actions... #[Route( diff --git a/code_samples/back_office/limitation/src/Kernel.php b/code_samples/back_office/limitation/src/Kernel.php index 954b6c2b9c..43dc3f5632 100644 --- a/code_samples/back_office/limitation/src/Kernel.php +++ b/code_samples/back_office/limitation/src/Kernel.php @@ -6,6 +6,7 @@ use App\Security\FormPolicyProvider; use App\Security\MyPolicyProvider; +use Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Kernel as BaseKernel; @@ -17,7 +18,7 @@ class Kernel extends BaseKernel protected function build(ContainerBuilder $container): void { // Retrieve "ibexa" container extension - /** @var \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension $ibexaExtension */ + /** @var IbexaCoreExtension $ibexaExtension */ $ibexaExtension = $container->getExtension('ibexa'); // Add the policy provider, you can register multiple providers by calling the method repeatedly diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php index cbdc39f4eb..1b9efd5c75 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php @@ -20,11 +20,14 @@ public function __construct( private readonly PermissionResolver $permissionResolver, private readonly ContentService $contentService, private readonly FormSubmissionGateway $gateway, - ) { - } - - public function create(ContentInfo $content, string $languageCode, Form $form, array $data): FormSubmission - { + ) {} + + public function create( + ContentInfo $content, + string $languageCode, + Form $form, + array $data + ): FormSubmission { return $this->innerService->create($content, $languageCode, $form, $data); } @@ -63,8 +66,12 @@ public function delete(FormSubmission $submission): void $this->innerService->delete($submission); } - public function loadByContent(ContentInfo $content, ?string $languageCode = null, int $offset = 0, int $limit = 25): FormSubmissionList - { + public function loadByContent( + ContentInfo $content, + ?string $languageCode = null, + int $offset = 0, + int $limit = 25 + ): FormSubmissionList { if (!$this->permissionResolver->canUser('form', 'read_submissions', $content)) { throw new UnauthorizedException('form', 'read_submissions', ['contentId' => $content->getId()]); } @@ -72,8 +79,10 @@ public function loadByContent(ContentInfo $content, ?string $languageCode = null return $this->innerService->loadByContent($content, $languageCode, $offset, $limit); } - public function loadAllByContentForExport(ContentInfo $content, ?string $languageCode = null): array - { + public function loadAllByContentForExport( + ContentInfo $content, + ?string $languageCode = null + ): array { if (!$this->permissionResolver->canUser('form', 'read_submissions', $content)) { throw new UnauthorizedException('form', 'read_submissions', ['contentId' => $content->getId()]); } @@ -81,8 +90,10 @@ public function loadAllByContentForExport(ContentInfo $content, ?string $languag return $this->innerService->loadAllByContentForExport($content, $languageCode); } - public function loadHeaders(ContentInfo $content, ?string $languageCode = null): array - { + public function loadHeaders( + ContentInfo $content, + ?string $languageCode = null + ): array { if (!$this->permissionResolver->canUser('form', 'read_submissions', $content)) { throw new UnauthorizedException('form', 'read_submissions', ['contentId' => $content->getId()]); } @@ -90,8 +101,10 @@ public function loadHeaders(ContentInfo $content, ?string $languageCode = null): return $this->innerService->loadHeaders($content, $languageCode); } - public function getCount(ContentInfo $content, ?string $languageCode = null): int - { + public function getCount( + ContentInfo $content, + ?string $languageCode = null + ): int { if (!$this->permissionResolver->canUser('form', 'read_submissions', $content)) { throw new UnauthorizedException('form', 'read_submissions', ['contentId' => $content->getId()]); } diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index 493df39e9b..1145ce3e01 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -8,6 +8,7 @@ use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\LanguageService; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Contracts\FormBuilder\FormSubmission\FormSubmissionServiceInterface; use Ibexa\FormBuilder\FieldType\FormFactory; @@ -64,7 +65,7 @@ public function renderView(array $parameters): string #[\Override] public function evaluate(array $parameters): bool { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ + /** @var Content $content */ $content = $parameters['content']; return $this->innerTab->evaluate($parameters) && diff --git a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php index cb31e87500..c2b013d1de 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference; +use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\ValidationError; @@ -52,12 +53,16 @@ public function buildValue(array $limitationValues): CustomLimitationValue } /** - * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject[]|null $targets + * @param ValueObject[]|null $targets * * @return bool|null */ - public function evaluate(Limitation $value, UserReference $currentUser, object $object, ?array $targets = null): ?bool - { + public function evaluate( + Limitation $value, + UserReference $currentUser, + object $object, + ?array $targets = null + ): ?bool { if (!$value instanceof CustomLimitationValue) { throw new InvalidArgumentException('$value', 'Must be of type: CustomLimitationValue'); } @@ -70,8 +75,10 @@ public function evaluate(Limitation $value, UserReference $currentUser, object $ return Type::ACCESS_DENIED; } - public function getCriterion(Limitation $value, UserReference $currentUser): CriterionInterface - { + public function getCriterion( + Limitation $value, + UserReference $currentUser + ): CriterionInterface { throw new NotImplementedException(__METHOD__); } diff --git a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php index 49e03c0c1e..30e01f6317 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php @@ -12,8 +12,10 @@ class CustomLimitationFormMapper implements LimitationFormMapperInterface { - public function mapLimitationForm(FormInterface $form, Limitation $data): void - { + public function mapLimitationForm( + FormInterface $form, + Limitation $data + ): void { $form->add('limitationValues', CheckboxType::class, [ 'label' => LimitationIdentifierToLabelConverter::convert($data->getIdentifier()), 'required' => false, @@ -27,7 +29,5 @@ public function getFormTemplate(): string return '@ibexadesign/limitation/custom_limitation_form.html.twig'; } - public function filterLimitationValues(Limitation $limitation): void - { - } + public function filterLimitationValues(Limitation $limitation): void {} } diff --git a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php index dd07d01498..0fc3d7ca49 100644 --- a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php +++ b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php @@ -16,8 +16,7 @@ class AllContentListController extends Controller public function __construct( private readonly SearchService $searchService, private readonly FormFactory $formFactory - ) { - } + ) {} public function listAction(int $page = 1): Response { diff --git a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php index 7a97326ba6..01e374efef 100644 --- a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php +++ b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php @@ -11,8 +11,7 @@ { public function __construct( private bool $kernelDebug - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php index c1447f80ba..8a153f58f5 100644 --- a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php +++ b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php @@ -9,9 +9,7 @@ final readonly class ContentPublishEventListener implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) - { - } + public function __construct(private NotificationService $notificationService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/Notification/ListRenderer.php b/code_samples/back_office/notifications/src/Notification/ListRenderer.php index 4c7153a582..dfd097be61 100644 --- a/code_samples/back_office/notifications/src/Notification/ListRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/ListRenderer.php @@ -13,9 +13,11 @@ class ListRenderer implements NotificationRenderer, TypedNotificationRendererInterface { - public function __construct(protected Environment $twig, protected RouterInterface $router, protected RequestStack $requestStack) - { - } + public function __construct( + protected Environment $twig, + protected RouterInterface $router, + protected RequestStack $requestStack + ) {} public function render(Notification $notification): string { diff --git a/code_samples/back_office/notifications/src/Notification/MyRenderer.php b/code_samples/back_office/notifications/src/Notification/MyRenderer.php index 0c2d38ccd4..5abe1a38e8 100644 --- a/code_samples/back_office/notifications/src/Notification/MyRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/MyRenderer.php @@ -15,8 +15,7 @@ class MyRenderer implements NotificationRenderer, TypedNotificationRendererInter public function __construct( protected Environment $twig, protected RouterInterface $router - ) { - } + ) {} public function render(Notification $notification): string { diff --git a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php index 924e92ea45..6f052c3a60 100644 --- a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php +++ b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php @@ -13,11 +13,9 @@ class RichTextBlockSubscriber implements EventSubscriberInterface { /** - * @param \Ibexa\FieldTypeRichText\RichText\DOMDocumentFactory $domDocumentFactory + * @param DOMDocumentFactory $domDocumentFactory */ - public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) - { - } + public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) {} /** * {@inheritdoc} @@ -30,7 +28,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent $event + * @param PreRenderEvent $event */ public function onBlockPreRender(PreRenderEvent $event): void { diff --git a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php index 78ae51c261..edeb298b81 100644 --- a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php +++ b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php @@ -13,9 +13,7 @@ final readonly class NotificationScenarioSubscriber implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) - { - } + public function __construct(private NotificationService $notificationService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php index 05fe585da8..22c68d56cc 100644 --- a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php +++ b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php @@ -7,6 +7,8 @@ use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; use Ibexa\Contracts\Search\Event\BuildSuggestionCollectionEvent; +use Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion; +use Ibexa\ProductCatalog\Local\Repository\Values\Product; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -15,9 +17,7 @@ class MySuggestionEventSubscriber implements EventSubscriberInterface, LoggerAwa { use LoggerAwareTrait; - public function __construct(private ProductServiceInterface $productService) - { - } + public function __construct(private ProductServiceInterface $productService) {} public static function getSubscribedEvents(): array { @@ -46,13 +46,13 @@ public function onBuildSuggestionCollectionEvent(BuildSuggestionCollectionEvent if ($searchResult->getTotalCount()) { $maxScore = 0.0; $suggestionsByContentIds = []; - /** @var \Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion $suggestion */ + /** @var ContentSuggestion $suggestion */ foreach ($suggestionCollection as $suggestion) { $maxScore = max($suggestion->getScore(), $maxScore); $suggestionsByContentIds[$suggestion->getContent()->id] = $suggestion; } - /** @var \Ibexa\ProductCatalog\Local\Repository\Values\Product $product */ + /** @var Product $product */ foreach ($searchResult as $product) { $contentId = $product->getContent()->id; if (array_key_exists($contentId, $suggestionsByContentIds)) { diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php index adde49a43e..89ffb7d420 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php @@ -2,6 +2,7 @@ use DateTimeImmutable; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; +use Ibexa\Contracts\ProductCatalog\ProductServiceInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalogDateTimeAttribute\Search\Criterion\DateTimeAttribute; @@ -9,5 +10,5 @@ $filter = new DateTimeAttribute('event_date', new DateTimeImmutable('2025-07-06')); $filter->setOperator(FieldValueCriterion::COMPARISON_EQ); $query->setFilter($filter); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php index f8016aa377..c91b9863b6 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php @@ -1,10 +1,11 @@ setFilter(new DateTimeAttributeRange('event_date', new DateTimeImmutable('2025-01-01'))); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php index d050f96bed..a4dad8ae90 100644 --- a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php +++ b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php @@ -1,12 +1,13 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php index 2c449d97b8..046d20f568 100644 --- a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php +++ b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php @@ -1,9 +1,10 @@ setFilter(new SymbolAttribute('ean', ['5023920187205'])); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php index e30aeecc40..fdf241ebf1 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php @@ -1,6 +1,7 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php index 49c5461ecb..dc8435f80b 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php @@ -1,6 +1,7 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php index 8291280647..7dd644361e 100644 --- a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php +++ b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php @@ -16,9 +16,12 @@ class ProductSuggestionNormalizer implements /** * @return array */ - public function normalize($object, ?string $format = null, array $context = []): array - { - /** @var \App\Search\Model\Suggestion\ProductSuggestion $object */ + public function normalize( + $object, + ?string $format = null, + array $context = [] + ): array { + /** @var ProductSuggestion $object */ return [ 'type' => 'product', 'name' => $object->getName(), @@ -28,8 +31,11 @@ public function normalize($object, ?string $format = null, array $context = []): ]; } - public function supportsNormalization($data, ?string $format = null, array $context = []): bool - { + public function supportsNormalization( + $data, + ?string $format = null, + array $context = [] + ): bool { return $data instanceof ProductSuggestion; } diff --git a/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php b/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php index ab8575dfea..47c410be8b 100644 --- a/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php +++ b/code_samples/back_office/search/src/Search/SortingDefinition/Provider/SectionNameSortingDefinitionProvider.php @@ -12,9 +12,7 @@ final readonly class SectionNameSortingDefinitionProvider implements SortingDefinitionProviderInterface, TranslationContainerInterface { - public function __construct(private TranslatorInterface $translator) - { - } + public function __construct(private TranslatorInterface $translator) {} public function getSortingDefinitions(): array { diff --git a/code_samples/back_office/settings/src/Setting/Unit.php b/code_samples/back_office/settings/src/Setting/Unit.php index dd524ccf85..8dd82ea7ad 100644 --- a/code_samples/back_office/settings/src/Setting/Unit.php +++ b/code_samples/back_office/settings/src/Setting/Unit.php @@ -40,8 +40,10 @@ public function getDefaultValue(): string return 'metric'; } - public function mapFieldForm(FormBuilderInterface $formBuilder, ValueDefinitionInterface $value): FormBuilderInterface - { + public function mapFieldForm( + FormBuilderInterface $formBuilder, + ValueDefinitionInterface $value + ): FormBuilderInterface { $choices = [ 'Metric' => self::METRIC_OPTION, 'Imperial' => self::IMPERIAL_OPTION, diff --git a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php index a9e7b350b7..70beaca623 100644 --- a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php +++ b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php @@ -11,12 +11,13 @@ final readonly class StaticThumbnailStrategy implements ThumbnailStrategy { - public function __construct(private string $staticThumbnail) - { - } + public function __construct(private string $staticThumbnail) {} - public function getThumbnail(ContentType $contentType, array $fields, ?VersionInfo $versionInfo = null): Thumbnail - { + public function getThumbnail( + ContentType $contentType, + array $fields, + ?VersionInfo $versionInfo = null + ): Thumbnail { return new Thumbnail([ 'resource' => $this->staticThumbnail, ]); diff --git a/code_samples/cache/http_cache/src/response_tagging.php b/code_samples/cache/http_cache/src/response_tagging.php index c8c8fe2e64..b4c8ae877c 100644 --- a/code_samples/cache/http_cache/src/response_tagging.php +++ b/code_samples/cache/http_cache/src/response_tagging.php @@ -1,11 +1,16 @@ tag($view); // When working with a view -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ +/** @var Content $content */ $responseTagger->tag($content->getContentInfo()); // When working with a content item -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ +/** @var Location $location */ $responseTagger->tag($location); // When working with a location diff --git a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentAttributeOptionsType.php b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentAttributeOptionsType.php index 558f3d6743..68deb4c249 100644 --- a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentAttributeOptionsType.php +++ b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentAttributeOptionsType.php @@ -11,8 +11,10 @@ final class PercentAttributeOptionsType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('min', PercentType::class, [ 'disabled' => $options['translation_mode'], 'label' => 'Minimum Value', diff --git a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentOptionsFormMapper.php b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentOptionsFormMapper.php index 0f55a2580c..210cfbec35 100644 --- a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentOptionsFormMapper.php +++ b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentOptionsFormMapper.php @@ -10,8 +10,11 @@ final class PercentOptionsFormMapper implements OptionsFormMapperInterface { - public function createOptionsForm(string $name, FormBuilderInterface $builder, array $context = []): void - { + public function createOptionsForm( + string $name, + FormBuilderInterface $builder, + array $context = [] + ): void { $builder->add($name, PercentAttributeOptionsType::class, [ 'constraints' => [ new AttributeDefinitionOptions($context['type']), diff --git a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueFormatter.php b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueFormatter.php index b15ffd5f5a..19d245dbd1 100644 --- a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueFormatter.php +++ b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueFormatter.php @@ -10,8 +10,10 @@ final class PercentValueFormatter implements ValueFormatterInterface { - public function formatValue(AttributeInterface $attribute, array $parameters = []): ?string - { + public function formatValue( + AttributeInterface $attribute, + array $parameters = [] + ): ?string { $value = $attribute->getValue(); if ($value === null) { return null; diff --git a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueValidator.php b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueValidator.php index ad784b0033..835da43366 100644 --- a/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueValidator.php +++ b/code_samples/catalog/custom_attribute_type/src/Attribute/Percent/PercentValueValidator.php @@ -10,8 +10,10 @@ final class PercentValueValidator implements ValueValidatorInterface { - public function validateValue(AttributeDefinitionInterface $attributeDefinition, $value): iterable - { + public function validateValue( + AttributeDefinitionInterface $attributeDefinition, + $value + ): iterable { if ($value === null) { return []; } diff --git a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php index 21c36d85b0..51d10d4b0e 100644 --- a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php +++ b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php @@ -11,9 +11,7 @@ final class ProductNameFilterFormMapper implements FilterFormMapperInterface { - public function __construct() - { - } + public function __construct() {} public function createFilterForm( FilterDefinitionInterface $filterDefinition, diff --git a/code_samples/catalog/percent_name_schema_strategy/NameSchema/PercentNameSchemaStrategy.php b/code_samples/catalog/percent_name_schema_strategy/NameSchema/PercentNameSchemaStrategy.php index d567d474d3..958c0426d0 100644 --- a/code_samples/catalog/percent_name_schema_strategy/NameSchema/PercentNameSchemaStrategy.php +++ b/code_samples/catalog/percent_name_schema_strategy/NameSchema/PercentNameSchemaStrategy.php @@ -7,13 +7,18 @@ final class PercentNameSchemaStrategy implements NameSchemaStrategyInterface { - public function resolve(AttributeDefinitionInterface $attributeDefinition, $value, string $languageCode): string - { + public function resolve( + AttributeDefinitionInterface $attributeDefinition, + $value, + string $languageCode + ): string { return ($value * 100) . '%'; } - public function supports(AttributeDefinitionInterface $attributeDefinition, $value): bool - { + public function supports( + AttributeDefinitionInterface $attributeDefinition, + $value + ): bool { return $attributeDefinition->getType()->getIdentifier() === 'percent'; } } diff --git a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php index e4b3f1d664..e5edf08092 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php @@ -16,8 +16,7 @@ public function __construct( private CartResolverInterface $innerCartResolver, private SessionServiceInterface $sessionService, private RequestStack $requestStack - ) { - } + ) {} public function resolveCart(?User $user = null): CartInterface { @@ -40,7 +39,7 @@ private function getSharedCart(): ?CartInterface } return $session->getCart(); - } catch (NotFoundException|UnauthorizedException) { + } catch (NotFoundException | UnauthorizedException) { return null; } } diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php index 8e719eba26..dd8e7000c8 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php @@ -14,8 +14,7 @@ public function __construct( private Repository $repository, private CartServiceInterface $cartService, private ProxyGeneratorInterface $proxyGenerator - ) { - } + ) {} public function createCartProxy(string $identifier): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php index 8f8a51ddb1..ab1dea1603 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php @@ -20,8 +20,7 @@ public function __construct( private CartProxyMapperInterface $cartProxyMapper, private UserProxyDomainMapperInterface $userDomainMapper, private ParticipantCollectionDomainMapperInterface $participantCollectionDomainMapper - ) { - } + ) {} /** * @param \App\Collaboration\Cart\Persistence\Values\CartSession $data diff --git a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php index 8aba2621ec..37528daa7f 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php @@ -22,8 +22,7 @@ public function __construct( private readonly PermissionResolverInterface $innerPermissionResolver, private readonly SessionServiceInterface $sessionService, private readonly RequestStack $requestStack, - ) { - } + ) {} public function canUser(PolicyInterface $policy): bool { @@ -59,7 +58,7 @@ private function isSharedCart(?CartInterface $cart): bool try { $this->nested = true; - /** @var \App\Collaboration\Cart\CartSession $session */ + /** @var CartSession $session */ $session = $this->getCurrentCartCollaborationSession(); if ($session !== null) { try { @@ -86,7 +85,7 @@ private function getCurrentCartCollaborationSession(): ?CartSession if ($session instanceof CartSession) { return $session; } - } catch (NotFoundException|UnauthorizedException) { + } catch (NotFoundException | UnauthorizedException) { } return null; diff --git a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php index 8ecca9a74b..e9019391d8 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php @@ -2,6 +2,7 @@ namespace App\Collaboration\Cart\Persistence\Gateway; +use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct as CreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionUpdateStruct as UpdateStruct; use Doctrine\DBAL\Types\Types; @@ -51,10 +52,12 @@ public function getDiscriminator(): string } /** - * @param \App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct $createStruct + * @param CartSessionCreateStruct $createStruct */ - public function create(int $sessionId, AbstractSessionCreateStruct $createStruct): void - { + public function create( + int $sessionId, + AbstractSessionCreateStruct $createStruct + ): void { $this->doInsert([ DatabaseSchema::COLUMN_ID => $sessionId, DatabaseSchema::COLUMN_CART_IDENTIFIER => $createStruct->getCartIdentifier(), @@ -62,7 +65,7 @@ public function create(int $sessionId, AbstractSessionCreateStruct $createStruct } /** - * @param \Ibexa\Collaboration\Persistence\Values\AbstractSessionUpdateStruct $updateStruct + * @param AbstractSessionUpdateStruct $updateStruct */ public function update(AbstractSessionUpdateStruct $updateStruct): void { diff --git a/code_samples/collaboration/src/Command/ManageSessionsCommand.php b/code_samples/collaboration/src/Command/ManageSessionsCommand.php index e50ac51333..ae2590dfdb 100644 --- a/code_samples/collaboration/src/Command/ManageSessionsCommand.php +++ b/code_samples/collaboration/src/Command/ManageSessionsCommand.php @@ -38,8 +38,10 @@ public function __construct( parent::__construct(); } - public function execute(InputInterface $input, OutputInterface $output): int - { + public function execute( + InputInterface $input, + OutputInterface $output + ): int { $this->permissionResolver->setCurrentUserReference( $this->userService->loadUserByLogin('admin') ); diff --git a/code_samples/collaboration/src/Controller/ShareCartCreateController.php b/code_samples/collaboration/src/Controller/ShareCartCreateController.php index b0b612eba4..85f4939e49 100644 --- a/code_samples/collaboration/src/Controller/ShareCartCreateController.php +++ b/code_samples/collaboration/src/Controller/ShareCartCreateController.php @@ -4,6 +4,7 @@ use App\Collaboration\Cart\CartSessionCreateStruct; use App\Collaboration\Cart\CartSessionType; +use App\Form\Data\ShareCartData; use App\Form\Type\ShareCartType; use Ibexa\Contracts\Cart\CartResolverInterface; use Ibexa\Contracts\Collaboration\Participant\ExternalParticipantCreateStruct; @@ -22,8 +23,7 @@ final class ShareCartCreateController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, private readonly CartResolverInterface $cartResolver - ) { - } + ) {} public function __invoke(Request $request): Response { @@ -37,7 +37,7 @@ public function __invoke(Request $request): Response $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - /** @var \App\Form\Data\ShareCartData $data */ + /** @var ShareCartData $data */ $data = $form->getData(); // Handle the form submission diff --git a/code_samples/collaboration/src/Controller/ShareCartJoinController.php b/code_samples/collaboration/src/Controller/ShareCartJoinController.php index 4c9ecc209b..1580b27deb 100644 --- a/code_samples/collaboration/src/Controller/ShareCartJoinController.php +++ b/code_samples/collaboration/src/Controller/ShareCartJoinController.php @@ -18,11 +18,12 @@ final class ShareCartJoinController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, - ) { - } + ) {} - public function __invoke(Request $request, string $token): RedirectResponse - { + public function __invoke( + Request $request, + string $token + ): RedirectResponse { $session = $this->sessionService->getSessionByToken($token); if ($session instanceof CartSession) { $request->getSession()->set(self::CURRENT_COLLABORATION_SESSION, $session->getToken()); diff --git a/code_samples/collaboration/src/Form/Data/ShareCartData.php b/code_samples/collaboration/src/Form/Data/ShareCartData.php index 37c2e0cc2c..38391c76e4 100644 --- a/code_samples/collaboration/src/Form/Data/ShareCartData.php +++ b/code_samples/collaboration/src/Form/Data/ShareCartData.php @@ -6,8 +6,7 @@ final class ShareCartData { public function __construct( private ?string $email = null - ) { - } + ) {} public function getEmail(): ?string { diff --git a/code_samples/collaboration/src/Form/Type/ShareCartType.php b/code_samples/collaboration/src/Form/Type/ShareCartType.php index 86f2369bcb..2fe7844af5 100644 --- a/code_samples/collaboration/src/Form/Type/ShareCartType.php +++ b/code_samples/collaboration/src/Form/Type/ShareCartType.php @@ -14,8 +14,10 @@ */ final class ShareCartType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('email', EmailType::class, [ 'label' => 'E-mail', ])->add('submit', SubmitType::class, [ diff --git a/code_samples/collaboration/src/Query/Search.php b/code_samples/collaboration/src/Query/Search.php index b4f7dfbabc..8592b7430b 100644 --- a/code_samples/collaboration/src/Query/Search.php +++ b/code_samples/collaboration/src/Query/Search.php @@ -3,6 +3,7 @@ use Ibexa\Contracts\Collaboration\Session\Query\Criterion; use Ibexa\Contracts\Collaboration\Session\Query\SortClause; use Ibexa\Contracts\Collaboration\Session\SessionQuery; +use Ibexa\Contracts\Collaboration\SessionServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; use Ibexa\Contracts\CoreSearch\Values\Query\SortClause\FieldValueSortClause; @@ -17,5 +18,5 @@ new SortClause\CreatedAt(FieldValueSortClause::SORT_DESC), ] ); -/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */ +/** @var SessionServiceInterface $sessionService */ $sessionList = $sessionService->findSessions($query); diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php index a3aa625019..9412f88b68 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php @@ -21,7 +21,7 @@ public function __construct( } /** - * @param \Ibexa\CorporateAccount\View\ApplicationDetailsView $view + * @param ApplicationDetailsView $view */ protected function configureView(View $view): void { diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php index 54a85470e1..ff4a2d7243 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php @@ -23,8 +23,7 @@ public function __construct( private FormFactoryInterface $formFactory, private HandlerInterface $applicationStateHandler, private TranslatableNotificationHandlerInterface $notificationHandler - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSection.php b/code_samples/data_migration/src/Migrations/Action/AssignSection.php index 876c51491a..d809fced4e 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSection.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSection.php @@ -10,9 +10,7 @@ { public const string TYPE = 'assign_section'; - public function __construct(private string $sectionIdentifier) - { - } + public function __construct(private string $sectionIdentifier) {} /** * @return string diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSectionDenormalizer.php b/code_samples/data_migration/src/Migrations/Action/AssignSectionDenormalizer.php index 96f067a99e..d82b718a4f 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSectionDenormalizer.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSectionDenormalizer.php @@ -9,8 +9,10 @@ final class AssignSectionDenormalizer extends AbstractActionDenormalizer { - protected function supportsActionName(string $actionName, ?string $format = null): bool - { + protected function supportsActionName( + string $actionName, + ?string $format = null + ): bool { return $actionName === AssignSection::TYPE; } @@ -20,10 +22,14 @@ protected function supportsActionName(string $actionName, ?string $format = null * @param string|null $format * @param array $context * - * @return \App\Migrations\Action\AssignSection + * @return AssignSection */ - public function denormalize($data, string $type, ?string $format = null, array $context = []): AssignSection - { + public function denormalize( + $data, + string $type, + ?string $format = null, + array $context = [] + ): AssignSection { Assert::keyExists($data, 'value'); return new AssignSection($data['value']); diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php index 258f3f0d5d..1dcb4e7a1e 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php @@ -4,6 +4,7 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\SectionService; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\ValueObject as APIValueObject; use Ibexa\Migration\StepExecutor\ActionExecutor\ExecutorInterface; use Ibexa\Migration\ValueObject; @@ -13,15 +14,16 @@ public function __construct( private ContentService $contentService, private SectionService $sectionService - ) { - } + ) {} /** - * @param \App\Migrations\Action\AssignSection $action - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content + * @param AssignSection $action + * @param Content $content */ - public function handle(ValueObject\Step\Action $action, APIValueObject $content): void - { + public function handle( + ValueObject\Step\Action $action, + APIValueObject $content + ): void { $contentInfo = $this->contentService->loadContentInfo($content->id); $section = $this->sectionService->loadSectionByIdentifier($action->getValue()); $this->sectionService->assignSection($contentInfo, $section); diff --git a/code_samples/data_migration/src/Migrations/Matcher/SectionIdentifierNormalizer.php b/code_samples/data_migration/src/Migrations/Matcher/SectionIdentifierNormalizer.php index a184db52d9..0bbe990d23 100644 --- a/code_samples/data_migration/src/Migrations/Matcher/SectionIdentifierNormalizer.php +++ b/code_samples/data_migration/src/Migrations/Matcher/SectionIdentifierNormalizer.php @@ -18,15 +18,22 @@ public function __construct() * @param array $data * @param array $context */ - protected function createCriterion(array $data, string $type, ?string $format, array $context): FilteringCriterion - { + protected function createCriterion( + array $data, + string $type, + ?string $format, + array $context + ): FilteringCriterion { Assert::keyExists($data, 'value'); return new Criterion\SectionIdentifier($data['value']); } - public function supportsNormalization($data, ?string $format = null, array $context = []): bool - { + public function supportsNormalization( + $data, + ?string $format = null, + array $context = [] + ): bool { return $data instanceof Criterion\SectionIdentifier; } } diff --git a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php index 394e3dfd01..6d42605ca4 100644 --- a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php +++ b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php @@ -12,9 +12,7 @@ final class ReplaceNameStepExecutor extends AbstractStepExecutor { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} protected function doHandle(StepInterface $step) { diff --git a/code_samples/discounts/src/Command/ManageDiscountsCommand.php b/code_samples/discounts/src/Command/ManageDiscountsCommand.php index 88755ae611..b3ba31eeb8 100644 --- a/code_samples/discounts/src/Command/ManageDiscountsCommand.php +++ b/code_samples/discounts/src/Command/ManageDiscountsCommand.php @@ -19,11 +19,12 @@ use Ibexa\Discounts\Value\DiscountCondition\IsProductInArray; use Ibexa\Discounts\Value\DiscountRule\FixedAmount; use Ibexa\DiscountsCodes\Value\DiscountCondition\IsValidDiscountCode; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -#[\Symfony\Component\Console\Attribute\AsCommand(name: 'discounts:manage')] +#[AsCommand(name: 'discounts:manage')] final class ManageDiscountsCommand extends Command { public function __construct( @@ -35,8 +36,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $this->permissionResolver->setCurrentUserReference( $this->userService->loadUserByLogin('admin') ); diff --git a/code_samples/discounts/src/Command/OrderPriceCommand.php b/code_samples/discounts/src/Command/OrderPriceCommand.php index 748a886c46..56c96a64df 100644 --- a/code_samples/discounts/src/Command/OrderPriceCommand.php +++ b/code_samples/discounts/src/Command/OrderPriceCommand.php @@ -16,11 +16,12 @@ use Ibexa\OrderManagement\Discounts\Value\DiscountsData; use Ibexa\ProductCatalog\Money\IntlMoneyFactory; use Money\Money; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -#[\Symfony\Component\Console\Attribute\AsCommand(name: 'app:discounts:prices')] +#[AsCommand(name: 'app:discounts:prices')] final class OrderPriceCommand extends Command { public function __construct( @@ -36,8 +37,10 @@ public function __construct( parent::__construct(); } - public function execute(InputInterface $input, OutputInterface $output): int - { + public function execute( + InputInterface $input, + OutputInterface $output + ): int { $this->permissionResolver->setCurrentUserReference($this->userService->loadUserByLogin('admin')); $productCode = 'product_code_control_unit_0'; @@ -59,7 +62,7 @@ public function execute(InputInterface $input, OutputInterface $output): int $output->writeln(sprintf('Discounted price: %s', $this->formatPrice($resolvedPrice->getMoney()))); if ($resolvedPrice instanceof PriceEnvelopeInterface) { - /** @var \Ibexa\Discounts\Value\Price\Stamp\DiscountStamp $discountStamp */ + /** @var DiscountStamp $discountStamp */ foreach ($resolvedPrice->all(DiscountStamp::class) as $discountStamp) { $output->writeln( sprintf( diff --git a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php index 50f494b138..cddfb2767e 100644 --- a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php +++ b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php @@ -9,9 +9,10 @@ final readonly class CurrentUserRegistrationDateResolver implements DiscountVariablesResolverInterface { - public function __construct(private PermissionResolver $permissionResolver, private UserService $userService) - { - } + public function __construct( + private PermissionResolver $permissionResolver, + private UserService $userService + ) {} /** * @return array{current_user_registration_date: \DateTimeInterface} diff --git a/code_samples/discounts/src/Discounts/ExpressionProvider/IsAnniversaryResolver.php b/code_samples/discounts/src/Discounts/ExpressionProvider/IsAnniversaryResolver.php index 1b7449da30..c4d88c6fb2 100644 --- a/code_samples/discounts/src/Discounts/ExpressionProvider/IsAnniversaryResolver.php +++ b/code_samples/discounts/src/Discounts/ExpressionProvider/IsAnniversaryResolver.php @@ -13,8 +13,10 @@ final class IsAnniversaryResolver private const int REFERENCE_YEAR = 2000; - public function __invoke(DateTimeInterface $date, int $tolerance = 0): bool - { + public function __invoke( + DateTimeInterface $date, + int $tolerance = 0 + ): bool { $d1 = $this->unifyYear(new DateTimeImmutable()); $d2 = $this->unifyYear($date); diff --git a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php index 7805cfab00..392f75d6f6 100644 --- a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php +++ b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php @@ -7,9 +7,7 @@ final readonly class RecentDiscountPrioritizationStrategy implements DiscountPrioritizationStrategyInterface { - public function __construct(private DiscountPrioritizationStrategyInterface $inner) - { - } + public function __construct(private DiscountPrioritizationStrategyInterface $inner) {} public function getOrder(): array { diff --git a/code_samples/discounts/src/Discounts/Rule/PurchaseParityValueFormatter.php b/code_samples/discounts/src/Discounts/Rule/PurchaseParityValueFormatter.php index b569b187cb..395b87085c 100644 --- a/code_samples/discounts/src/Discounts/Rule/PurchaseParityValueFormatter.php +++ b/code_samples/discounts/src/Discounts/Rule/PurchaseParityValueFormatter.php @@ -10,8 +10,10 @@ final class PurchaseParityValueFormatter implements DiscountValueFormatterInterface { - public function format(DiscountRuleInterface $discountRule, ?Money $money = null): string - { + public function format( + DiscountRuleInterface $discountRule, + ?Money $money = null + ): string { return 'Regional discount'; } } diff --git a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php index edc687fef9..558f14bf90 100644 --- a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php +++ b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php @@ -8,7 +8,8 @@ final class AnniversaryConditionStep extends AbstractDiscountStep { public const string IDENTIFIER = 'anniversary_condition_step'; - public function __construct(public bool $enabled = false, public int $tolerance = 0) - { - } + public function __construct( + public bool $enabled = false, + public int $tolerance = 0 + ) {} } diff --git a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php index 801605a7d9..11990b43f6 100644 --- a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php +++ b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStepFormListener.php @@ -17,8 +17,11 @@ public function isDataSupported(DiscountStepData $data): bool return $data->getStepData() instanceof AnniversaryConditionStep; } - public function addFields(FormInterface $form, DiscountStepData $data, PreSetDataEvent $event): void - { + public function addFields( + FormInterface $form, + DiscountStepData $data, + PreSetDataEvent $event + ): void { $form->add( 'stepData', AnniversaryConditionStepType::class, diff --git a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php index 8765383d45..9a4913093f 100644 --- a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event + * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -30,7 +30,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ + /** @var IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php index 8f60118ad1..0b71977079 100644 --- a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event + * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -35,7 +35,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ + /** @var IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityFormMapper.php b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityFormMapper.php index d10db76375..bf876c54d0 100644 --- a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityFormMapper.php +++ b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityFormMapper.php @@ -14,8 +14,10 @@ public function getDiscountRuleTypes(?string $type): array return [PurchasingPowerParityRule::TYPE]; } - public function supports(string $type, string $ruleType): bool - { + public function supports( + string $type, + string $ruleType + ): bool { return $ruleType === PurchasingPowerParityRule::TYPE; } diff --git a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php index 50a51c63e7..d2c460bc1b 100644 --- a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php +++ b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php @@ -13,8 +13,10 @@ final class PurchasingPowerParityValueMapper implements DiscountValueMapperInterface { - public function createFormData(string $type, string $ruleType): DiscountValueInterface - { + public function createFormData( + string $type, + string $ruleType + ): DiscountValueInterface { if ($ruleType !== PurchasingPowerParityRule::TYPE) { throw new LogicException('Not implemented'); } @@ -48,10 +50,12 @@ public function mapUpdateDataToStruct( } /** - * @param \Ibexa\Contracts\Discounts\Value\Struct\DiscountCreateStruct|\Ibexa\Contracts\Discounts\Value\Struct\DiscountUpdateStruct $struct + * @param DiscountCreateStruct|DiscountUpdateStruct $struct */ - private function addRuleToStruct(DiscountValueInterface $data, $struct): void - { + private function addRuleToStruct( + DiscountValueInterface $data, + $struct + ): void { if (!$data instanceof PurchasingPowerParityValue) { throw new LogicException('Not implemented'); } diff --git a/code_samples/discounts/src/Form/Type/AnniversaryConditionStepType.php b/code_samples/discounts/src/Form/Type/AnniversaryConditionStepType.php index 004d1d1a7f..e140e0a151 100644 --- a/code_samples/discounts/src/Form/Type/AnniversaryConditionStepType.php +++ b/code_samples/discounts/src/Form/Type/AnniversaryConditionStepType.php @@ -16,8 +16,10 @@ */ final class AnniversaryConditionStepType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add( 'enabled', CheckboxType::class, diff --git a/code_samples/discounts/src/Form/Type/DiscountValue/PurchasingPowerParityValueType.php b/code_samples/discounts/src/Form/Type/DiscountValue/PurchasingPowerParityValueType.php index d957d5037f..c2a0310550 100644 --- a/code_samples/discounts/src/Form/Type/DiscountValue/PurchasingPowerParityValueType.php +++ b/code_samples/discounts/src/Form/Type/DiscountValue/PurchasingPowerParityValueType.php @@ -21,9 +21,14 @@ */ final class PurchasingPowerParityValueType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { - $availableRegionHandler = static function (FormInterface $form, PurchasingPowerParityValue $data): void { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { + $availableRegionHandler = static function ( + FormInterface $form, + PurchasingPowerParityValue $data + ): void { $regions = $data->getDiscountData()->getGeneralProperties()->getRegions(); $regionNames = implode(', ', array_map(static fn (RegionInterface $region): string => $region->getIdentifier(), $regions)); diff --git a/code_samples/discounts/src/Query/Search.php b/code_samples/discounts/src/Query/Search.php index 9a6af40415..2f0a0f4d49 100644 --- a/code_samples/discounts/src/Query/Search.php +++ b/code_samples/discounts/src/Query/Search.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; +use Ibexa\Contracts\Discounts\DiscountServiceInterface; use Ibexa\Contracts\Discounts\Value\Query\Criterion; use Ibexa\Contracts\Discounts\Value\Query\DiscountQuery; use Ibexa\Contracts\Discounts\Value\Query\SortClause; @@ -25,5 +26,5 @@ ] ); -/** @var \Ibexa\Contracts\Discounts\DiscountServiceInterface $discountService */ +/** @var DiscountServiceInterface $discountService */ $results = $discountService->findDiscounts($query); diff --git a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php index 2219c9ae36..7ea20877dd 100644 --- a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php +++ b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php @@ -30,8 +30,10 @@ public function getSettingsSchema(): array ]; } - public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void - { + public function mapFieldValueForm( + FormInterface $fieldForm, + FieldData $data + ): void { $definition = $data->getFieldDefinition(); $fieldForm->add('value', Point2DType::class, [ 'required' => $definition->isRequired, @@ -39,8 +41,10 @@ public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): vo ]); } - public function mapFieldDefinitionForm(FormInterface $fieldDefinitionForm, FieldDefinitionData $data): void - { + public function mapFieldDefinitionForm( + FormInterface $fieldDefinitionForm, + FieldDefinitionData $data + ): void { $fieldDefinitionForm->add('fieldSettings', Point2DSettingsType::class, [ 'label' => false, ]); diff --git a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php index 894181613d..985549c9d2 100644 --- a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php +++ b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php @@ -13,8 +13,7 @@ public function __construct( private ?float $x = null, #[Assert\NotBlank] private ?float $y = null - ) { - } + ) {} public function getX(): ?float { diff --git a/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DSettingsType.php b/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DSettingsType.php index 75432dcc1e..d39a9084dc 100644 --- a/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DSettingsType.php +++ b/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DSettingsType.php @@ -9,8 +9,10 @@ final class Point2DSettingsType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('format', TextType::class); } } diff --git a/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DType.php b/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DType.php index 1f4227ae7a..e0996ae908 100644 --- a/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DType.php +++ b/code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DType.php @@ -11,8 +11,10 @@ final class Point2DType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('x', NumberType::class); $builder->add('y', NumberType::class); } diff --git a/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueDenormalizer.php b/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueDenormalizer.php index f403748015..f449048fce 100644 --- a/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueDenormalizer.php +++ b/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueDenormalizer.php @@ -8,8 +8,12 @@ final class ValueDenormalizer implements DenormalizerInterface { - public function denormalize($data, string $class, ?string $format = null, array $context = []): mixed - { + public function denormalize( + $data, + string $class, + ?string $format = null, + array $context = [] + ): mixed { if (isset($data['x']) && isset($data['y'])) { // Support for old format $data = [$data['x'], $data['y']]; @@ -18,8 +22,12 @@ public function denormalize($data, string $class, ?string $format = null, array return new $class($data); } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { return $type === Value::class; } diff --git a/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueNormalizer.php b/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueNormalizer.php index bc7fea2b9c..05b4c997df 100644 --- a/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueNormalizer.php +++ b/code_samples/field_types/2dpoint_ft/src/Serializer/Point2D/ValueNormalizer.php @@ -11,16 +11,22 @@ final class ValueNormalizer implements NormalizerInterface /** * @return array */ - public function normalize($object, ?string $format = null, array $context = []): array - { + public function normalize( + $object, + ?string $format = null, + array $context = [] + ): array { return [ $object->getX(), $object->getY(), ]; } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { + public function supportsNormalization( + mixed $data, + ?string $format = null, + array $context = [] + ): bool { return $data instanceof Value; } diff --git a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php index 7b5b193696..cbe2011bd9 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php @@ -10,8 +10,7 @@ final class Value implements ValueInterface public function __construct( private ?float $x = null, private ?float $y = null - ) { - } + ) {} public function getX(): ?float { diff --git a/code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php b/code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php index 1f4227ae7a..e0996ae908 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php @@ -11,8 +11,10 @@ final class Point2DType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('x', NumberType::class); $builder->add('y', NumberType::class); } diff --git a/code_samples/field_types/2dpoint_ft/steps/step_3/Type.php b/code_samples/field_types/2dpoint_ft/steps/step_3/Type.php index 9e0bbc346d..07c6a8f050 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_3/Type.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_3/Type.php @@ -16,8 +16,10 @@ public function getFieldTypeIdentifier(): string return 'point2d'; } - public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void - { + public function mapFieldValueForm( + FormInterface $fieldForm, + FieldData $data + ): void { $definition = $data->getFieldDefinition(); $fieldForm->add('value', Point2DType::class, [ 'required' => $definition->isRequired, diff --git a/code_samples/field_types/2dpoint_ft/steps/step_6/Type.php b/code_samples/field_types/2dpoint_ft/steps/step_6/Type.php index 617411f67e..b42ffd1879 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_6/Type.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_6/Type.php @@ -26,8 +26,10 @@ public function getSettingsSchema(): array ]; } - public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void - { + public function mapFieldValueForm( + FormInterface $fieldForm, + FieldData $data + ): void { $definition = $data->getFieldDefinition(); $fieldForm->add('value', Point2DType::class, [ 'required' => $definition->isRequired, diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php index 60fdf5ca71..9569b98b2e 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php @@ -7,30 +7,33 @@ use Ibexa\Contracts\VersionComparison\Engine\FieldTypeComparisonEngine; use Ibexa\Contracts\VersionComparison\FieldType\FieldTypeComparisonValue; use Ibexa\Contracts\VersionComparison\Result\ComparisonResult; +use Ibexa\VersionComparison\Engine\Value\StringComparisonEngine; final readonly class HelloWorldComparisonEngine implements FieldTypeComparisonEngine { - public function __construct(private \Ibexa\VersionComparison\Engine\Value\StringComparisonEngine $stringValueComparisonEngine) - { - } + public function __construct(private StringComparisonEngine $stringValueComparisonEngine) {} /** - * @param \App\FieldType\HelloWorld\Comparison\Value $comparisonDataA - * @param \App\FieldType\HelloWorld\Comparison\Value $comparisonDataB + * @param Value $comparisonDataA + * @param Value $comparisonDataB */ - public function compareFieldsTypeValues(FieldTypeComparisonValue $comparisonDataA, FieldTypeComparisonValue $comparisonDataB): ComparisonResult - { + public function compareFieldsTypeValues( + FieldTypeComparisonValue $comparisonDataA, + FieldTypeComparisonValue $comparisonDataB + ): ComparisonResult { return new HelloWorldComparisonResult( $this->stringValueComparisonEngine->compareValues($comparisonDataA->name, $comparisonDataB->name) ); } /** - * @param \App\FieldType\HelloWorld\Comparison\Value $comparisonDataA - * @param \App\FieldType\HelloWorld\Comparison\Value $comparisonDataB + * @param Value $comparisonDataA + * @param Value $comparisonDataB */ - public function shouldRunComparison(FieldTypeComparisonValue $comparisonDataA, FieldTypeComparisonValue $comparisonDataB): bool - { + public function shouldRunComparison( + FieldTypeComparisonValue $comparisonDataA, + FieldTypeComparisonValue $comparisonDataB + ): bool { return $comparisonDataA->name->value !== $comparisonDataB->name->value; } } diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php index a8bab2d2f7..a97569385a 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php @@ -9,9 +9,7 @@ final readonly class HelloWorldComparisonResult implements ComparisonResult { - public function __construct(private \Ibexa\VersionComparison\Result\Value\StringComparisonResult $stringDiff) - { - } + public function __construct(private StringComparisonResult $stringDiff) {} public function getHelloWorldDiff(): StringComparisonResult { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php index b820682ec8..85b5b85c6b 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php @@ -5,9 +5,10 @@ namespace App\FieldType\HelloWorld\Comparison; use Ibexa\Contracts\VersionComparison\FieldType\FieldTypeComparisonValue; +use Ibexa\VersionComparison\ComparisonValue\StringComparisonValue; class Value extends FieldTypeComparisonValue { - /** @var \Ibexa\VersionComparison\ComparisonValue\StringComparisonValue */ - public \Ibexa\VersionComparison\ComparisonValue\StringComparisonValue $name; + /** @var StringComparisonValue */ + public StringComparisonValue $name; } diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php index 62e5e121ae..a60a01ff9b 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php @@ -15,8 +15,10 @@ public function getFieldTypeIdentifier(): string return 'hello_world'; } - public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void - { + public function mapFieldValueForm( + FormInterface $fieldForm, + FieldData $data + ): void { $definition = $data->getFieldDefinition(); $fieldForm->add('value', HelloWorldType::class, [ diff --git a/code_samples/field_types/generic_ft/src/Form/Type/HelloWorldType.php b/code_samples/field_types/generic_ft/src/Form/Type/HelloWorldType.php index 6a0cbf5e9b..5e69bd81e1 100644 --- a/code_samples/field_types/generic_ft/src/Form/Type/HelloWorldType.php +++ b/code_samples/field_types/generic_ft/src/Form/Type/HelloWorldType.php @@ -12,8 +12,10 @@ final class HelloWorldType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('name', TextType::class); } diff --git a/code_samples/forms/custom_form_attribute/src/FormBuilder/FieldType/Field/Mapper/CheckboxWithRichtextDescriptionFieldMapper.php b/code_samples/forms/custom_form_attribute/src/FormBuilder/FieldType/Field/Mapper/CheckboxWithRichtextDescriptionFieldMapper.php index 015ee0e76e..735089e3ce 100644 --- a/code_samples/forms/custom_form_attribute/src/FormBuilder/FieldType/Field/Mapper/CheckboxWithRichtextDescriptionFieldMapper.php +++ b/code_samples/forms/custom_form_attribute/src/FormBuilder/FieldType/Field/Mapper/CheckboxWithRichtextDescriptionFieldMapper.php @@ -11,8 +11,10 @@ class CheckboxWithRichtextDescriptionFieldMapper extends GenericFieldMapper * {@inheritdoc} */ #[\Override] - protected function mapFormOptions(Field $field, array $constraints): array - { + protected function mapFormOptions( + Field $field, + array $constraints + ): array { $options = parent::mapFormOptions($field, $constraints); $options['label'] = $field->getAttributeValue('label'); $options['richtext_description'] = $field->getAttributeValue('richtext_description'); diff --git a/code_samples/forms/custom_form_attribute/src/FormBuilder/Form/Type/CheckboxWithRichtextDescriptionType.php b/code_samples/forms/custom_form_attribute/src/FormBuilder/Form/Type/CheckboxWithRichtextDescriptionType.php index a5603b63f6..7a46fd57c5 100644 --- a/code_samples/forms/custom_form_attribute/src/FormBuilder/Form/Type/CheckboxWithRichtextDescriptionType.php +++ b/code_samples/forms/custom_form_attribute/src/FormBuilder/Form/Type/CheckboxWithRichtextDescriptionType.php @@ -36,8 +36,11 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setAllowedTypes('richtext_description', ['null', 'string']); } - public function buildView(FormView $view, FormInterface $form, array $options): void - { + public function buildView( + FormView $view, + FormInterface $form, + array $options + ): void { // pass the Dom object of the richtext doc to the template $dom = new \DOMDocument(); if (!empty($options['richtext_description'])) { diff --git a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php index 30981233db..afd3c1ce24 100644 --- a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php +++ b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php @@ -4,6 +4,4 @@ use Ibexa\FormBuilder\FormSubmission\Converter\BooleanFieldSubmissionConverter; -class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter -{ -} +class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter {} diff --git a/code_samples/forms/custom_form_field/src/FormBuilder/Field/Mapper/CountryFieldMapper.php b/code_samples/forms/custom_form_field/src/FormBuilder/Field/Mapper/CountryFieldMapper.php index 32d4b9774a..80e91b60c7 100644 --- a/code_samples/forms/custom_form_field/src/FormBuilder/Field/Mapper/CountryFieldMapper.php +++ b/code_samples/forms/custom_form_field/src/FormBuilder/Field/Mapper/CountryFieldMapper.php @@ -8,8 +8,10 @@ class CountryFieldMapper extends GenericFieldMapper { #[\Override] - protected function mapFormOptions(Field $field, array $constraints): array - { + protected function mapFormOptions( + Field $field, + array $constraints + ): array { $options = parent::mapFormOptions($field, $constraints); $options['label'] = $field->getAttributeValue('label'); $options['help'] = $field->getAttributeValue('help'); diff --git a/code_samples/front/embed_content/src/Controller/RelationController.php b/code_samples/front/embed_content/src/Controller/RelationController.php index 58dc2d4af7..e30e63e33d 100644 --- a/code_samples/front/embed_content/src/Controller/RelationController.php +++ b/code_samples/front/embed_content/src/Controller/RelationController.php @@ -13,11 +13,12 @@ class RelationController public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService - ) { - } + ) {} - public function showContentAction(View $view, $locationId): View - { + public function showContentAction( + View $view, + $locationId + ): View { $acceptedContentTypes = $view->getParameter('accepted_content_types'); $location = $this->locationService->loadLocation($locationId); diff --git a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php index b82a4feeed..cdc28a5ba2 100644 --- a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php +++ b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php @@ -14,8 +14,7 @@ class BreadcrumbController extends Controller public function __construct( private readonly LocationService $locationService, private readonly SearchService $searchService - ) { - } + ) {} public function showBreadcrumbsAction($locationId): Response { diff --git a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php index 9266372cf2..f320e4cb22 100644 --- a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php +++ b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php @@ -7,9 +7,7 @@ class MenuBuilder { - public function __construct(private readonly FactoryInterface $factory) - { - } + public function __construct(private readonly FactoryInterface $factory) {} public function buildMenu(): ItemInterface { diff --git a/code_samples/front/render_content_in_php/src/Command/ViewCommand.php b/code_samples/front/render_content_in_php/src/Command/ViewCommand.php index 10d0544cf8..7e6439bdeb 100644 --- a/code_samples/front/render_content_in_php/src/Command/ViewCommand.php +++ b/code_samples/front/render_content_in_php/src/Command/ViewCommand.php @@ -31,8 +31,10 @@ protected function configure(): void ->addOption('view-type', 't', InputOption::VALUE_OPTIONAL, 'View Type', 'line'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $contentId = $input->getOption('content-id'); $locationId = $input->getOption('location-id'); if (empty($contentId) && empty($locationId)) { diff --git a/code_samples/front/shop/checkout/src/Form/Type/OnePageCheckoutType.php b/code_samples/front/shop/checkout/src/Form/Type/OnePageCheckoutType.php index 08d23273a6..080805b718 100644 --- a/code_samples/front/shop/checkout/src/Form/Type/OnePageCheckoutType.php +++ b/code_samples/front/shop/checkout/src/Form/Type/OnePageCheckoutType.php @@ -15,8 +15,10 @@ final class OnePageCheckoutType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add( 'payment_method', PaymentMethodChoiceType::class, diff --git a/code_samples/front/shop/checkout/src/Form/Type/SelectSeatType.php b/code_samples/front/shop/checkout/src/Form/Type/SelectSeatType.php index 6d73df0552..05dc25dcc3 100644 --- a/code_samples/front/shop/checkout/src/Form/Type/SelectSeatType.php +++ b/code_samples/front/shop/checkout/src/Form/Type/SelectSeatType.php @@ -11,8 +11,10 @@ final class SelectSeatType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add( 'selection', TextType::class, diff --git a/code_samples/front/shop/payment/src/lib/PaymentMethod/Voter/NewPaymentMethodTypeVoter.php b/code_samples/front/shop/payment/src/lib/PaymentMethod/Voter/NewPaymentMethodTypeVoter.php index 432752221e..03ad389320 100644 --- a/code_samples/front/shop/payment/src/lib/PaymentMethod/Voter/NewPaymentMethodTypeVoter.php +++ b/code_samples/front/shop/payment/src/lib/PaymentMethod/Voter/NewPaymentMethodTypeVoter.php @@ -10,8 +10,10 @@ final class NewPaymentMethodTypeVoter extends AbstractVoter { - protected function getVote(PaymentMethodInterface $method, CartInterface $cart): bool - { + protected function getVote( + PaymentMethodInterface $method, + CartInterface $cart + ): bool { // Add custom logic if method should not always be visible return true; diff --git a/code_samples/front/shop/shipping/src/ShippingMethodType/Cost/CustomCostFormatter.php b/code_samples/front/shop/shipping/src/ShippingMethodType/Cost/CustomCostFormatter.php index cd9b959179..65c9cd5be0 100644 --- a/code_samples/front/shop/shipping/src/ShippingMethodType/Cost/CustomCostFormatter.php +++ b/code_samples/front/shop/shipping/src/ShippingMethodType/Cost/CustomCostFormatter.php @@ -9,8 +9,10 @@ final class CustomCostFormatter implements CostFormatterInterface { - public function formatCost(ShippingMethodInterface $shippingMethod, array $parameters = []): ?string - { + public function formatCost( + ShippingMethodInterface $shippingMethod, + array $parameters = [] + ): ?string { return $shippingMethod->getOptions()->get('customer_identifier'); } } diff --git a/code_samples/front/shop/shipping/src/ShippingMethodType/Form/Type/CustomShippingMethodOptionsType.php b/code_samples/front/shop/shipping/src/ShippingMethodType/Form/Type/CustomShippingMethodOptionsType.php index d331e37781..80007ba868 100644 --- a/code_samples/front/shop/shipping/src/ShippingMethodType/Form/Type/CustomShippingMethodOptionsType.php +++ b/code_samples/front/shop/shipping/src/ShippingMethodType/Form/Type/CustomShippingMethodOptionsType.php @@ -19,8 +19,10 @@ public function getBlockPrefix(): string return 'ibexa_shipping_method_custom'; } - public function buildForm(FormBuilderInterface $builder, array $options): void - { + public function buildForm( + FormBuilderInterface $builder, + array $options + ): void { $builder->add('customer_identifier', TextType::class); } diff --git a/code_samples/front/shop/shipping/src/ShippingMethodType/Voter/CustomVoter.php b/code_samples/front/shop/shipping/src/ShippingMethodType/Voter/CustomVoter.php index 7e4682fd96..f97175f6c4 100644 --- a/code_samples/front/shop/shipping/src/ShippingMethodType/Voter/CustomVoter.php +++ b/code_samples/front/shop/shipping/src/ShippingMethodType/Voter/CustomVoter.php @@ -10,8 +10,10 @@ final class CustomVoter extends AbstractVoter { - protected function getVote(ShippingMethodInterface $method, CartInterface $cart): bool - { + protected function getVote( + ShippingMethodInterface $method, + CartInterface $cart + ): bool { return $method->getOptions()->get('customer_identifier') === 'Acme'; } } diff --git a/code_samples/front/view_matcher/src/View/Matcher/Owner.php b/code_samples/front/view_matcher/src/View/Matcher/Owner.php index 9c21e12141..d441783063 100644 --- a/code_samples/front/view_matcher/src/View/Matcher/Owner.php +++ b/code_samples/front/view_matcher/src/View/Matcher/Owner.php @@ -2,6 +2,7 @@ namespace App\View\Matcher; +use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -16,12 +17,10 @@ class Owner implements MatcherInterface /** @var string[] */ private array $matchingUserLogins; - public function __construct(private readonly UserService $userService) - { - } + public function __construct(private readonly UserService $userService) {} /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function matchLocation(Location $location): bool { @@ -29,7 +28,7 @@ public function matchLocation(Location $location): bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function matchContentInfo(ContentInfo $contentInfo): bool { @@ -37,7 +36,7 @@ public function matchContentInfo(ContentInfo $contentInfo): bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function match(View $view): ?bool { @@ -53,7 +52,7 @@ public function match(View $view): ?bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ private function hasOwner(ContentInfo $contentInfo): bool { diff --git a/code_samples/mcp/src/Command/McpServerListCommand.php b/code_samples/mcp/src/Command/McpServerListCommand.php index f4deeb6de0..12ccbb909e 100644 --- a/code_samples/mcp/src/Command/McpServerListCommand.php +++ b/code_samples/mcp/src/Command/McpServerListCommand.php @@ -10,13 +10,11 @@ #[AsCommand(name: 'app:mcp:server_list', description: 'List MCP servers')] class McpServerListCommand { - public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) - { - } + public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) {} public function __invoke(SymfonyStyle $io): int { - foreach($this->configRegistry->getServerConfigurations() as $serverConfiguration) { + foreach ($this->configRegistry->getServerConfigurations() as $serverConfiguration) { $io->title($serverConfiguration->identifier); dump($serverConfiguration); } diff --git a/code_samples/multisite/siteaccess/AcmeExampleExtension.php b/code_samples/multisite/siteaccess/AcmeExampleExtension.php index 47de70ea6c..ba6039f127 100644 --- a/code_samples/multisite/siteaccess/AcmeExampleExtension.php +++ b/code_samples/multisite/siteaccess/AcmeExampleExtension.php @@ -16,8 +16,10 @@ final class AcmeExampleExtension extends Extension /** * @throws \Exception */ - public function load(array $configs, ContainerBuilder $container): void - { + public function load( + array $configs, + ContainerBuilder $container + ): void { $configuration = $this->getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); @@ -29,7 +31,11 @@ public function load(array $configs, ContainerBuilder $container): void $config, // Any kind of callable can be used here. // It is called for each declared scope/SiteAccess. - static function ($scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { + static function ( + $scopeSettings, + $currentScope, + ContextualizerInterface $contextualizer + ): void { // Maps the "name" setting to "acme_example.<$currentScope>.name" container parameter // It is then possible to retrieve this parameter through ConfigResolver in the application code: // $helloSetting = $configResolver->getParameter( 'name', 'acme_example' ); @@ -55,8 +61,10 @@ static function ($scopeSettings, $currentScope, ContextualizerInterface $context /** @param array $config */ #[\Override] - public function getConfiguration(array $config, ContainerBuilder $container): Configuration - { + public function getConfiguration( + array $config, + ContainerBuilder $container + ): Configuration { return new Configuration(); } } diff --git a/code_samples/multisite/siteaccess/Configuration.php b/code_samples/multisite/siteaccess/Configuration.php index 36e58f29e2..965bf30b08 100644 --- a/code_samples/multisite/siteaccess/Configuration.php +++ b/code_samples/multisite/siteaccess/Configuration.php @@ -8,7 +8,7 @@ class Configuration extends SiteAccessConfiguration { /** - * @phpstan-return \Symfony\Component\Config\Definition\Builder\TreeBuilder<'array'> The tree builder + * @phpstan-return TreeBuilder<'array'> The tree builder */ public function getConfigTreeBuilder(): TreeBuilder { diff --git a/code_samples/notifications/Src/Query/search.php b/code_samples/notifications/Src/Query/search.php index d771b8b343..1d1b85b82e 100644 --- a/code_samples/notifications/Src/Query/search.php +++ b/code_samples/notifications/Src/Query/search.php @@ -11,8 +11,8 @@ $query->addCriterion(new Type('Workflow:Review')); $query->addCriterion(new Status(['unread'])); -$from = new \DateTimeImmutable('-7 days'); -$to = new \DateTimeImmutable(); +$from = new DateTimeImmutable('-7 days'); +$to = new DateTimeImmutable(); $query->addCriterion(new DateCreated($from, $to)); diff --git a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php index f5158b7d1c..f3641d6a65 100644 --- a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php +++ b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php @@ -10,12 +10,12 @@ class MyStringAttributeMapper implements AttributeFormTypeMapperInterface { /** - * @param \Symfony\Component\Form\FormBuilderInterface $formBuilder - * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockDefinition $blockDefinition - * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockAttributeDefinition $blockAttributeDefinition + * @param FormBuilderInterface $formBuilder + * @param BlockDefinition $blockDefinition + * @param BlockAttributeDefinition $blockAttributeDefinition * @param array $constraints * - * @return \Symfony\Component\Form\FormBuilderInterface + * @return FormBuilderInterface * * @throws \Exception */ diff --git a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php index 0c3b08b6e6..779bcc8a74 100644 --- a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php +++ b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php @@ -1,14 +1,17 @@ getConstraints()['custom_not_blank'])) { diff --git a/code_samples/page/custom_block_validator/src/Validator/AlphaOnlyValidator.php b/code_samples/page/custom_block_validator/src/Validator/AlphaOnlyValidator.php index df8526a72c..30dd895b4d 100644 --- a/code_samples/page/custom_block_validator/src/Validator/AlphaOnlyValidator.php +++ b/code_samples/page/custom_block_validator/src/Validator/AlphaOnlyValidator.php @@ -9,8 +9,10 @@ class AlphaOnlyValidator extends ConstraintValidator { - public function validate($value, Constraint $constraint): void - { + public function validate( + $value, + Constraint $constraint + ): void { if (!$constraint instanceof AlphaOnly) { throw new UnexpectedTypeException($constraint, AlphaOnly::class); } diff --git a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php index 408be0db42..6b06810792 100644 --- a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php +++ b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php @@ -5,13 +5,12 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class BlockEmbedEventEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} public static function getSubscribedEvents(): array { @@ -22,7 +21,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); $parameters['event_content'] = $this->contentService->loadContent($parameters['event']); diff --git a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php index 00f0884efb..914b498f0f 100644 --- a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php +++ b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php @@ -4,6 +4,7 @@ use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyBlockListener implements EventSubscriberInterface @@ -17,7 +18,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); diff --git a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php index 0c28ad889d..c28aa7ddc7 100644 --- a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php +++ b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php @@ -11,9 +11,7 @@ final readonly class ProductAvailabilityPurchasableWithoutStockStrategy implements ProductAvailabilityStrategyInterface { - public function __construct(private HandlerInterface $handler) - { - } + public function __construct(private HandlerInterface $handler) {} public function accept(AvailabilityContextInterface $context): bool { diff --git a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php index e8e8e547f6..0e4c6f1101 100644 --- a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php +++ b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php @@ -4,6 +4,4 @@ use Ibexa\Contracts\ProductCatalog\Values\Availability\AvailabilityContextInterface; -final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface -{ -} +final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface {} diff --git a/code_samples/product_catalog/Symbol/Format/Checksum/LuhnChecksum.php b/code_samples/product_catalog/Symbol/Format/Checksum/LuhnChecksum.php index 631a86dd05..d2f89d00c3 100644 --- a/code_samples/product_catalog/Symbol/Format/Checksum/LuhnChecksum.php +++ b/code_samples/product_catalog/Symbol/Format/Checksum/LuhnChecksum.php @@ -9,8 +9,10 @@ final class LuhnChecksum implements ChecksumInterface { - public function validate(AttributeDefinitionInterface $attributeDefinition, string $value): bool - { + public function validate( + AttributeDefinitionInterface $attributeDefinition, + string $value + ): bool { $digits = $this->getDigits($value); $count = count($digits); diff --git a/code_samples/raptor_cdp/date_of_birth_export/src/Export/User/DateOfBirthUserItemProcessor.php b/code_samples/raptor_cdp/date_of_birth_export/src/Export/User/DateOfBirthUserItemProcessor.php index 33a0993cae..9cce0a98b0 100644 --- a/code_samples/raptor_cdp/date_of_birth_export/src/Export/User/DateOfBirthUserItemProcessor.php +++ b/code_samples/raptor_cdp/date_of_birth_export/src/Export/User/DateOfBirthUserItemProcessor.php @@ -16,8 +16,10 @@ public function __construct( parent::__construct($userFieldTypeIdentifier); } - protected function doProcess(array $processedItemData, Content $userContent): array - { + protected function doProcess( + array $processedItemData, + Content $userContent + ): array { $userField = $this->getUserField($userContent); if (null === $userField) { diff --git a/code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php b/code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php index c53703e2fa..52813c10a6 100644 --- a/code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php +++ b/code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php @@ -39,8 +39,10 @@ protected function configure(): void $this->addArgument('id', InputArgument::REQUIRED, 'A test number'); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $id = $input->getArgument('id'); $this->permissionResolver->setCurrentUserReference($this->userService->loadUserByLogin('admin')); diff --git a/code_samples/recent_activity/src/Command/DispatchMyFeatureEventCommand.php b/code_samples/recent_activity/src/Command/DispatchMyFeatureEventCommand.php index ab8cec0ef0..33e1730773 100644 --- a/code_samples/recent_activity/src/Command/DispatchMyFeatureEventCommand.php +++ b/code_samples/recent_activity/src/Command/DispatchMyFeatureEventCommand.php @@ -21,8 +21,10 @@ public function __construct(private readonly EventDispatcherInterface $eventDisp parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $event = new MyFeatureEvent(new MyFeature(['id' => 123, 'name' => 'Logged Name']), 'simulate'); $this->eventDispatcher->dispatch($event); diff --git a/code_samples/recent_activity/src/Command/MonitorRecentContentCreationCommand.php b/code_samples/recent_activity/src/Command/MonitorRecentContentCreationCommand.php index 8b82da5673..e08bc89036 100644 --- a/code_samples/recent_activity/src/Command/MonitorRecentContentCreationCommand.php +++ b/code_samples/recent_activity/src/Command/MonitorRecentContentCreationCommand.php @@ -29,8 +29,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $query = new Query([ new Criterion\ObjectCriterion(Content::class), new Criterion\ActionCriterion([ActivityLogServiceInterface::ACTION_CREATE]), diff --git a/code_samples/recent_activity/src/Event/MyFeatureEvent.php b/code_samples/recent_activity/src/Event/MyFeatureEvent.php index 84b46ba6c1..51b7ba50e1 100644 --- a/code_samples/recent_activity/src/Event/MyFeatureEvent.php +++ b/code_samples/recent_activity/src/Event/MyFeatureEvent.php @@ -9,8 +9,7 @@ class MyFeatureEvent extends Event public function __construct( private readonly object $object, private readonly string $action - ) { - } + ) {} public function getObject(): object { diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php index 812875614c..4ba4a98456 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php @@ -3,14 +3,13 @@ namespace App\EventSubscriber; use App\Event\MyFeatureEvent; +use App\MyFeature\MyFeature; use Ibexa\Contracts\ActivityLog\ActivityLogServiceInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyFeatureEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ActivityLogServiceInterface $activityLogService) - { - } + public function __construct(private readonly ActivityLogServiceInterface $activityLogService) {} public static function getSubscribedEvents(): array { @@ -21,7 +20,7 @@ public static function getSubscribedEvents(): array public function onMyFeatureEvent(MyFeatureEvent $event): void { - /** @var \App\MyFeature\MyFeature $object */ + /** @var MyFeature $object */ $object = $event->getObject(); $className = $object::class; $id = (string)$object->id; diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php index 619ff17f6e..354928100c 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php @@ -11,9 +11,7 @@ class MyFeaturePostActivityListLoadEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly MyFeatureService $myFeatureService) - { - } + public function __construct(private readonly MyFeatureService $myFeatureService) {} public static function getSubscribedEvents(): array { @@ -43,7 +41,7 @@ public function loadMyFeature(PostActivityGroupListLoadEvent $event): void } $log->setRelatedObject($visitedIds[$id]); - } catch (NotFoundException|UnauthorizedException) { + } catch (NotFoundException | UnauthorizedException) { $visitedIds[$id] = null; } } diff --git a/code_samples/recent_activity/src/recent_activity_disable.php b/code_samples/recent_activity/src/recent_activity_disable.php index ba153acadf..0482bb0160 100644 --- a/code_samples/recent_activity/src/recent_activity_disable.php +++ b/code_samples/recent_activity/src/recent_activity_disable.php @@ -1,6 +1,7 @@ disable(); // Perform operations that should not be logged to the activity log diff --git a/code_samples/recommendations/EventData.php b/code_samples/recommendations/EventData.php index 4825ed6114..78a20b405a 100644 --- a/code_samples/recommendations/EventData.php +++ b/code_samples/recommendations/EventData.php @@ -10,8 +10,7 @@ class EventData { public function __construct( private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public function dispatchVisitEvent(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventMapper.php b/code_samples/recommendations/EventMapper.php index cf0bd3bd8e..f8b924a91f 100644 --- a/code_samples/recommendations/EventMapper.php +++ b/code_samples/recommendations/EventMapper.php @@ -13,8 +13,7 @@ class EventMapper public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public function trackProductView(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventSubscriber.php b/code_samples/recommendations/EventSubscriber.php index 175784efc4..1be6a3fa84 100644 --- a/code_samples/recommendations/EventSubscriber.php +++ b/code_samples/recommendations/EventSubscriber.php @@ -14,8 +14,7 @@ class EventSubscriber implements EventSubscriberInterface public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/search/content/customfield_criterion.php b/code_samples/search/content/customfield_criterion.php index a9a52400de..f675f94e42 100644 --- a/code_samples/search/content/customfield_criterion.php +++ b/code_samples/search/content/customfield_criterion.php @@ -1,5 +1,6 @@ query = new Query\Criterion\CustomField('content_name_s', Operator::EQ, '/Ibexa.*/'); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_no_entries_criterion.php b/code_samples/search/content/taxonomy_no_entries_criterion.php index 048006d41c..2055b506ec 100644 --- a/code_samples/search/content/taxonomy_no_entries_criterion.php +++ b/code_samples/search/content/taxonomy_no_entries_criterion.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -15,5 +16,5 @@ ] ); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_subtree_criterion.php b/code_samples/search/content/taxonomy_subtree_criterion.php index c13f94ed70..fc4e59ff9d 100644 --- a/code_samples/search/content/taxonomy_subtree_criterion.php +++ b/code_samples/search/content/taxonomy_subtree_criterion.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -15,5 +16,5 @@ ] ); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php index a707b331c5..31f0257cef 100644 --- a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php +++ b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php @@ -10,9 +10,7 @@ final readonly class ContentTypeGroupGroupResolver implements GroupResolverInterface { - public function __construct(private Handler $contentTypeHandler) - { - } + public function __construct(private Handler $contentTypeHandler) {} public function resolveDocumentGroup(BaseDocument $document): string { diff --git a/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationResultExtractor.php b/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationResultExtractor.php index ab64e1be3f..5fd4f18048 100644 --- a/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationResultExtractor.php +++ b/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationResultExtractor.php @@ -12,13 +12,18 @@ final class PriorityRangeAggregationResultExtractor implements AggregationResultExtractor { - public function supports(Aggregation $aggregation, LanguageFilter $languageFilter): bool - { + public function supports( + Aggregation $aggregation, + LanguageFilter $languageFilter + ): bool { return $aggregation instanceof PriorityRangeAggregation; } - public function extract(Aggregation $aggregation, LanguageFilter $languageFilter, array $data): AggregationResult - { + public function extract( + Aggregation $aggregation, + LanguageFilter $languageFilter, + array $data + ): AggregationResult { $entries = []; foreach ($data['buckets'] as $bucket) { diff --git a/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php b/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php index 7782ff33b6..6795bcd978 100644 --- a/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php +++ b/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php @@ -14,18 +14,23 @@ */ final class PriorityRangeAggregationVisitor implements AggregationVisitor { - public function supports(Aggregation $aggregation, LanguageFilter $languageFilter): bool - { + public function supports( + Aggregation $aggregation, + LanguageFilter $languageFilter + ): bool { return $aggregation instanceof PriorityRangeAggregation; } /** - * @param \App\Query\Aggregation\PriorityRangeAggregation $aggregation + * @param PriorityRangeAggregation $aggregation * * @return array> */ - public function visit(AggregationVisitor $dispatcher, Aggregation $aggregation, LanguageFilter $languageFilter): array - { + public function visit( + AggregationVisitor $dispatcher, + Aggregation $aggregation, + LanguageFilter $languageFilter + ): array { $ranges = []; foreach ($aggregation->getRanges() as $range) { diff --git a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php index 2952020fcd..7089067cb1 100644 --- a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php +++ b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php @@ -12,6 +12,4 @@ * * @phpstan-extends \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\AbstractRangeAggregation */ -final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation -{ -} +final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation {} diff --git a/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php b/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php index a81fb9b743..550c26f472 100644 --- a/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php +++ b/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationResultExtractor.php @@ -15,13 +15,18 @@ final class PriorityRangeAggregationResultExtractor implements AggregationResultExtractor { - public function canVisit(Aggregation $aggregation, array $languageFilter): bool - { + public function canVisit( + Aggregation $aggregation, + array $languageFilter + ): bool { return $aggregation instanceof PriorityRangeAggregation; } - public function extract(Aggregation $aggregation, array $languageFilter, stdClass $data): AggregationResult - { + public function extract( + Aggregation $aggregation, + array $languageFilter, + stdClass $data + ): AggregationResult { $entries = []; foreach ($data as $key => $bucket) { if ($key === 'count' || !str_contains($key, '_')) { diff --git a/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php b/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php index 4f669dc70f..22dfde06e5 100644 --- a/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php +++ b/code_samples/search/custom/src/Query/Aggregation/Solr/PriorityRangeAggregationVisitor.php @@ -13,13 +13,15 @@ */ final class PriorityRangeAggregationVisitor implements AggregationVisitor { - public function canVisit(Aggregation $aggregation, array $languageFilter): bool - { + public function canVisit( + Aggregation $aggregation, + array $languageFilter + ): bool { return $aggregation instanceof PriorityRangeAggregation; } /** - * @param \App\Query\Aggregation\PriorityRangeAggregation $aggregation + * @param PriorityRangeAggregation $aggregation */ public function visit( AggregationVisitor $dispatcherVisitor, diff --git a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php index 142990bbd7..58f2c79eca 100644 --- a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php @@ -11,16 +11,21 @@ final class CameraManufacturerVisitor implements CriterionVisitor { - public function supports(CriterionInterface $criterion, LanguageFilter $languageFilter): bool - { + public function supports( + CriterionInterface $criterion, + LanguageFilter $languageFilter + ): bool { return $criterion instanceof CameraManufacturerCriterion; } /** - * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion + * @param CameraManufacturerCriterion $criterion */ - public function visit(CriterionVisitor $dispatcher, CriterionInterface $criterion, LanguageFilter $languageFilter): array - { + public function visit( + CriterionVisitor $dispatcher, + CriterionInterface $criterion, + LanguageFilter $languageFilter + ): array { return [ 'terms' => [ 'exif_camera_manufacturer_id' => (array)$criterion->value, diff --git a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php index c4cf00e598..1a4622ebd4 100644 --- a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php @@ -16,10 +16,12 @@ public function canVisit(CriterionInterface $criterion): bool } /** - * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion + * @param CameraManufacturerCriterion $criterion */ - public function visit(CriterionInterface $criterion, ?CriterionVisitor $subVisitor = null): string - { + public function visit( + CriterionInterface $criterion, + ?CriterionVisitor $subVisitor = null + ): string { $expressions = array_map( fn ($value): string => 'exif_camera_manufacturer_id:"' . $this->escapeQuote((string) $value) . '"', $criterion->value diff --git a/code_samples/search/custom/src/Query/SortClause/Elasticsearch/ScoreVisitor.php b/code_samples/search/custom/src/Query/SortClause/Elasticsearch/ScoreVisitor.php index 45a35b808c..471031306a 100644 --- a/code_samples/search/custom/src/Query/SortClause/Elasticsearch/ScoreVisitor.php +++ b/code_samples/search/custom/src/Query/SortClause/Elasticsearch/ScoreVisitor.php @@ -12,13 +12,18 @@ final class ScoreVisitor implements SortClauseVisitor { - public function supports(SortClause $sortClause, LanguageFilter $languageFilter): bool - { + public function supports( + SortClause $sortClause, + LanguageFilter $languageFilter + ): bool { return $sortClause instanceof ScoreSortClause; } - public function visit(SortClauseVisitor $visitor, SortClause $sortClause, LanguageFilter $languageFilter): array - { + public function visit( + SortClauseVisitor $visitor, + SortClause $sortClause, + LanguageFilter $languageFilter + ): array { $order = $sortClause->direction === Query::SORT_ASC ? 'asc' : 'desc'; return [ diff --git a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php index a02e3a04a0..6c894f539b 100644 --- a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php +++ b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php @@ -6,6 +6,7 @@ use Ibexa\Contracts\Core\Persistence\Content\Handler as ContentHandler; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as LocationHandler; use Ibexa\Contracts\Core\Search; +use Ibexa\Contracts\Core\Search\Field; use Ibexa\Contracts\Solr\FieldMapper\ContentFieldMapper; class WebinarEventParentNameFieldMapper extends ContentFieldMapper @@ -13,8 +14,7 @@ class WebinarEventParentNameFieldMapper extends ContentFieldMapper public function __construct( protected ContentHandler $contentHandler, protected LocationHandler $locationHandler - ) { - } + ) {} public function accept(Content $content): bool { @@ -23,7 +23,7 @@ public function accept(Content $content): bool } /** - * @return \Ibexa\Contracts\Core\Search\Field[] + * @return Field[] */ public function mapFields(Content $content): array { @@ -33,7 +33,7 @@ public function mapFields(Content $content): array $parentContentInfo = $this->contentHandler->loadContentInfo($parentLocation->contentId); return [ - new Search\Field( + new Field( 'parent_name', $parentContentInfo->name, new Search\FieldType\StringField() diff --git a/code_samples/search/location/isbookmarked_criterion.php b/code_samples/search/location/isbookmarked_criterion.php index c61bf951b1..c7a67f7316 100644 --- a/code_samples/search/location/isbookmarked_criterion.php +++ b/code_samples/search/location/isbookmarked_criterion.php @@ -1,9 +1,10 @@ filter = new IsBookmarked(); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findLocations($query); diff --git a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php index 6a4ee6cde4..0e5fdfb877 100644 --- a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php +++ b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php @@ -13,12 +13,12 @@ class ProductViewController extends AbstractController { - public function __construct(private readonly LocalProductServiceInterface $productService) - { - } + public function __construct(private readonly LocalProductServiceInterface $productService) {} - public function viewAction(Request $request, ContentView $view): View - { + public function viewAction( + Request $request, + ContentView $view + ): View { $product = $this->productService->getProductFromContent($view->getContent()); if ($product->isBaseProduct()) { $view->addParameters([ diff --git a/code_samples/shopping_list/php_api/src/Command/ShoppingListFilterCommand.php b/code_samples/shopping_list/php_api/src/Command/ShoppingListFilterCommand.php index 9001e099be..88ade1f8c0 100644 --- a/code_samples/shopping_list/php_api/src/Command/ShoppingListFilterCommand.php +++ b/code_samples/shopping_list/php_api/src/Command/ShoppingListFilterCommand.php @@ -24,8 +24,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $login = 'admin'; $desiredProductCodes = ['TODO', 'TODO']; $name = 'shopping-list-test-filtering'; @@ -56,8 +58,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::SUCCESS; } - private function displayList(OutputInterface $output, ShoppingListInterface $list): void - { + private function displayList( + OutputInterface $output, + ShoppingListInterface $list + ): void { $output->writeln("{$list->getOwner()->getName()} ({$list->getOwner()->getLogin()})"); $output->writeln("{$list->getName()} ({$list->getIdentifier()})" . ($list->isDefault() ? ' [default]' : '')); $entries = $list->getEntries(); diff --git a/code_samples/shopping_list/php_api/src/Command/ShoppingListMoveCommand.php b/code_samples/shopping_list/php_api/src/Command/ShoppingListMoveCommand.php index 8d02d055b5..03302d35fa 100644 --- a/code_samples/shopping_list/php_api/src/Command/ShoppingListMoveCommand.php +++ b/code_samples/shopping_list/php_api/src/Command/ShoppingListMoveCommand.php @@ -24,8 +24,10 @@ public function __construct( parent::__construct(); } - protected function execute(InputInterface $input, OutputInterface $output): int - { + protected function execute( + InputInterface $input, + OutputInterface $output + ): int { $login = 'admin'; $productCodes = ['TODO', 'TODO']; $movedProductCodes = $productCodes; @@ -62,8 +64,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::SUCCESS; } - private function displayList(OutputInterface $output, ShoppingListInterface $list): void - { + private function displayList( + OutputInterface $output, + ShoppingListInterface $list + ): void { $output->writeln("{$list->getOwner()->getName()} ({$list->getOwner()->getLogin()})"); $output->writeln("{$list->getName()} ({$list->getIdentifier()})" . ($list->isDefault() ? ' [default]' : '')); $entries = $list->getEntries(); diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index c6a9721824..01758aa43d 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -31,8 +31,7 @@ public function __construct( private readonly ShoppingListServiceInterface $shoppingListService, private readonly CartShoppingListTransferServiceInterface $cartShoppingListTransferService, private readonly LocalProductServiceInterface $productService - ) { - } + ) {} #[Route( path: '/app-shopping-list-cart', diff --git a/code_samples/shopping_list/search/criteria.php b/code_samples/shopping_list/search/criteria.php index 18c0ae2429..054c916e00 100644 --- a/code_samples/shopping_list/search/criteria.php +++ b/code_samples/shopping_list/search/criteria.php @@ -1,9 +1,10 @@ getCurrentUserReference()), diff --git a/code_samples/shopping_list/search/sort_clauses.php b/code_samples/shopping_list/search/sort_clauses.php index 4927957c09..8530a64aa4 100644 --- a/code_samples/shopping_list/search/sort_clauses.php +++ b/code_samples/shopping_list/search/sort_clauses.php @@ -1,10 +1,11 @@ findShoppingLists( new ShoppingListQuery( null, diff --git a/code_samples/translations_management/src/TranslationsManagement/ImageAltTextTransformer.php b/code_samples/translations_management/src/TranslationsManagement/ImageAltTextTransformer.php index d11ec9b130..350bf28905 100644 --- a/code_samples/translations_management/src/TranslationsManagement/ImageAltTextTransformer.php +++ b/code_samples/translations_management/src/TranslationsManagement/ImageAltTextTransformer.php @@ -34,8 +34,11 @@ public function encode(Field $field): EncodedFieldValue /** * @param array $metadata */ - public function decode(string $value, mixed $previousFieldValue, array $metadata): Value - { + public function decode( + string $value, + mixed $previousFieldValue, + array $metadata + ): Value { if (!$previousFieldValue instanceof ImageValue) { throw new InvalidArgumentException( '$previousFieldValue', diff --git a/code_samples/translations_management/src/TranslationsManagement/MyApiClient.php b/code_samples/translations_management/src/TranslationsManagement/MyApiClient.php index 4091bb5285..19428fdd39 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyApiClient.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyApiClient.php @@ -7,8 +7,11 @@ /** Placeholder for your own HTTP client or third-party SDK wrapper. */ final class MyApiClient { - public function translate(string $text, string $sourceLanguage, string $targetLanguage): string - { + public function translate( + string $text, + string $sourceLanguage, + string $targetLanguage + ): string { // Your implementation here. return ''; } diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php index b1a2c4bf12..33353fa67b 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php @@ -16,8 +16,7 @@ public function __construct( private MyApiClient $apiClient, private string $actionConfigurationIdentifier, - ) { - } + ) {} public function getIdentifier(): string { diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php index e726d3435f..204b93e79b 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php @@ -15,8 +15,7 @@ */ public function __construct( private MyApiClient $apiClient, - ) { - } + ) {} public function getIdentifier(): string { diff --git a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php index 04d20d6b93..580273da51 100644 --- a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php +++ b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class RandomBlockListener implements EventSubscriberInterface @@ -20,8 +21,7 @@ public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService, private readonly SearchService $searchService - ) { - } + ) {} public static function getSubscribedEvents(): array { @@ -33,7 +33,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { $blockValue = $event->getBlockValue(); - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $renderRequest->getParameters(); diff --git a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php index 4f351028c5..9a24a9f89e 100644 --- a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php +++ b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php @@ -16,8 +16,7 @@ public function __construct( private readonly ConfigResolverInterface $configResolver, private readonly UserService $userService, private readonly array $userMap = [], - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php index cbd1d14a74..b82f2c29ce 100644 --- a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php +++ b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php @@ -31,7 +31,7 @@ public function __construct( } /** - * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner + * @param GoogleUser $resourceOwner */ protected function loadUser( ResourceOwnerInterface $resourceOwner, @@ -41,7 +41,7 @@ protected function loadUser( } /** - * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner + * @param GoogleUser $resourceOwner */ protected function createUser( ResourceOwnerInterface $resourceOwner, diff --git a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php index 1e6d72e701..d113b372c2 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php @@ -10,9 +10,7 @@ class ApprovedTransitionListener extends AbstractTransitionWorkflowActionListener { - public function __construct(private readonly NotificationInterface $notificationHandler) - { - } + public function __construct(private readonly NotificationInterface $notificationHandler) {} public function getIdentifier(): string { diff --git a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php index 9534a666a9..8bf9453e9d 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php @@ -14,8 +14,7 @@ class LegalTransitionListener extends AbstractTransitionWorkflowActionListener public function __construct( private readonly NotificationInterface $notificationHandler, protected WorkflowRegistryInterface $workflowRegistry - ) { - } + ) {} public function getIdentifier(): string { From 2aeccdb9227622e18f0e7825797487fae0f103ce Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 19:30:37 +0100 Subject: [PATCH 43/66] fix-cs --- tests/ConfigurationProvider.php | 6 ++++-- tests/InlineSamples/InlinePhpPipelineTest.php | 18 ++++++++++++------ tests/InlineSamples/InlinePhpSyncer.php | 13 +++++++++---- tests/InlineSamples/InlinePhpSyncerTest.php | 7 +++++-- tests/InlineSamples/InlinePhpWriter.php | 7 +++++-- tests/InlineSamples/InlinePhpWriterTest.php | 8 ++++++-- tests/InlineSamples/MarkdownExtractor.php | 6 ++++-- tests/InlineSamples/MarkdownExtractorTest.php | 6 ++++-- tests/Markdown/MarkdownYamlExtractor.php | 6 ++++-- tests/Markdown/MarkdownYamlExtractorTest.php | 6 ++++-- tests/ValidationBaseline.php | 14 +++++++++----- tests/Yaml/YamlTest.php | 14 ++++++++++---- tests/bootstrap.php | 2 +- tests/generate-yaml-baseline.php | 2 +- 14 files changed, 78 insertions(+), 37 deletions(-) diff --git a/tests/ConfigurationProvider.php b/tests/ConfigurationProvider.php index 99a509b25f..2c94d1f8da 100644 --- a/tests/ConfigurationProvider.php +++ b/tests/ConfigurationProvider.php @@ -72,8 +72,10 @@ public function resolveParameters(array $config): array return $result; } - private function resolveValue(ParameterBagInterface $bag, mixed $value): mixed - { + private function resolveValue( + ParameterBagInterface $bag, + mixed $value + ): mixed { if (is_array($value)) { return array_map(fn (mixed $v): mixed => $this->resolveValue($bag, $v), $value); } diff --git a/tests/InlineSamples/InlinePhpPipelineTest.php b/tests/InlineSamples/InlinePhpPipelineTest.php index e02405ca65..cca78548b7 100644 --- a/tests/InlineSamples/InlinePhpPipelineTest.php +++ b/tests/InlineSamples/InlinePhpPipelineTest.php @@ -52,8 +52,10 @@ protected function setUp(): void * * @return string|null Updated Markdown, or null when the pipeline produced no change. */ - private function pipeline(string $md, array $fixerReplacements = []): ?string - { + private function pipeline( + string $md, + array $fixerReplacements = [] + ): ?string { $blocks = iterator_to_array($this->extractor->extract($md)); self::assertNotEmpty($blocks, 'No PHP blocks found in Markdown'); @@ -74,8 +76,10 @@ private function pipeline(string $md, array $fixerReplacements = []): ?string * * @param array $fixerReplacements */ - private function pipelineAll(string $md, array $fixerReplacements = []): string - { + private function pipelineAll( + string $md, + array $fixerReplacements = [] + ): string { $blocks = iterator_to_array($this->extractor->extract($md)); self::assertNotEmpty($blocks); @@ -211,8 +215,10 @@ public function testMultiLineChangePreservesStructure(): void * @param array $fixerReplacements */ #[DataProvider('provideIdempotencyCases')] - public function testPipelineIsIdempotent(string $md, array $fixerReplacements): void - { + public function testPipelineIsIdempotent( + string $md, + array $fixerReplacements + ): void { // First pass (may or may not change the Markdown). $updated = $this->pipeline($md, $fixerReplacements) ?? $md; diff --git a/tests/InlineSamples/InlinePhpSyncer.php b/tests/InlineSamples/InlinePhpSyncer.php index aaa484409f..c2457954fb 100644 --- a/tests/InlineSamples/InlinePhpSyncer.php +++ b/tests/InlineSamples/InlinePhpSyncer.php @@ -56,8 +56,10 @@ public function parseSourceLocation(string $phpFileContent): ?array * @return string|null Updated Markdown content, or null if nothing changed or the source * location cannot be mapped. */ - public function sync(string $phpFileContent, string $mdContent): ?string - { + public function sync( + string $phpFileContent, + string $mdContent + ): ?string { $location = $this->parseSourceLocation($phpFileContent); if ($location === null) { return null; @@ -117,8 +119,11 @@ private function extractBody(string $phpFileContent): string * without the writer->build($sourcePath, $bodyLine, $mdBody); } diff --git a/tests/InlineSamples/InlinePhpWriter.php b/tests/InlineSamples/InlinePhpWriter.php index af3cf40c87..abde24a286 100644 --- a/tests/InlineSamples/InlinePhpWriter.php +++ b/tests/InlineSamples/InlinePhpWriter.php @@ -45,8 +45,11 @@ final class InlinePhpWriter * @param string $body Snippet body as returned by MarkdownExtractor::extract(): * admonition indentation already stripped, may start with writer->build($sourcePath, $line, $body)); } diff --git a/tests/InlineSamples/MarkdownExtractor.php b/tests/InlineSamples/MarkdownExtractor.php index 4f0bcdfbc9..50f908b063 100644 --- a/tests/InlineSamples/MarkdownExtractor.php +++ b/tests/InlineSamples/MarkdownExtractor.php @@ -79,8 +79,10 @@ public function extract(string $content): iterable } } - private function stripIndentation(string $body, int $spaces): string - { + private function stripIndentation( + string $body, + int $spaces + ): string { $prefix = str_repeat(' ', $spaces); $lines = explode("\n", $body); $stripped = array_map( diff --git a/tests/InlineSamples/MarkdownExtractorTest.php b/tests/InlineSamples/MarkdownExtractorTest.php index 7cf6e312aa..474fa0934c 100644 --- a/tests/InlineSamples/MarkdownExtractorTest.php +++ b/tests/InlineSamples/MarkdownExtractorTest.php @@ -187,8 +187,10 @@ public function testSkipsOnlyMatchingBlocksWhenMixed(): void * @param array $expected */ #[DataProvider('provideMultilineBlocks')] - public function testExtractsMultilineBody(string $content, array $expected): void - { + public function testExtractsMultilineBody( + string $content, + array $expected + ): void { $blocks = iterator_to_array($this->extractor->extract($content)); self::assertCount(count($expected), $blocks); diff --git a/tests/Markdown/MarkdownYamlExtractor.php b/tests/Markdown/MarkdownYamlExtractor.php index 699c59853e..b15900df48 100644 --- a/tests/Markdown/MarkdownYamlExtractor.php +++ b/tests/Markdown/MarkdownYamlExtractor.php @@ -62,8 +62,10 @@ public function extract(string $content): iterable } } - private function stripIndentation(string $body, int $spaces): string - { + private function stripIndentation( + string $body, + int $spaces + ): string { $prefix = str_repeat(' ', $spaces); $lines = explode("\n", $body); $stripped = array_map( diff --git a/tests/Markdown/MarkdownYamlExtractorTest.php b/tests/Markdown/MarkdownYamlExtractorTest.php index 0575ae51df..0451edeb23 100644 --- a/tests/Markdown/MarkdownYamlExtractorTest.php +++ b/tests/Markdown/MarkdownYamlExtractorTest.php @@ -187,8 +187,10 @@ public function testSkipsOnlyMatchingBlocksWhenMixed(): void * @param array $expected */ #[DataProvider('provideMultilineBlocks')] - public function testExtractsMultilineBody(string $content, array $expected): void - { + public function testExtractsMultilineBody( + string $content, + array $expected + ): void { $blocks = iterator_to_array($this->extractor->extract($content)); self::assertCount(count($expected), $blocks); diff --git a/tests/ValidationBaseline.php b/tests/ValidationBaseline.php index 223669e8a1..53422e93e0 100644 --- a/tests/ValidationBaseline.php +++ b/tests/ValidationBaseline.php @@ -8,6 +8,8 @@ namespace Ibexa\Tests\Documentation; +use Symfony\Component\Yaml\Yaml; + /** * Reads yaml-validation-baseline.yaml and answers whether a given failure is * a known, expected one that should be suppressed rather than reported. @@ -26,11 +28,13 @@ final class ValidationBaseline public function __construct( private readonly string $baselineFile, private readonly string $repoRoot, - ) { - } + ) {} - public function isInBaseline(string $relativePath, ?string $bodyHash, string $errorMessage): bool - { + public function isInBaseline( + string $relativePath, + ?string $bodyHash, + string $errorMessage + ): bool { foreach ($this->getEntries() as $entry) { $entryPath = $entry['path'] ?? ''; @@ -68,7 +72,7 @@ private function getEntries(): array return $this->entries = []; } - $parsed = \Symfony\Component\Yaml\Yaml::parseFile($this->baselineFile); + $parsed = Yaml::parseFile($this->baselineFile); return $this->entries = $parsed['ignoreErrors'] ?? []; } diff --git a/tests/Yaml/YamlTest.php b/tests/Yaml/YamlTest.php index e6dc396127..16a0d9c994 100644 --- a/tests/Yaml/YamlTest.php +++ b/tests/Yaml/YamlTest.php @@ -24,8 +24,12 @@ final class YamlTest extends TestCase private const string BASELINE_FILE = __DIR__ . '/../yaml-validation-baseline.yaml'; #[DataProvider('provideYamlSources')] - public function testYamlIsSyntacticallyValid(string $filePath, int $line, string $body, string $bodyHash): void - { + public function testYamlIsSyntacticallyValid( + string $filePath, + int $line, + string $body, + string $bodyHash + ): void { $filePath = self::relativePath($filePath); try { @@ -157,8 +161,10 @@ private static function baseline(): ValidationBaseline return $baseline ??= new ValidationBaseline(self::BASELINE_FILE, realpath(self::REPO_ROOT)); } - private static function makeLabel(string $absolutePath, int $lineNumber): string - { + private static function makeLabel( + string $absolutePath, + int $lineNumber + ): string { return ltrim(str_replace(realpath(self::REPO_ROOT), '', $absolutePath), '/') . ':' . $lineNumber; } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9374e6f3a2..00cd6610cc 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,7 +8,7 @@ use Composer\Autoload\ClassLoader; -/** @var \Composer\Autoload\ClassLoader $loader */ +/** @var ClassLoader $loader */ $loader = require __DIR__ . '/../vendor/autoload.php'; /** diff --git a/tests/generate-yaml-baseline.php b/tests/generate-yaml-baseline.php index 51c816dee4..19c74e4e96 100644 --- a/tests/generate-yaml-baseline.php +++ b/tests/generate-yaml-baseline.php @@ -55,7 +55,7 @@ $entries = []; // Collect all failures/errors at any nesting depth using XPath -/** @var \SimpleXMLElement[] $testcases */ +/** @var SimpleXMLElement[] $testcases */ $testcases = $xml->xpath('//testcase[failure or error]') ?: []; foreach ($testcases as $testcase) { From ab3c35471816f241f664b8dc853831e7c003cadd Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 19:38:47 +0100 Subject: [PATCH 44/66] .php-cs-fixer-inline.php: ignore phpdoc_force_fqcn_fixer [PhpCsFixer\ConfigurationException\InvalidConfigurationException (16)] The rules contain unknown fixers: "AdamWojs/phpdoc_force_fqcn_fixer". --- .php-cs-fixer-inline.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php-cs-fixer-inline.php b/.php-cs-fixer-inline.php index 9e653f56e6..a22d4f25a1 100644 --- a/.php-cs-fixer-inline.php +++ b/.php-cs-fixer-inline.php @@ -17,7 +17,7 @@ $configFactory->withRules(array_merge($commonRules, [ 'psr_autoloading' => false, - 'AdamWojs/phpdoc_force_fqcn_fixer' => false, + //'AdamWojs/phpdoc_force_fqcn_fixer' => false, ])); return $configFactory From 0e0b06f8604709053f514112acd10cd703fec3f7 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 19:45:00 +0100 Subject: [PATCH 45/66] fix-cs --- .../extending_thumbnails.md | 6 ++-- .../back_office_menus/back_office_menus.md | 4 +-- .../back_office/customize_calendar.md | 3 +- .../back_office/notifications.md | 2 +- .../configuration/configuration.md | 2 +- .../configuration/dynamic_configuration.md | 4 +-- .../configuration/repository_configuration.md | 5 +-- docs/ai/ai_actions/configure_ai_actions.md | 2 +- docs/commerce/cart/cart_api.md | 20 ++++++++---- .../shopping_list/install_shopping_list.md | 2 +- .../configure_collaborative_editing.md | 4 +-- .../content_api/browsing_content.md | 20 ++++++------ .../content_api/creating_content.md | 4 +-- .../content_api/managing_content.md | 6 ++-- .../field_type_reference/authorfield.md | 32 +++++++++---------- .../field_type_reference/binaryfilefield.md | 4 +-- .../field_type_reference/countryfield.md | 4 +-- .../field_type_reference/dateandtimefield.md | 3 +- .../field_type_reference/floatfield.md | 2 +- .../field_type_reference/imageassetfield.md | 7 ++-- .../field_type_reference/imagefield.md | 20 ++++++------ .../field_type_reference/integerfield.md | 2 +- .../field_type_reference/measurementfield.md | 6 ++-- .../field_type_reference/mediafield.md | 6 ++-- .../field_type_reference/relationfield.md | 9 +++--- .../field_type_reference/relationlistfield.md | 13 ++++---- .../field_type_reference/richtextfield.md | 4 +-- .../field_type_reference/selectionfield.md | 2 +- .../taxonomyentryassignmentfield.md | 3 +- .../taxonomyentryfield.md | 3 +- .../field_type_reference/textlinefield.md | 8 ++--- .../field_type_reference/urlfield.md | 2 +- .../field_types/form_and_template.md | 12 ++++--- .../file_management/file_management.md | 4 +-- .../images/configure_image_editor.md | 28 ++++++++-------- .../taxonomy/taxonomy_api.md | 4 +-- .../url_management/url_management.md | 2 +- .../workflow/add_custom_workflow_action.md | 2 +- .../background_tasks.md | 3 +- .../cache/http_cache/content_aware_cache.md | 14 ++++---- .../cache/http_cache/reverse_proxy.md | 2 +- .../languages/back_office_translations.md | 4 +-- .../siteaccess/injecting_siteaccess.md | 3 +- docs/permissions/custom_policies.md | 22 ++++++------- docs/resources/rector.md | 4 +-- .../logged_at_criterion.md | 2 +- .../object_criterion.md | 6 ++-- .../daterange_aggregation.md | 8 ++--- .../datetimerange_aggregation.md | 8 ++--- .../floatrange_aggregation.md | 8 ++--- .../integerrange_aggregation.md | 8 ++--- .../timerange_aggregation.md | 6 ++-- .../criteria_reference/ancestor_criterion.md | 9 ++++-- .../criteria_reference/baseprice_criterion.md | 10 +++--- .../checkboxattribute_criterion.md | 4 +-- .../colorattribute_criterion.md | 4 +-- .../criteria_reference/createdat_criterion.md | 7 ++-- .../createdatrange_criterion.md | 8 ++--- .../currencycode_criterion.md | 3 +- .../customprice_criterion.md | 13 +++++--- .../floatattribute_criterion.md | 4 +-- .../criteria_reference/image_criterion.md | 4 +-- .../imageorientation_criterion.md | 1 - .../integerattribute_criterion.md | 4 +-- .../iscurrencyenabled_criterion.md | 3 +- .../ismainlocation_criterion.md | 3 +- .../isproductbased_criterion.md | 4 +-- .../criteria_reference/isvirtual_criterion.md | 4 +-- .../languagecode_criterion.md | 11 ++++--- .../order_company_associated_criterion.md | 4 +-- .../order_company_name_criterion.md | 4 +-- .../order_created_criterion.md | 4 +-- .../order_currency_code_criterion.md | 4 +-- .../order_customer_name_criterion.md | 4 +-- .../order_identifier_criterion.md | 4 +-- .../order_owner_criterion.md | 18 ++++++----- .../order_price_criterion.md | 4 +-- .../order_source_criterion.md | 4 +-- .../order_status_criterion.md | 4 +-- .../parentlocationid_criterion.md | 3 +- .../payment_createdat_criterion.md | 4 +-- .../payment_currency_criterion.md | 3 +- .../payment_id_criterion.md | 3 +- .../payment_identifier_criterion.md | 3 +- .../payment_method_createdat_criterion.md | 4 +-- .../payment_method_enabled_criterion.md | 3 +- .../payment_method_id_criterion.md | 3 +- .../payment_method_identifier_criterion.md | 3 +- .../payment_method_name_criterion.md | 3 +- .../payment_method_type_criterion.md | 6 ++-- .../payment_method_updatedat_criterion.md | 4 +-- .../payment_order_criterion.md | 6 ++-- .../payment_payment_method_criterion.md | 6 ++-- .../payment_status_criterion.md | 3 +- .../payment_updatedat_criterion.md | 4 +-- .../price_currency_criterion.md | 7 ++-- .../price_customergroup_criterion.md | 7 ++-- .../price_isbaseprice_criterion.md | 4 +-- .../price_iscustomprice_criterion.md | 4 +-- .../price_logicaland_criterion.md | 12 ++++--- .../price_logicalor_criterion.md | 13 +++++--- .../price_product_criterion.md | 4 +-- .../productavailability_criterion.md | 4 +-- .../productcategory_criterion.md | 4 +-- .../productcode_criterion.md | 4 +-- .../productname_criterion.md | 4 +-- .../producttype_criterion.md | 4 +-- ...gemeasurementattributemaximum_criterion.md | 7 ++-- ...gemeasurementattributeminimum_criterion.md | 7 ++-- .../selectionattribute_criterion.md | 4 +-- .../shipment_createdat_criterion.md | 4 +-- .../shipment_currency_criterion.md | 4 +-- .../shipment_id_criterion.md | 4 +-- .../shipment_identifier_criterion.md | 4 +-- .../shipment_logicaland_criterion.md | 12 ++++--- .../shipment_logicalor_criterion.md | 12 ++++--- .../shipment_owner_criterion.md | 18 ++++++----- .../shipment_shipping_method_criterion.md | 7 ++-- .../shipment_status_criterion.md | 4 +-- .../shipment_updatedat_criterion.md | 4 +-- .../criteria_reference/sibling_criterion.md | 3 +- .../simplemeasurementattribute_criterion.md | 7 ++-- .../baseprice_sort_clause.md | 3 +- .../createdat_sort_clause.md | 5 +-- .../customprice_sort_clause.md | 3 +- .../order_created_sort_clause.md | 5 +-- .../order_id_sort_clause.md | 5 +-- .../order_status_sort_clause.md | 5 +-- .../order_updated_sort_clause.md | 5 +-- .../payment_createdat_sort_clause.md | 5 +-- .../payment_id_sort_clause.md | 5 +-- .../payment_identifier_sort_clause.md | 5 +-- .../payment_method_createdat_sort_clause.md | 5 +-- .../payment_method_enabled_sort_clause.md | 5 +-- .../payment_method_id_sort_clause.md | 5 +-- .../payment_method_identifier_sort_clause.md | 5 +-- .../payment_method_updatedat_sort_clause.md | 5 +-- .../payment_status_sort_clause.md | 5 +-- .../payment_updatedat_sort_clause.md | 5 +-- .../productavailability_sort_clause.md | 3 +- .../productcode_sort_clause.md | 3 +- .../productname_sort_clause.md | 3 +- .../shipment_createdat_sort_clause.md | 8 +++-- .../shipment_id_sort_clause.md | 8 +++-- .../shipment_identifier_sort_clause.md | 8 +++-- .../shipment_status_sort_clause.md | 8 +++-- .../shipment_updatedat_sort_clause.md | 8 +++-- .../recommendations_twig_functions.md | 3 +- .../urls_and_routes/custom_breadcrumbs.md | 2 +- .../5_display_a_list_of_content_items.md | 2 +- .../beginner_tutorial/7_embed_content.md | 4 +-- .../from_4.6/update_from_4.6.md | 2 +- .../from_4.6/update_to_5.0.md | 4 +-- docs/users/oauth_server.md | 4 +-- 154 files changed, 498 insertions(+), 400 deletions(-) diff --git a/docs/administration/back_office/back_office_elements/extending_thumbnails.md b/docs/administration/back_office/back_office_elements/extending_thumbnails.md index 0966ee8054..38b23bc098 100644 --- a/docs/administration/back_office/back_office_elements/extending_thumbnails.md +++ b/docs/administration/back_office/back_office_elements/extending_thumbnails.md @@ -93,8 +93,10 @@ class FieldValueUrl implements FieldTypeBasedThumbnailStrategy return 'ibexa_text'; } - public function getThumbnail(Field $field, ?VersionInfo $versionInfo = null): ?Thumbnail - { + public function getThumbnail( + Field $field, + ?VersionInfo $versionInfo = null + ): ?Thumbnail { return new Thumbnail([ 'resource' => $field->value, ]); diff --git a/docs/administration/back_office/back_office_menus/back_office_menus.md b/docs/administration/back_office/back_office_menus/back_office_menus.md index 0290c90c87..68f5ab6655 100644 --- a/docs/administration/back_office/back_office_menus/back_office_menus.md +++ b/docs/administration/back_office/back_office_menus/back_office_menus.md @@ -86,7 +86,7 @@ The following method adds a new menu section under **Content**, and under it, a You can also pass parameters to templates used to render menu items with `template_parameters`: ``` php -/** @var \Knp\Menu\ItemInterface $menu */ +/** @var ItemInterface $menu */ $menu->addChild( 'all_content_list', [ @@ -107,7 +107,7 @@ You can then use the variable `custom_parameter` in `templates/themes/admin/list To have translatable labels, use `translation.key` from the `messages` domain: ``` php -/** @var \Knp\Menu\ItemInterface $menu */ +/** @var ItemInterface $menu */ $menu->addChild( 'all_content_list', [ diff --git a/docs/administration/back_office/customize_calendar.md b/docs/administration/back_office/customize_calendar.md index b73e371334..e71d634c75 100644 --- a/docs/administration/back_office/customize_calendar.md +++ b/docs/administration/back_office/customize_calendar.md @@ -82,9 +82,10 @@ To add an in-memory collection as an event source, create `src/Calendar/Holidays ``` php use App\Calendar\Holidays\Event; + use App\Calendar\Holidays\EventType; use Ibexa\Contracts\Calendar\EventCollection; - /** @var \App\Calendar\Holidays\EventType $eventType */ + /** @var EventType $eventType */ $collection = new EventCollection([ new Event('Event 1', new DateTime('2024-01-01'), $eventType), new Event('Event 2', new DateTime('2024-01-02'), $eventType), diff --git a/docs/administration/back_office/notifications.md b/docs/administration/back_office/notifications.md index 352934598a..8676f791e2 100644 --- a/docs/administration/back_office/notifications.md +++ b/docs/administration/back_office/notifications.md @@ -26,7 +26,7 @@ There are four types of notifications: `info`, `success`, `warning` and `error`. To send a notification from PHP, inject the `TranslatableNotificationHandlerInterface` into your class. ``` php -/** @var \Ibexa\Contracts\AdminUi\Notification\TranslatableNotificationHandlerInterface $notificationHandler */ +/** @var TranslatableNotificationHandlerInterface $notificationHandler */ $notificationHandler->info( /** @Desc("Notification text") */ 'example.notification.text', diff --git a/docs/administration/configuration/configuration.md b/docs/administration/configuration/configuration.md index 064d8ac3e4..2a99fd12f5 100644 --- a/docs/administration/configuration/configuration.md +++ b/docs/administration/configuration/configuration.md @@ -74,7 +74,7 @@ parameters: ``` php // Usage inside a controller -/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */ +/** @var ContainerInterface $container */ $myParameter = $container->getParameter('myapp.parameter.name'); ``` diff --git a/docs/administration/configuration/dynamic_configuration.md b/docs/administration/configuration/dynamic_configuration.md index c5ebd43fe3..df5b1ee9ef 100644 --- a/docs/administration/configuration/dynamic_configuration.md +++ b/docs/administration/configuration/dynamic_configuration.md @@ -84,9 +84,7 @@ use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; class Service { - public function __construct(private readonly ConfigResolverInterface $configResolver) - { - } + public function __construct(private readonly ConfigResolverInterface $configResolver) {} public function someMethodThatNeedConfig(): void { diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index dddcccebe1..5839c248d3 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -327,6 +327,7 @@ final class CustomRepositoryConfigParser implements RepositoryConfigParserInterf You need to register this configuration extension in the following way: ``` php +use Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; @@ -336,7 +337,7 @@ final class AcmeFeatureBundle extends Bundle { // ... - /** @var Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension $kernel */ + /** @var IbexaCoreExtension $kernel */ $kernel = $container->getExtension('ibexa'); $kernel->addRepositoryConfigParser(new CustomRepositoryConfigParser()); } @@ -346,6 +347,6 @@ final class AcmeFeatureBundle extends Bundle To access the configuration settings, use the `Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider::getRepositoryConfig` method: ``` php -/** @var \Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface $repositoryConfigProvider */ +/** @var RepositoryConfigurationProviderInterface $repositoryConfigProvider */ $acmeConfig = $repositoryConfigProvider->getRepositoryConfig()['acme']; ``` diff --git a/docs/ai/ai_actions/configure_ai_actions.md b/docs/ai/ai_actions/configure_ai_actions.md index 5e1eccbf1b..269d584301 100644 --- a/docs/ai/ai_actions/configure_ai_actions.md +++ b/docs/ai/ai_actions/configure_ai_actions.md @@ -108,7 +108,7 @@ Then, if not using Symfony Flex, enable the bundle in `config/bundles.php`: ``` php return [ // ... - Ibexa\Bundle\ConnectorGemini\IbexaConnectorGeminiBundle::class => ['all' => true], + IbexaConnectorGeminiBundle::class => ['all' => true], ]; ``` diff --git a/docs/commerce/cart/cart_api.md b/docs/commerce/cart/cart_api.md index 1b89eec34e..d466b6c9dd 100644 --- a/docs/commerce/cart/cart_api.md +++ b/docs/commerce/cart/cart_api.md @@ -65,14 +65,17 @@ To update cart metadata, use the `CartServiceInterface::updateCartMetadata` meth You can also use this method to change cart ownership: ``` php +use Ibexa\Contracts\Cart\CartServiceInterface; +use Ibexa\Contracts\Cart\Value\CartInterface; use Ibexa\Contracts\Cart\Value\CartMetadataUpdateStruct; +use Ibexa\Contracts\Core\Repository\UserService; // ... /** - * @var \Ibexa\Contracts\Core\Repository\UserService $userService - * @var \Ibexa\Contracts\Cart\CartServiceInterface $cartService - * @var \Ibexa\Contracts\Cart\Value\CartInterface $cart + * @var UserService $userService + * @var CartServiceInterface $cartService + * @var CartInterface $cart */ $updateMetadataStruct = new CartMetadataUpdateStruct(); $updateMetadataStruct->setOwner($userService->loadUserByLogin('user')); @@ -156,12 +159,13 @@ It can include any relevant information that you want to associate with a partic To add context data to a cart, follow this example: ``` php +use Ibexa\Contracts\Cart\CartServiceInterface; use Ibexa\Contracts\Cart\Value\CartCreateStruct; use Ibexa\Contracts\Core\Collection\ArrayMap; use Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface; /** - * @var \Ibexa\Contracts\Cart\CartServiceInterface $cartService + * @var CartServiceInterface $cartService * @var CurrencyInterface $currency */ $createStruct = new CartCreateStruct('My Cart', $currency); @@ -180,13 +184,15 @@ You also add "X1MF7699" coupon code as context data to the cart. To attach context data to a cart entry, proceed as follows: ``` php +use Ibexa\Contracts\Cart\CartServiceInterface; +use Ibexa\Contracts\Cart\Value\CartInterface; use Ibexa\Contracts\Cart\Value\EntryAddStruct; use Ibexa\Contracts\Core\Collection\ArrayMap; use Ibexa\ProductCatalog\Local\Repository\Values\Product; /** - * @var \Ibexa\Contracts\Cart\CartServiceInterface $cartService - * @var \Ibexa\Contracts\Cart\Value\CartInterface $cart + * @var CartServiceInterface $cartService + * @var CartInterface $cart * @var Product $product */ $entryAddStruct = new EntryAddStruct($product); @@ -194,7 +200,7 @@ $entryAddStruct->setContext(new ArrayMap([ 'tshirt_text' => 'EqEqEqEq', ])); - $cartService->addEntry($cart, $entryAddStruct); +$cartService->addEntry($cart, $entryAddStruct); ``` In the above example, you create a cart entry by using the `EntryAddStruct` method. diff --git a/docs/commerce/shopping_list/install_shopping_list.md b/docs/commerce/shopping_list/install_shopping_list.md index 3238f3982e..9ce2a3bafa 100644 --- a/docs/commerce/shopping_list/install_shopping_list.md +++ b/docs/commerce/shopping_list/install_shopping_list.md @@ -21,7 +21,7 @@ Check that the following line has been added by the recipe to `config/bundles.ph ``` php return [ // ... - Ibexa\Bundle\ShoppingList\IbexaShoppingListBundle::class => ['all' => true], + IbexaShoppingListBundle::class => ['all' => true], ]; ``` diff --git a/docs/content_management/collaborative_editing/configure_collaborative_editing.md b/docs/content_management/collaborative_editing/configure_collaborative_editing.md index b96b50a217..cad6c0b566 100644 --- a/docs/content_management/collaborative_editing/configure_collaborative_editing.md +++ b/docs/content_management/collaborative_editing/configure_collaborative_editing.md @@ -29,8 +29,8 @@ Then, if not using Symfony Flex, add the following code to the `config/bundles.p return [ // A lot of bundles… - Ibexa\Bundle\FieldTypeRichTextRTE\IbexaFieldTypeRichTextRTEBundle::class => ['all' => true], - Ibexa\Bundle\CkeditorPremium\IbexaCkeditorPremiumBundle::class => ['all' => true], + IbexaFieldTypeRichTextRTEBundle::class => ['all' => true], + IbexaCkeditorPremiumBundle::class => ['all' => true], ]; ``` diff --git a/docs/content_management/content_api/browsing_content.md b/docs/content_management/content_api/browsing_content.md index 5f726dd949..a3da25442e 100644 --- a/docs/content_management/content_api/browsing_content.md +++ b/docs/content_management/content_api/browsing_content.md @@ -115,8 +115,8 @@ You can also specify the version number as the second argument to get Relations ``` php /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var ContentInfo $contentInfo + * @var ContentService $contentService */ $versionInfo = $contentService->loadVersionInfo($contentInfo, 2); ``` @@ -187,7 +187,7 @@ To load a specific language, provide its language code when loading the content ``` php /** * @var int $contentId - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var ContentService $contentService */ $content = $contentService->loadContent($contentId, ['ger-DE']); ``` @@ -195,11 +195,13 @@ $content = $contentService->loadContent($contentId, ['ger-DE']); To load all languages as a prioritized list, use `Language::ALL`: ``` php +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\Language; /** - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content + * @var ContentService $contentService + * @var Content $content */ $contentService->loadContent($content->id, Language::ALL); ``` @@ -228,7 +230,7 @@ You can do it through the `getMainLocation` method of the ContentInfo object. Next, use the `getParentLocation` method of the location object to access the parent location: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ +/** @var ContentInfo $contentInfo */ $mainLocation = $contentInfo->getMainLocation(); $parentLocation = $mainLocation?->getParentLocation(); if ($parentLocation !== null) { @@ -253,11 +255,11 @@ For example, to get the comparison between the `name` field of two versions: ``` php /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo + * @var ContentInfo $contentInfo * @var int $versionFromId * @var int $versionToId - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\VersionComparison\Service\VersionComparisonServiceInterface $comparisonService + * @var ContentService $contentService + * @var VersionComparisonServiceInterface $comparisonService */ $versionFrom = $contentService->loadVersionInfo($contentInfo, $versionFromId); $versionTo = $contentService->loadVersionInfo($contentInfo, $versionToId); diff --git a/docs/content_management/content_api/creating_content.md b/docs/content_management/content_api/creating_content.md index 55c3ee89c1..284539b466 100644 --- a/docs/content_management/content_api/creating_content.md +++ b/docs/content_management/content_api/creating_content.md @@ -104,8 +104,8 @@ You can delete a single translation from a content item's version using [`Conten The method must be provided with a `VersionInfo` object and the code of the language to delete: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo */ +/** @var VersionInfo $versionInfo */ $languageCode = 'ger-DE'; -/** @var \Ibexa\Contracts\Core\Repository\ContentService $contentService */ +/** @var ContentService $contentService */ $contentService->deleteTranslationFromDraft($versionInfo, $languageCode); ``` diff --git a/docs/content_management/content_api/managing_content.md b/docs/content_management/content_api/managing_content.md index 2a05e068d3..461a1f652c 100644 --- a/docs/content_management/content_api/managing_content.md +++ b/docs/content_management/content_api/managing_content.md @@ -118,9 +118,9 @@ You can also provide a different location to restore in as a second argument: ``` php /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem $trashItem - * @var \Ibexa\Contracts\Core\Repository\LocationService $locationService - * @var \Ibexa\Contracts\Core\Repository\TrashService $trashService + * @var TrashItem $trashItem + * @var LocationService $locationService + * @var TrashService $trashService */ $locationId = 12345; $newParent = $locationService->loadLocation($locationId); diff --git a/docs/content_management/field_types/field_type_reference/authorfield.md b/docs/content_management/field_types/field_type_reference/authorfield.md index e43d8432e3..38295289f8 100644 --- a/docs/content_management/field_types/field_type_reference/authorfield.md +++ b/docs/content_management/field_types/field_type_reference/authorfield.md @@ -22,16 +22,16 @@ Example: use Ibexa\Core\FieldType\Author; $authorList = new Author\Value([ - new Author\Author([ - 'id' => 1, - 'name' => 'Boba Fett', - 'email' => 'boba.fett@example.com', - ]), - new Author\Author([ - 'id' => 2, - 'name' => 'Darth Vader', - 'email' => 'darth.vader@example.com', - ]), + new Author\Author([ + 'id' => 1, + 'name' => 'Boba Fett', + 'email' => 'boba.fett@example.com', + ]), + new Author\Author([ + 'id' => 2, + 'name' => 'Darth Vader', + 'email' => 'darth.vader@example.com', + ]), ]); ``` @@ -44,14 +44,14 @@ Example ``` php [ [ - 'id' => 1, - 'name' => 'Boba Fett', - 'email' => 'boba.fett@example.com', + 'id' => 1, + 'name' => 'Boba Fett', + 'email' => 'boba.fett@example.com', ], [ - 'id' => 2, - 'name' => 'Darth Vader', - 'email' => 'darth.vader@example.com', + 'id' => 2, + 'name' => 'Darth Vader', + 'email' => 'darth.vader@example.com', ], ]; ``` diff --git a/docs/content_management/field_types/field_type_reference/binaryfilefield.md b/docs/content_management/field_types/field_type_reference/binaryfilefield.md index 0d3d48903a..534185edaf 100644 --- a/docs/content_management/field_types/field_type_reference/binaryfilefield.md +++ b/docs/content_management/field_types/field_type_reference/binaryfilefield.md @@ -47,8 +47,8 @@ The hash format mostly matches the value object. It has the following keys: Example: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct $fileContentCreateStruct */ -$fileContentCreateStruct->setField('file', new Ibexa\Core\FieldType\BinaryFile\Value([ +/** @var ContentCreateStruct $fileContentCreateStruct */ +$fileContentCreateStruct->setField('file', new Value([ 'fileName' => 'example.pdf', 'inputUri' => '/tmp/example_for_website.pdf', ])); diff --git a/docs/content_management/field_types/field_type_reference/countryfield.md b/docs/content_management/field_types/field_type_reference/countryfield.md index 7acea36ab3..04d2301a2b 100644 --- a/docs/content_management/field_types/field_type_reference/countryfield.md +++ b/docs/content_management/field_types/field_type_reference/countryfield.md @@ -51,7 +51,7 @@ It's also available when setting value on the content field, by setting the valu ``` php // Value object content example -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ +/** @var Content $content */ $content->fields['countries'] = ['JP', 'NO']; ``` @@ -69,7 +69,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var \Ibexa\Core\FieldType\Country\Value $value */ +/** @var Value $value */ $value->countries = [ 'JP' => [ 'Name' => 'Japan', diff --git a/docs/content_management/field_types/field_type_reference/dateandtimefield.md b/docs/content_management/field_types/field_type_reference/dateandtimefield.md index 47baf267e9..34d08f511e 100644 --- a/docs/content_management/field_types/field_type_reference/dateandtimefield.md +++ b/docs/content_management/field_types/field_type_reference/dateandtimefield.md @@ -91,6 +91,7 @@ Following `defaultType` default value options are available as constants in the ``` php // DateAndTime FieldType example settings +use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Core\FieldType\DateAndTime\Type; $settings = [ @@ -99,7 +100,7 @@ $settings = [ 'dateInterval' => null, ]; -/** @var \Ibexa\Contracts\Core\Repository\ContentTypeService $contentTypeService */ +/** @var ContentTypeService $contentTypeService */ $dateAndTimeFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct( 'my_date_and_time_field', 'ibexa_datetime' diff --git a/docs/content_management/field_types/field_type_reference/floatfield.md b/docs/content_management/field_types/field_type_reference/floatfield.md index b8f36d8faa..9159fb1489 100644 --- a/docs/content_management/field_types/field_type_reference/floatfield.md +++ b/docs/content_management/field_types/field_type_reference/floatfield.md @@ -64,7 +64,7 @@ This field type supports `FloatValueValidator`, defining maximum and minimum flo ``` php // Validator configuration example in PHP -/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ +/** @var Repository $repository */ $contentTypeService = $repository->getContentTypeService(); $floatFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('float', 'ibexa_float'); diff --git a/docs/content_management/field_types/field_type_reference/imageassetfield.md b/docs/content_management/field_types/field_type_reference/imageassetfield.md index f32fcff453..266c853565 100644 --- a/docs/content_management/field_types/field_type_reference/imageassetfield.md +++ b/docs/content_management/field_types/field_type_reference/imageassetfield.md @@ -33,8 +33,8 @@ Value object of `ibexa_image_asset` contains the following properties: /** * Value object content example. * - * @var \Ibexa\Core\FieldType\ImageAsset\Value $imageAssetValue - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo + * @var Value $imageAssetValue + * @var ContentInfo $contentInfo */ $imageAssetValue->destinationContentId = $contentInfo->id; $imageAssetValue->alternativeText = 'Picture of an apple.'; @@ -48,9 +48,10 @@ It expects an ID of a content item representing asset and the alternative text. ``` php // Constructor example +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Core\FieldType\ImageAsset as ImageAsset; -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ +/** @var ContentInfo $contentInfo */ // Instantiates a ImageAsset Value object $imageAssetValue = new ImageAsset\Value($contentInfo->id, 'Picture of an apple.'); ``` diff --git a/docs/content_management/field_types/field_type_reference/imagefield.md b/docs/content_management/field_types/field_type_reference/imagefield.md index ad9ea71866..332fbb7d1a 100644 --- a/docs/content_management/field_types/field_type_reference/imagefield.md +++ b/docs/content_management/field_types/field_type_reference/imagefield.md @@ -151,9 +151,9 @@ It expects a VersionInfo, the Image field, and the variation name as a string (` ``` php /** - * @var \Ibexa\Contracts\Core\Variation\VariationHandler $imageVariationHandler - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Field $imageField - * @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo + * @var VariationHandler $imageVariationHandler + * @var Field $imageField + * @var VersionInfo $versionInfo */ $variation = $imageVariationHandler->getVariation( $imageField, @@ -173,8 +173,8 @@ For an Image, the quickest is to call `setField()` on the ContentStruct: ``` php /** - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\Core\Repository\ContentTypeService $contentTypeService + * @var ContentService $contentService + * @var ContentTypeService $contentTypeService */ $createStruct = $contentService->newContentCreateStruct( $contentTypeService->loadContentTypeByIdentifier('image'), @@ -189,15 +189,15 @@ For that, you can use the `Image\Value::fromString()` method that accepts the pa ``` php /** - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\Core\Repository\ContentTypeService $contentTypeService + * @var ContentService $contentService + * @var ContentTypeService $contentTypeService */ $createStruct = $contentService->newContentCreateStruct( $contentTypeService->loadContentTypeByIdentifier('image'), 'eng-GB' ); -$imageField = \Ibexa\Core\FieldType\Image\Value::fromString('/tmp/image.png'); +$imageField = Value::fromString('/tmp/image.png'); $imageField->alternativeText = 'My alternative text'; $createStruct->setField('image', $imageField); ``` @@ -205,8 +205,8 @@ $createStruct->setField('image', $imageField); You can also provide a hash of `Image\Value` properties, either to `setField()`, or to the constructor: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct $createStruct */ -$imageValue = new \Ibexa\Core\FieldType\Image\Value( +/** @var ContentCreateStruct $createStruct */ +$imageValue = new Value( [ 'id' => '/tmp/image.png', 'fileSize' => 37931, diff --git a/docs/content_management/field_types/field_type_reference/integerfield.md b/docs/content_management/field_types/field_type_reference/integerfield.md index 1315514313..26c4692b59 100644 --- a/docs/content_management/field_types/field_type_reference/integerfield.md +++ b/docs/content_management/field_types/field_type_reference/integerfield.md @@ -26,7 +26,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var \Ibexa\Core\FieldType\Integer\Value $integer */ +/** @var Value $integer */ $integer->value = 8; ``` diff --git a/docs/content_management/field_types/field_type_reference/measurementfield.md b/docs/content_management/field_types/field_type_reference/measurementfield.md index 5a16c7dabd..a0b1dcaac6 100644 --- a/docs/content_management/field_types/field_type_reference/measurementfield.md +++ b/docs/content_management/field_types/field_type_reference/measurementfield.md @@ -45,9 +45,10 @@ Depending on the selected input type, the object resembles the following example ``` php // Simple input (single value) example +use Ibexa\Contracts\Measurement\MeasurementServiceInterface; use Ibexa\Measurement\FieldType\MeasurementValue; -/** @var \Ibexa\Contracts\Measurement\MeasurementServiceInterface $measurementService */ +/** @var MeasurementServiceInterface $measurementService */ // Instantiates a Measurement Value object $measurementValue = new MeasurementValue( @@ -62,9 +63,10 @@ $measurementValue = new MeasurementValue( ``` php // Range input value example +use Ibexa\Contracts\Measurement\MeasurementServiceInterface; use Ibexa\Measurement\FieldType\MeasurementValue; -/** @var \Ibexa\Contracts\Measurement\MeasurementServiceInterface $measurementService */ +/** @var MeasurementServiceInterface $measurementService */ // Instantiates a Measurement Value object $measurementValue = new MeasurementValue( diff --git a/docs/content_management/field_types/field_type_reference/mediafield.md b/docs/content_management/field_types/field_type_reference/mediafield.md index d29074113e..4c4e3fbecc 100644 --- a/docs/content_management/field_types/field_type_reference/mediafield.md +++ b/docs/content_management/field_types/field_type_reference/mediafield.md @@ -74,9 +74,10 @@ The field type supports `FileSizeValidator`, defining maximum size of media file ``` php // Example of using Media field type validator in PHP +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Core\FieldType\Media\Type; -/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ +/** @var Repository $repository */ $contentTypeService = $repository->getContentTypeService(); $mediaFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('media', 'ibexa_media'); @@ -111,9 +112,10 @@ List of all available `mediaType` constants is defined in the `Ibexa\Core\FieldT ``` php // Example of using Media field type settings in PHP +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Core\FieldType\Media\Type; -/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ +/** @var Repository $repository */ $contentTypeService = $repository->getContentTypeService(); $mediaFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('media', 'ibexa_media'); diff --git a/docs/content_management/field_types/field_type_reference/relationfield.md b/docs/content_management/field_types/field_type_reference/relationfield.md index 78be9fe561..d9f2016d2f 100644 --- a/docs/content_management/field_types/field_type_reference/relationfield.md +++ b/docs/content_management/field_types/field_type_reference/relationfield.md @@ -29,8 +29,8 @@ The Value class of this field type contains the following properties: /** * Value object content example. * - * @var \Ibexa\Core\FieldType\Relation\Value $relation - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo + * @var Value $relation + * @var ContentInfo $contentInfo */ $relation->destinationContentId = $contentInfo->id; ``` @@ -41,9 +41,10 @@ The `Relation\Value` constructor initializes a new value object with the value p ``` php // Constructor example +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Core\FieldType\Relation as Relation; -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ +/** @var ContentInfo $contentInfo */ // Instantiates a Relation Value object $relationValue = new Relation\Value($contentInfo->id); ``` @@ -65,8 +66,6 @@ The field definition of this field type can be configured with three options: ``` php // Relation FieldType example settings -use Ibexa\Core\FieldType\Relation\Type; - $settings = [ 'selectionMethod' => 1, 'selectionRoot' => null, diff --git a/docs/content_management/field_types/field_type_reference/relationlistfield.md b/docs/content_management/field_types/field_type_reference/relationlistfield.md index a658f28868..bd93d4bdc4 100644 --- a/docs/content_management/field_types/field_type_reference/relationlistfield.md +++ b/docs/content_management/field_types/field_type_reference/relationlistfield.md @@ -31,9 +31,9 @@ This field type makes it possible to store and retrieve values of a relation to /** * Value object content example. * - * @var \Ibexa\Core\FieldType\RelationList\Value $relationList - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo1 - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo2 + * @var Value $relationList + * @var ContentInfo $contentInfo1 + * @var ContentInfo $contentInfo2 */ $relationList->destinationContentIds = [ $contentInfo1->id, @@ -49,11 +49,12 @@ It expects a mixed array as value. ``` php //Constructor example +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Core\FieldType\RelationList as RelationList; /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo1 - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo2 + * @var ContentInfo $contentInfo1 + * @var ContentInfo $contentInfo2 */ // Instantiates a RelationList Value object $relationListValue = new RelationList\Value( @@ -110,7 +111,7 @@ $fieldSettings = [ 'selectionMethod' => Type::SELECTION_BROWSE, 'selectionDefaultLocation' => null, 'selectionContentTypes' => [], - ]; +]; $validators = [ 'RelationListValueValidator' => [ diff --git a/docs/content_management/field_types/field_type_reference/richtextfield.md b/docs/content_management/field_types/field_type_reference/richtextfield.md index 1c91af55ab..c0032c4eb3 100644 --- a/docs/content_management/field_types/field_type_reference/richtextfield.md +++ b/docs/content_management/field_types/field_type_reference/richtextfield.md @@ -72,8 +72,8 @@ The following example shows how to pass DocBook content to a [create struct](cre ``` php /** - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType $contentType + * @var ContentService $contentService + * @var ContentType $contentType */ $contentCreateStruct = $contentService->newContentCreateStruct($contentType, 'eng-GB'); diff --git a/docs/content_management/field_types/field_type_reference/selectionfield.md b/docs/content_management/field_types/field_type_reference/selectionfield.md index 8d76e61b6e..f11d67084f 100644 --- a/docs/content_management/field_types/field_type_reference/selectionfield.md +++ b/docs/content_management/field_types/field_type_reference/selectionfield.md @@ -27,7 +27,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content examples -/** @var \Ibexa\Core\FieldType\Selection\Value $value */ +/** @var Value $value */ // Single selection $value->selection = [1]; diff --git a/docs/content_management/field_types/field_type_reference/taxonomyentryassignmentfield.md b/docs/content_management/field_types/field_type_reference/taxonomyentryassignmentfield.md index cef649394c..ed3076874d 100644 --- a/docs/content_management/field_types/field_type_reference/taxonomyentryassignmentfield.md +++ b/docs/content_management/field_types/field_type_reference/taxonomyentryassignmentfield.md @@ -26,11 +26,12 @@ Example using an `Ibexa\Taxonomy\FieldType\TaxonomyEntryAssignment\Value` object ``` php use Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface; +use Ibexa\Taxonomy\FieldType\TaxonomyEntryAssignment\Value; /** @var TaxonomyServiceInterface $taxonomyService */ $taxonomyEntry1 = $taxonomyService->loadEntryByIdentifier('example_entry', 'tags'); $taxonomyEntry2 = $taxonomyService->loadEntryByIdentifier('example_entry_2', 'tags'); -new \Ibexa\Taxonomy\FieldType\TaxonomyEntryAssignment\Value( +new Value( [ $taxonomyEntry1, $taxonomyEntry2, diff --git a/docs/content_management/field_types/field_type_reference/taxonomyentryfield.md b/docs/content_management/field_types/field_type_reference/taxonomyentryfield.md index fe4ddd7513..fa7009d41b 100644 --- a/docs/content_management/field_types/field_type_reference/taxonomyentryfield.md +++ b/docs/content_management/field_types/field_type_reference/taxonomyentryfield.md @@ -20,10 +20,11 @@ Example using an `Ibexa\Taxonomy\FieldType\TaxonomyEntry\Value` object: ``` php use Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface; +use Ibexa\Taxonomy\FieldType\TaxonomyEntry\Value; /** @var TaxonomyServiceInterface $taxonomyService */ $taxonomyEntry = $taxonomyService->loadEntryByIdentifier('example_entry', 'tags'); -$taxonomyEntryField = new \Ibexa\Taxonomy\FieldType\TaxonomyEntry\Value($taxonomyEntry); +$taxonomyEntryField = new Value($taxonomyEntry); ``` Example using array: diff --git a/docs/content_management/field_types/field_type_reference/textlinefield.md b/docs/content_management/field_types/field_type_reference/textlinefield.md index abb5912f8c..532fe18e79 100644 --- a/docs/content_management/field_types/field_type_reference/textlinefield.md +++ b/docs/content_management/field_types/field_type_reference/textlinefield.md @@ -37,9 +37,9 @@ To set the validation properties, the `validateValidatorConfiguration()` method ``` php [ - 'StringLengthValidator' => [ - 'maxStringLength' => 60, - 'minStringLength' => 1, - ], + 'StringLengthValidator' => [ + 'maxStringLength' => 60, + 'minStringLength' => 1, + ], ]; ``` diff --git a/docs/content_management/field_types/field_type_reference/urlfield.md b/docs/content_management/field_types/field_type_reference/urlfield.md index 9aae6a0c60..5e91eb9e9f 100644 --- a/docs/content_management/field_types/field_type_reference/urlfield.md +++ b/docs/content_management/field_types/field_type_reference/urlfield.md @@ -30,7 +30,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var \Ibexa\Core\FieldType\Url\Value $url */ +/** @var Value $url */ $url->link = 'https://www.ibexa.co'; $url->text = 'Ibexa'; ``` diff --git a/docs/content_management/field_types/form_and_template.md b/docs/content_management/field_types/form_and_template.md index d9acec0e91..d4a40bb31f 100644 --- a/docs/content_management/field_types/form_and_template.md +++ b/docs/content_management/field_types/form_and_template.md @@ -32,8 +32,10 @@ use Symfony\Component\Form\FormInterface; class MyMapper implements FieldValueFormMapperInterface { /** @param FormInterface $fieldForm */ - public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void - { + public function mapFieldValueForm( + FormInterface $fieldForm, + FieldData $data + ): void { $fieldDefinition = $data->getFieldDefinition(); $formConfig = $fieldForm->getConfig(); @@ -78,8 +80,10 @@ use Symfony\Component\Form\FormInterface; class MyMapper implements FieldDefinitionFormMapperInterface { /** @param FormInterface $fieldDefinitionForm */ - public function mapFieldDefinitionForm(FormInterface $fieldDefinitionForm, FieldDefinitionData $data): void - { + public function mapFieldDefinitionForm( + FormInterface $fieldDefinitionForm, + FieldDefinitionData $data + ): void { $fieldDefinitionForm ->add( 'isMultiple', diff --git a/docs/content_management/file_management/file_management.md b/docs/content_management/file_management/file_management.md index f2cd924f12..2c0c0e8c22 100644 --- a/docs/content_management/file_management/file_management.md +++ b/docs/content_management/file_management/file_management.md @@ -10,8 +10,8 @@ To access binary files from the PHP API, use the `Ibexa\Core\IO\IOServiceInterfa ``` php /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Field $field - * @var \Ibexa\Core\IO\IOServiceInterface $ioService + * @var Field $field + * @var IOServiceInterface $ioService */ $file = $ioService->loadBinaryFile($field->value->id); $fileContent = $ioService->getFileContents($file); diff --git a/docs/content_management/images/configure_image_editor.md b/docs/content_management/images/configure_image_editor.md index ebbca8eed9..01614bc6e1 100644 --- a/docs/content_management/images/configure_image_editor.md +++ b/docs/content_management/images/configure_image_editor.md @@ -71,18 +71,18 @@ To modify the value of additional information programmatically, you can set a va use Ibexa\Core\FieldType\Image\Value as FieldValue; $value = new FieldValue([ - 'data' => [ - 'width' => '100', - 'height' => '200', - 'alternativeText' => 'test', - 'mime' => 'image/png', - 'id' => 1, - 'fileName' => 'image.png', - 'additionalData' => [ - 'focalPointX' => 50, - 'focalPointY' => 100, - 'author' => 'John Smith', - ], - ], - ]); + 'data' => [ + 'width' => '100', + 'height' => '200', + 'alternativeText' => 'test', + 'mime' => 'image/png', + 'id' => 1, + 'fileName' => 'image.png', + 'additionalData' => [ + 'focalPointX' => 50, + 'focalPointY' => 100, + 'author' => 'John Smith', + ], + ], +]); ``` diff --git a/docs/content_management/taxonomy/taxonomy_api.md b/docs/content_management/taxonomy/taxonomy_api.md index 3956d093ca..696c57d015 100644 --- a/docs/content_management/taxonomy/taxonomy_api.md +++ b/docs/content_management/taxonomy/taxonomy_api.md @@ -22,8 +22,8 @@ and use `TaxonomyServiceInterface::loadEntryByIdentifier()`: A taxonomy entry identifier is unique per taxonomy. If you have [several taxonomies](taxonomy.md#customize-taxonomy-structure), you can increase code readability by always passing the taxonomy identifier even when it's the default one. The default taxonomy is `tags` if it exists, else the first configured taxonomy (see `\Ibexa\Taxonomy\Service\TaxonomyConfiguration::getDefaultTaxonomyName` for details). ``` php /** - * @var array $springs - * @var \Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface $taxonomyService + * @var array $springs + * @var TaxonomyServiceInterface $taxonomyService */ $springs[] = $taxonomyService->loadEntryByIdentifier('spring', 'tags'); $springs[] = $taxonomyService->loadEntryByIdentifier('spring', 'events'); diff --git a/docs/content_management/url_management/url_management.md b/docs/content_management/url_management/url_management.md index 628535126c..cc4c8569be 100644 --- a/docs/content_management/url_management/url_management.md +++ b/docs/content_management/url_management/url_management.md @@ -213,7 +213,7 @@ The **URL wildcards** tab contains all the information about each URL wildcard. You can create URL wildcards with the public PHP API by using the `URLWildcardService` service: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ +/** @var Repository $repository */ $source = 'pictures/*/*'; $destination = 'media/images/{1}/{2}'; $redirect = true; diff --git a/docs/content_management/workflow/add_custom_workflow_action.md b/docs/content_management/workflow/add_custom_workflow_action.md index 4fe26b1534..93f78895d4 100644 --- a/docs/content_management/workflow/add_custom_workflow_action.md +++ b/docs/content_management/workflow/add_custom_workflow_action.md @@ -83,7 +83,7 @@ For example, you can override the message typed by the user: ``` php /** * @var array $context - * @var \Symfony\Component\Workflow\Event\TransitionEvent $event + * @var TransitionEvent $event */ $new_context = $context; $new_context['message'] = 'This article went through proofreading'; diff --git a/docs/infrastructure_and_maintenance/background_tasks.md b/docs/infrastructure_and_maintenance/background_tasks.md index 534832b4d8..9333aecda0 100644 --- a/docs/infrastructure_and_maintenance/background_tasks.md +++ b/docs/infrastructure_and_maintenance/background_tasks.md @@ -125,8 +125,7 @@ final readonly class SomeClassThatSchedulesExecutionInTheBackground { public function __construct( private MessageBusInterface $bus - ) { - } + ) {} public function schedule(): void { diff --git a/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md b/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md index 677f2e02a7..372a95cc80 100644 --- a/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md +++ b/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md @@ -173,9 +173,9 @@ Examples for adding specific content tags using the autowireable `ContentTagInte ``` php /** - * @var \Ibexa\Contracts\HttpCache\Handler\ContentTagInterface $tagHandler - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location + * @var ContentTagInterface $tagHandler + * @var Content $content + * @var Location $location */ // Example for tagging everything needed for Content: @@ -196,9 +196,10 @@ In PHP, FOSHttpCache exposes the `fos_http_cache.http.symfony_response_tagger` s The following example adds minimal tags when ID 33 and 34 are rendered in ESI, but parent response needs these tags to get refreshed if they're deleted: ``` php +use FOS\HttpCacheBundle\Http\SymfonyResponseTagger; use Ibexa\Contracts\HttpCache\Handler\ContentTagInterface; -/** @var \FOS\HttpCacheBundle\Http\SymfonyResponseTagger $responseTagger */ +/** @var SymfonyResponseTagger $responseTagger */ $responseTagger->addTags([ContentTagInterface::RELATION_PREFIX . '33', ContentTagInterface::RELATION_PREFIX . '34']); ``` @@ -210,7 +211,7 @@ For custom or built-in controllers (for example, REST) that still use `X-Locatio It supports singular and comma-separated location ID value(s): ``` php -/** @var \Symfony\Component\HttpFoundation\Response $response */ +/** @var Response $response */ $response->headers->set('X-Location-Id', '123'); // Alternatively using several Location ID values @@ -342,8 +343,7 @@ class MyCustomCacheCommand public function __construct( #[Autowire(service: 'ibexa.http_cache.purge_client')] private readonly PurgeClientInterface $purgeClient - ) { - } + ) {} public function __invoke(SymfonyStyle $io): int { diff --git a/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md b/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md index 8e0d6ac9ae..d2aab3f0ae 100644 --- a/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md +++ b/docs/infrastructure_and_maintenance/cache/http_cache/reverse_proxy.md @@ -93,7 +93,7 @@ framework: ``` php use Symfony\Component\HttpFoundation\Request; - /** @var \Symfony\Component\HttpFoundation\Request $request */ + /** @var Request $request */ Request::setTrustedProxies([$request->server->get('REMOTE_ADDR')], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_PORT); ``` diff --git a/docs/multisite/languages/back_office_translations.md b/docs/multisite/languages/back_office_translations.md index c861234a38..35e836121b 100644 --- a/docs/multisite/languages/back_office_translations.md +++ b/docs/multisite/languages/back_office_translations.md @@ -64,9 +64,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; final readonly class MyService { - public function __construct(private TranslatorInterface $translator) - { - } + public function __construct(private TranslatorInterface $translator) {} public function getTranslatedDescription(): string { diff --git a/docs/multisite/siteaccess/injecting_siteaccess.md b/docs/multisite/siteaccess/injecting_siteaccess.md index cdf32cdb28..c075d34fb0 100644 --- a/docs/multisite/siteaccess/injecting_siteaccess.md +++ b/docs/multisite/siteaccess/injecting_siteaccess.md @@ -31,7 +31,6 @@ class MyService public function __construct( private readonly SiteAccessServiceInterface $siteAccessService, private readonly ContentService $contentService - ) { - } + ) {} } ``` diff --git a/docs/permissions/custom_policies.md b/docs/permissions/custom_policies.md index dc05fdb88d..a66db69362 100644 --- a/docs/permissions/custom_policies.md +++ b/docs/permissions/custom_policies.md @@ -53,11 +53,11 @@ class MyPolicyProvider implements PolicyProviderInterface public function addPolicies(ConfigBuilderInterface $configBuilder): void { $configBuilder->addConfig([ - 'custom_module' => [ - 'custom_function_1' => null, - 'custom_function_2' => ['CustomLimitation'], - ], - ]); + 'custom_module' => [ + 'custom_function_1' => null, + 'custom_function_2' => ['CustomLimitation'], + ], + ]); } } ``` @@ -114,14 +114,14 @@ class MyPolicyProvider implements PolicyProviderInterface, TranslationContainerI public function addPolicies(ConfigBuilderInterface $configBuilder): void { $configBuilder->addConfig([ - 'custom_module' => [ - 'custom_function_1' => null, - 'custom_function_2' => ['CustomLimitation'], - ], - ]); + 'custom_module' => [ + 'custom_function_1' => null, + 'custom_function_2' => ['CustomLimitation'], + ], + ]); } - /** @return array<\JMS\TranslationBundle\Model\Message> */ + /** @return array */ public static function getTranslationMessages(): array { return [ diff --git a/docs/resources/rector.md b/docs/resources/rector.md index a79b065fdc..82db589ad4 100644 --- a/docs/resources/rector.md +++ b/docs/resources/rector.md @@ -39,12 +39,12 @@ use Rector\Config\RectorConfig; return RectorConfig::configure() ->withPaths( [ - __DIR__ . '/src', + __DIR__ . '/src', ] ) ->withSets( [ - IbexaSetList::IBEXA_50->value, + IbexaSetList::IBEXA_50->value, ] ) ->withPhpSets(php83: true) diff --git a/docs/search/activity_log_search_reference/logged_at_criterion.md b/docs/search/activity_log_search_reference/logged_at_criterion.md index c39b486fa3..603b71383a 100644 --- a/docs/search/activity_log_search_reference/logged_at_criterion.md +++ b/docs/search/activity_log_search_reference/logged_at_criterion.md @@ -24,6 +24,6 @@ The following example is to match all activity log groups that aren't older than use Ibexa\Contracts\ActivityLog\Values\ActivityLog as ActivityLog; $query = new ActivityLog\Query([ - new ActivityLog\Criterion\LoggedAtCriterion(new \DateTime('- 1 day'), ActivityLog\Criterion\LoggedAtCriterion::GTE), + new ActivityLog\Criterion\LoggedAtCriterion(new DateTime('- 1 day'), ActivityLog\Criterion\LoggedAtCriterion::GTE), ]); ``` diff --git a/docs/search/activity_log_search_reference/object_criterion.md b/docs/search/activity_log_search_reference/object_criterion.md index 55e7b06931..6a26a1e6a2 100644 --- a/docs/search/activity_log_search_reference/object_criterion.md +++ b/docs/search/activity_log_search_reference/object_criterion.md @@ -11,16 +11,18 @@ The `ObjectCriterion` Activity Log Criterion matches log group with a log entry ``` php use Ibexa\Contracts\ActivityLog\Values\ActivityLog as ActivityLog; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; $query = new ActivityLog\Query([ - new ActivityLog\Criterion\ObjectCriterion(Ibexa\Contracts\Core\Repository\Values\Content\Content::class), + new ActivityLog\Criterion\ObjectCriterion(Content::class), ]); ``` ``` php use Ibexa\Contracts\ActivityLog\Values\ActivityLog as ActivityLog; +use Ibexa\Contracts\ProductCatalog\Values\ProductVariantInterface; $query = new ActivityLog\Query([ - new ActivityLog\Criterion\ObjectCriterion(Ibexa\Contracts\ProductCatalog\Values\ProductVariantInterface::class, ['123', '234', '345']), + new ActivityLog\Criterion\ObjectCriterion(ProductVariantInterface::class, ['123', '234', '345']), ]); ``` diff --git a/docs/search/aggregation_reference/daterange_aggregation.md b/docs/search/aggregation_reference/daterange_aggregation.md index 5a4a9b9edd..e560550e59 100644 --- a/docs/search/aggregation_reference/daterange_aggregation.md +++ b/docs/search/aggregation_reference/daterange_aggregation.md @@ -25,9 +25,9 @@ $query->aggregations[] = new Aggregation\Field\DateRangeAggregation( 'event', 'event_date', [ - Range::ofDateTime(null, new DateTime('2020-06-01')), - Range::ofDateTime(new DateTime('2020-06-01'), new DateTime('2020-12-31')), - Range::ofDateTime(new DateTime('2020-12-31'), null), -] + Range::ofDateTime(null, new DateTime('2020-06-01')), + Range::ofDateTime(new DateTime('2020-06-01'), new DateTime('2020-12-31')), + Range::ofDateTime(new DateTime('2020-12-31'), null), + ] ); ``` diff --git a/docs/search/aggregation_reference/datetimerange_aggregation.md b/docs/search/aggregation_reference/datetimerange_aggregation.md index 8e4cab9f28..fd9873e51e 100644 --- a/docs/search/aggregation_reference/datetimerange_aggregation.md +++ b/docs/search/aggregation_reference/datetimerange_aggregation.md @@ -25,9 +25,9 @@ $query->aggregations[] = new Aggregation\Field\DateTimeRangeAggregation( 'event', 'event_date', [ - Range::ofDateTime(null, new DateTime('2020-06-01')), - Range::ofDateTime(new DateTime('2020-06-01'), new DateTime('2020-12-31')), - Range::ofDateTime(new DateTime('2020-12-31'), null), -] + Range::ofDateTime(null, new DateTime('2020-06-01')), + Range::ofDateTime(new DateTime('2020-06-01'), new DateTime('2020-12-31')), + Range::ofDateTime(new DateTime('2020-12-31'), null), + ] ); ``` diff --git a/docs/search/aggregation_reference/floatrange_aggregation.md b/docs/search/aggregation_reference/floatrange_aggregation.md index e5451c4979..1f6f122c95 100644 --- a/docs/search/aggregation_reference/floatrange_aggregation.md +++ b/docs/search/aggregation_reference/floatrange_aggregation.md @@ -25,9 +25,9 @@ $query->aggregations[] = new Aggregation\Field\FloatRangeAggregation( 'product', 'weight', [ - Range::ofFloat(null, 0.25), - Range::ofFloat(0.25, 0.75), - Range::ofFloat(0.75, null), -] + Range::ofFloat(null, 0.25), + Range::ofFloat(0.25, 0.75), + Range::ofFloat(0.75, null), + ] ); ``` diff --git a/docs/search/aggregation_reference/integerrange_aggregation.md b/docs/search/aggregation_reference/integerrange_aggregation.md index 4080d20521..ff33e1e394 100644 --- a/docs/search/aggregation_reference/integerrange_aggregation.md +++ b/docs/search/aggregation_reference/integerrange_aggregation.md @@ -25,9 +25,9 @@ $query->aggregations[] = new Aggregation\Field\IntegerRangeAggregation( 'product', 'amount', [ - Range::ofInt(null, 12), - Range::ofInt(12, 24), - Range::ofInt(24, null), -] + Range::ofInt(null, 12), + Range::ofInt(12, 24), + Range::ofInt(24, null), + ] ); ``` diff --git a/docs/search/aggregation_reference/timerange_aggregation.md b/docs/search/aggregation_reference/timerange_aggregation.md index bd1fc9a1e8..9dc40ba7b1 100644 --- a/docs/search/aggregation_reference/timerange_aggregation.md +++ b/docs/search/aggregation_reference/timerange_aggregation.md @@ -30,8 +30,8 @@ $query->aggregations[] = new Aggregation\Field\TimeRangeAggregation( 'event', 'event_time', [ - Range::ofInt(null, $timestamp), - Range::ofInt($timestamp, null), -] + Range::ofInt(null, $timestamp), + Range::ofInt($timestamp, null), + ] ); ``` diff --git a/docs/search/criteria_reference/ancestor_criterion.md b/docs/search/criteria_reference/ancestor_criterion.md index 024d8c3c9c..0b916fd62a 100644 --- a/docs/search/criteria_reference/ancestor_criterion.md +++ b/docs/search/criteria_reference/ancestor_criterion.md @@ -15,11 +15,12 @@ The [`Ancestor` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-C ### PHP ``` php +use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; $query = new Query(); -/** @var \Ibexa\Contracts\Core\Repository\LocationService $locationService */ +/** @var LocationService $locationService */ $query->query = new Criterion\Ancestor([$locationService->loadLocation(62)->pathString]); ``` @@ -50,16 +51,18 @@ $query->query = new Criterion\Ancestor([$locationService->loadLocation(62)->path You can use the Ancestor Search Criterion to create a list of breadcrumbs leading to the Location: ``` php hl_lines="8" +use Ibexa\Contracts\Core\Repository\LocationService; +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; $locationId = 12345; $query = new LocationQuery(); -/** @var \Ibexa\Contracts\Core\Repository\LocationService $locationService */ +/** @var LocationService $locationService */ $query->query = new Criterion\Ancestor([$locationService->loadLocation($locationId)->pathString]); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findLocations($query); $breadcrumbs = []; foreach ($results->searchHits as $searchHit) { diff --git a/docs/search/criteria_reference/baseprice_criterion.md b/docs/search/criteria_reference/baseprice_criterion.md index c834d0b416..a540349c39 100644 --- a/docs/search/criteria_reference/baseprice_criterion.md +++ b/docs/search/criteria_reference/baseprice_criterion.md @@ -21,13 +21,15 @@ The `BasePrice` Criterion isn't available in the Legacy Search engine. ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\BasePrice; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator; +use Money\Money; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\BasePrice( - \Money\Money::EUR(12900), - \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator::GTE + new BasePrice( + Money::EUR(12900), + Operator::GTE ) ); ``` diff --git a/docs/search/criteria_reference/checkboxattribute_criterion.md b/docs/search/criteria_reference/checkboxattribute_criterion.md index 64fefc9895..e2d984bf52 100644 --- a/docs/search/criteria_reference/checkboxattribute_criterion.md +++ b/docs/search/criteria_reference/checkboxattribute_criterion.md @@ -17,10 +17,10 @@ The `CheckboxAttribute` Search Criterion searches for products by the value of t ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CheckboxAttribute; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CheckboxAttribute('automatic', true) + new CheckboxAttribute('automatic', true) ); ``` diff --git a/docs/search/criteria_reference/colorattribute_criterion.md b/docs/search/criteria_reference/colorattribute_criterion.md index 2de0571bbb..909557896b 100644 --- a/docs/search/criteria_reference/colorattribute_criterion.md +++ b/docs/search/criteria_reference/colorattribute_criterion.md @@ -17,11 +17,11 @@ The `ColorAttribute` Search Criterion searches for products by the value of thei ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ColorAttribute; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ColorAttribute('color', ['#FF0000']) + new ColorAttribute('color', ['#FF0000']) ); ``` diff --git a/docs/search/criteria_reference/createdat_criterion.md b/docs/search/criteria_reference/createdat_criterion.md index 1c146535aa..1eaa41e1e6 100644 --- a/docs/search/criteria_reference/createdat_criterion.md +++ b/docs/search/criteria_reference/createdat_criterion.md @@ -17,11 +17,12 @@ The `CreatedAt` Search Criterion searches for products based on the date when th ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAt; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator; -$criteria = new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAt( +$criteria = new CreatedAt( new DateTime('2023-03-01'), - \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator::GTE, + Operator::GTE, ); $productQuery = new ProductQuery(null, $criteria); diff --git a/docs/search/criteria_reference/createdatrange_criterion.md b/docs/search/criteria_reference/createdatrange_criterion.md index 04a1265c20..d45b8b1d10 100644 --- a/docs/search/criteria_reference/createdatrange_criterion.md +++ b/docs/search/criteria_reference/createdatrange_criterion.md @@ -17,11 +17,11 @@ The `CreatedAtRange` Search Criterion searches for products based on the date ra ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAtRange; -$criteria = new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAtRange( - new \DateTimeImmutable('2020-07-10T00:00:00+00:00'), - new \DateTimeImmutable('2023-07-12T00:00:00+00:00') +$criteria = new CreatedAtRange( + new DateTimeImmutable('2020-07-10T00:00:00+00:00'), + new DateTimeImmutable('2023-07-12T00:00:00+00:00') ); $productQuery = new ProductQuery(null, $criteria); diff --git a/docs/search/criteria_reference/currencycode_criterion.md b/docs/search/criteria_reference/currencycode_criterion.md index 7c6b98cbe5..05bc50b41e 100644 --- a/docs/search/criteria_reference/currencycode_criterion.md +++ b/docs/search/criteria_reference/currencycode_criterion.md @@ -20,8 +20,9 @@ The `CurrencyCodeCriterion` Criterion isn't available in Solr or Elasticsearch e ``` php use Ibexa\Contracts\ProductCatalog\Values\Currency\CurrencyQuery; +use Ibexa\Contracts\ProductCatalog\Values\Currency\Query\Criterion\CurrencyCodeCriterion; $query = new CurrencyQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Currency\Query\Criterion\CurrencyCodeCriterion('EUR') + new CurrencyCodeCriterion('EUR') ); ``` diff --git a/docs/search/criteria_reference/customprice_criterion.md b/docs/search/criteria_reference/customprice_criterion.md index 0855e9e596..dc5721cf79 100644 --- a/docs/search/criteria_reference/customprice_criterion.md +++ b/docs/search/criteria_reference/customprice_criterion.md @@ -22,15 +22,18 @@ The `CustomPrice` Criterion isn't available in the Legacy Search engine. ### PHP ``` php +use Ibexa\Contracts\ProductCatalog\Values\CustomerGroupInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CustomPrice; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator; +use Money\Money; -/** @var \Ibexa\Contracts\ProductCatalog\Values\CustomerGroupInterface $customerGroup */ +/** @var CustomerGroupInterface $customerGroup */ $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CustomPrice( - \Money\Money::EUR(13800), - \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator::GTE, + new CustomPrice( + Money::EUR(13800), + Operator::GTE, $customerGroup ) ); diff --git a/docs/search/criteria_reference/floatattribute_criterion.md b/docs/search/criteria_reference/floatattribute_criterion.md index 928f495b7a..164d4504f4 100644 --- a/docs/search/criteria_reference/floatattribute_criterion.md +++ b/docs/search/criteria_reference/floatattribute_criterion.md @@ -17,11 +17,11 @@ The `FloatAttribute` Search Criterion searches for products by the value of thei ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\FloatAttribute; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\FloatAttribute( + new FloatAttribute( 'length', 16.5 ) diff --git a/docs/search/criteria_reference/image_criterion.md b/docs/search/criteria_reference/image_criterion.md index 43ad087a37..a8cd90c1cd 100644 --- a/docs/search/criteria_reference/image_criterion.md +++ b/docs/search/criteria_reference/image_criterion.md @@ -21,10 +21,10 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; $imageCriteriaData = [ 'mimeTypes' => [ - 'image/png', + 'image/png', ], 'orientation' => [ - 'image/png', + 'image/png', ], 'width' => [ 'min' => 0, // (default: 0, optional) diff --git a/docs/search/criteria_reference/imageorientation_criterion.md b/docs/search/criteria_reference/imageorientation_criterion.md index 73d54f75b0..4e69761054 100644 --- a/docs/search/criteria_reference/imageorientation_criterion.md +++ b/docs/search/criteria_reference/imageorientation_criterion.md @@ -20,7 +20,6 @@ Supported orientation values: landscape, portrait and square. ``` php use Ibexa\Contracts\Core\Repository\Values\Content\Query; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Image\Orientation; $query = new Query(); diff --git a/docs/search/criteria_reference/integerattribute_criterion.md b/docs/search/criteria_reference/integerattribute_criterion.md index 9981cabd3c..3b15279b70 100644 --- a/docs/search/criteria_reference/integerattribute_criterion.md +++ b/docs/search/criteria_reference/integerattribute_criterion.md @@ -17,11 +17,11 @@ The `IntegerAttribute` Search Criterion searches for products by the value of th ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\IntegerAttribute; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\IntegerAttribute( + new IntegerAttribute( 'size', 38 ) diff --git a/docs/search/criteria_reference/iscurrencyenabled_criterion.md b/docs/search/criteria_reference/iscurrencyenabled_criterion.md index d470584211..1cad2041ab 100644 --- a/docs/search/criteria_reference/iscurrencyenabled_criterion.md +++ b/docs/search/criteria_reference/iscurrencyenabled_criterion.md @@ -21,8 +21,9 @@ The `IsCurrencyEnabledCriterion` Criterion isn't available in Solr or Elasticsea ``` php use Ibexa\Contracts\ProductCatalog\Values\Currency\CurrencyQuery; +use Ibexa\Contracts\ProductCatalog\Values\Currency\Query\Criterion\IsCurrencyEnabledCriterion; $query = new CurrencyQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Currency\Query\Criterion\IsCurrencyEnabledCriterion() + new IsCurrencyEnabledCriterion() ); ``` diff --git a/docs/search/criteria_reference/ismainlocation_criterion.md b/docs/search/criteria_reference/ismainlocation_criterion.md index d3790a5045..4686ce7b34 100644 --- a/docs/search/criteria_reference/ismainlocation_criterion.md +++ b/docs/search/criteria_reference/ismainlocation_criterion.md @@ -19,9 +19,8 @@ representing whether to search for a main or not main location ``` php use Ibexa\Contracts\Core\Repository\Values\Content\Query; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Location\IsMainLocation; $query = new Query(); -$query->query = new Criterion\Location\IsMainLocation(IsMainLocation::MAIN); +$query->query = new IsMainLocation(IsMainLocation::MAIN); ``` diff --git a/docs/search/criteria_reference/isproductbased_criterion.md b/docs/search/criteria_reference/isproductbased_criterion.md index 507450e3e3..28e094f375 100644 --- a/docs/search/criteria_reference/isproductbased_criterion.md +++ b/docs/search/criteria_reference/isproductbased_criterion.md @@ -12,8 +12,8 @@ The `IsProductBased` Search Criterion searches for content that plays the role o ``` php use Ibexa\Contracts\Core\Repository\Values\Content\Query; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Content\Query\Criterion\IsProductBased; $query = new Query(); -$query->query = new \Ibexa\Contracts\ProductCatalog\Values\Content\Query\Criterion\IsProductBased(); +$query->query = new IsProductBased(); ``` diff --git a/docs/search/criteria_reference/isvirtual_criterion.md b/docs/search/criteria_reference/isvirtual_criterion.md index 5f2bb3aa02..a26d68ca97 100644 --- a/docs/search/criteria_reference/isvirtual_criterion.md +++ b/docs/search/criteria_reference/isvirtual_criterion.md @@ -16,11 +16,11 @@ The `IsVirtual` Search Criterion searches for virtual or physical products. ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\IsVirtual; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\IsVirtual(true) + new IsVirtual(true) ); ``` diff --git a/docs/search/criteria_reference/languagecode_criterion.md b/docs/search/criteria_reference/languagecode_criterion.md index 7b74156f66..98da0ba178 100644 --- a/docs/search/criteria_reference/languagecode_criterion.md +++ b/docs/search/criteria_reference/languagecode_criterion.md @@ -51,20 +51,21 @@ You can use the `LanguageCode` Criterion to search for articles that are lacking into a specific language: ``` php hl_lines="9" +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; $query = new LocationQuery(); $query->query = new Criterion\LogicalAnd( [ - new Criterion\ContentTypeIdentifier('article'), - new Criterion\LogicalNot( - new Criterion\LanguageCode('ger-DE', false) - ), + new Criterion\ContentTypeIdentifier('article'), + new Criterion\LogicalNot( + new Criterion\LanguageCode('ger-DE', false) + ), ] ); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findContent($query); $articlesToTranslate = []; foreach ($results->searchHits as $searchHit) { diff --git a/docs/search/criteria_reference/order_company_associated_criterion.md b/docs/search/criteria_reference/order_company_associated_criterion.md index 84e9529614..9f72d0b59b 100644 --- a/docs/search/criteria_reference/order_company_associated_criterion.md +++ b/docs/search/criteria_reference/order_company_associated_criterion.md @@ -16,10 +16,10 @@ The `IsCompanyAssociatedCriterion` Search Criterion searches for orders based on ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\IsCompanyAssociatedCriterion; $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\IsCompanyAssociatedCriterion(true) + new IsCompanyAssociatedCriterion(true) ); ``` diff --git a/docs/search/criteria_reference/order_company_name_criterion.md b/docs/search/criteria_reference/order_company_name_criterion.md index 170fd0eaaa..d1eb532dd2 100644 --- a/docs/search/criteria_reference/order_company_name_criterion.md +++ b/docs/search/criteria_reference/order_company_name_criterion.md @@ -16,10 +16,10 @@ The `CompanyNameCriterion` Search Criterion searches for orders based on the nam ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CompanyNameCriterion; $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CompanyNameCriterion('IBM') + new CompanyNameCriterion('IBM') ); ``` diff --git a/docs/search/criteria_reference/order_created_criterion.md b/docs/search/criteria_reference/order_created_criterion.md index ac566ca2e6..c2e31af5ce 100644 --- a/docs/search/criteria_reference/order_created_criterion.md +++ b/docs/search/criteria_reference/order_created_criterion.md @@ -18,9 +18,9 @@ The `CreatedAtCriterion` Search Criterion searches for orders based on the date ``` php use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CreatedAtCriterion; -$criteria = new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CreatedAtCriterion( +$criteria = new CreatedAtCriterion( new DateTime('2023-03-01'), 'GTE' ); diff --git a/docs/search/criteria_reference/order_currency_code_criterion.md b/docs/search/criteria_reference/order_currency_code_criterion.md index 9f0b5f639c..242d68ecce 100644 --- a/docs/search/criteria_reference/order_currency_code_criterion.md +++ b/docs/search/criteria_reference/order_currency_code_criterion.md @@ -16,10 +16,10 @@ The `CurrencyCodeCriterion` Search Criterion searches for orders based on the cu ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CurrencyCodeCriterion; $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CurrencyCodeCriterion('USD') + new CurrencyCodeCriterion('USD') ); ``` diff --git a/docs/search/criteria_reference/order_customer_name_criterion.md b/docs/search/criteria_reference/order_customer_name_criterion.md index 6f72425cc1..976520401a 100644 --- a/docs/search/criteria_reference/order_customer_name_criterion.md +++ b/docs/search/criteria_reference/order_customer_name_criterion.md @@ -16,10 +16,10 @@ The `CustomerNameCriterion` Search Criterion searches for orders based on the na ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CustomerNameCriterion; $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\CustomerNameCriterion('john') + new CustomerNameCriterion('john') ); ``` diff --git a/docs/search/criteria_reference/order_identifier_criterion.md b/docs/search/criteria_reference/order_identifier_criterion.md index 107c4fa62d..9c475b656d 100644 --- a/docs/search/criteria_reference/order_identifier_criterion.md +++ b/docs/search/criteria_reference/order_identifier_criterion.md @@ -16,10 +16,10 @@ The `IdentifierCriterion` Search Criterion searches for orders based on the orde ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\IdentifierCriterion; $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\IdentifierCriterion('f7578972-e7f4-4cae-85dc-a7c74610204e') + new IdentifierCriterion('f7578972-e7f4-4cae-85dc-a7c74610204e') ); ``` diff --git a/docs/search/criteria_reference/order_owner_criterion.md b/docs/search/criteria_reference/order_owner_criterion.md index 4b977a1e09..c869b154a3 100644 --- a/docs/search/criteria_reference/order_owner_criterion.md +++ b/docs/search/criteria_reference/order_owner_criterion.md @@ -14,14 +14,15 @@ The `OwnerCriterion` Criterion searches for orders based on the user reference. ## Example ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\OwnerCriterion; -/** @var \Ibexa\Contracts\Core\Repository\UserService $userService */ +/** @var UserService $userService */ $user = $userService->loadUserByLogin('user'); $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\OwnerCriterion( + new OwnerCriterion( $user ) ); @@ -30,18 +31,19 @@ $query = new OrderQuery( `OwnerCriterion` Criterion accepts also multiple values: ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\OwnerCriterion; -/** @var \Ibexa\Contracts\Core\Repository\UserService $userService */ +/** @var UserService $userService */ $user1 = $userService->loadUser(12345); $user2 = $userService->loadUserByLogin('user'); $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\OwnerCriterion( + new OwnerCriterion( [ - $user1, - $user2, + $user1, + $user2, ] ) ); diff --git a/docs/search/criteria_reference/order_price_criterion.md b/docs/search/criteria_reference/order_price_criterion.md index e72f32c77b..53ef13ae14 100644 --- a/docs/search/criteria_reference/order_price_criterion.md +++ b/docs/search/criteria_reference/order_price_criterion.md @@ -17,10 +17,10 @@ The `PriceCriterion` searches for orders by their total net value. ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\PriceCriterion; -$criteria = new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\PriceCriterion( +$criteria = new PriceCriterion( 12900, 'GTE' ); diff --git a/docs/search/criteria_reference/order_source_criterion.md b/docs/search/criteria_reference/order_source_criterion.md index 956fae1ec3..17ebc6a987 100644 --- a/docs/search/criteria_reference/order_source_criterion.md +++ b/docs/search/criteria_reference/order_source_criterion.md @@ -16,10 +16,10 @@ The `SourceCriterion` Search Criterion searches for orders based on the source o ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\SourceCriterion; $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\SourceCriterion('local_shop') + new SourceCriterion('local_shop') ); ``` diff --git a/docs/search/criteria_reference/order_status_criterion.md b/docs/search/criteria_reference/order_status_criterion.md index 237b202694..009864ab75 100644 --- a/docs/search/criteria_reference/order_status_criterion.md +++ b/docs/search/criteria_reference/order_status_criterion.md @@ -16,10 +16,10 @@ The `StatusCriterion` Search Criterion searches for orders based on order status ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\StatusCriterion; $query = new OrderQuery( - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\StatusCriterion('pending') + new StatusCriterion('pending') ); ``` diff --git a/docs/search/criteria_reference/parentlocationid_criterion.md b/docs/search/criteria_reference/parentlocationid_criterion.md index eb1514964b..0e59dc6fc9 100644 --- a/docs/search/criteria_reference/parentlocationid_criterion.md +++ b/docs/search/criteria_reference/parentlocationid_criterion.md @@ -50,6 +50,7 @@ $query->query = new Criterion\ParentLocationId([54, 58]); You can use the `ParentLocationId` Search Criterion to list blog posts contained in a blog: ``` php hl_lines="9" +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; @@ -61,7 +62,7 @@ $query->query = new Criterion\LogicalAnd([ new Criterion\ParentLocationId($locationId), ]); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findLocations($query); $posts = []; foreach ($results->searchHits as $searchHit) { diff --git a/docs/search/criteria_reference/payment_createdat_criterion.md b/docs/search/criteria_reference/payment_createdat_criterion.md index 66c1130db3..c6cb6ae5ba 100644 --- a/docs/search/criteria_reference/payment_createdat_criterion.md +++ b/docs/search/criteria_reference/payment_createdat_criterion.md @@ -18,9 +18,9 @@ The `CreatedAt` Search Criterion searches for payments based on the date when th ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\CreatedAt; -$criteria = new \Ibexa\Contracts\Payment\Payment\Query\Criterion\CreatedAt( +$criteria = new CreatedAt( new DateTime('2023-03-01') ); $query = new PaymentQuery($criteria); diff --git a/docs/search/criteria_reference/payment_currency_criterion.md b/docs/search/criteria_reference/payment_currency_criterion.md index 59829269d6..55867be94f 100644 --- a/docs/search/criteria_reference/payment_currency_criterion.md +++ b/docs/search/criteria_reference/payment_currency_criterion.md @@ -17,8 +17,9 @@ The `Currency` Search Criterion searches for payments based on the currency code ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\Currency; $query = new PaymentQuery( - new \Ibexa\Contracts\Payment\Payment\Query\Criterion\Currency('EUR') + new Currency('EUR') ); ``` diff --git a/docs/search/criteria_reference/payment_id_criterion.md b/docs/search/criteria_reference/payment_id_criterion.md index 6c1a9bfeb3..8f2e43120b 100644 --- a/docs/search/criteria_reference/payment_id_criterion.md +++ b/docs/search/criteria_reference/payment_id_criterion.md @@ -17,8 +17,9 @@ The `Id` Search Criterion searches for payments based on the payment ID. ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\Id; $query = new PaymentQuery( - new \Ibexa\Contracts\Payment\Payment\Query\Criterion\Id(2) + new Id(2) ); ``` diff --git a/docs/search/criteria_reference/payment_identifier_criterion.md b/docs/search/criteria_reference/payment_identifier_criterion.md index 7de17744f0..40d088169b 100644 --- a/docs/search/criteria_reference/payment_identifier_criterion.md +++ b/docs/search/criteria_reference/payment_identifier_criterion.md @@ -17,8 +17,9 @@ The `Identifier` Search Criterion searches for payments based on the payment ide ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\Identifier; $query = new PaymentQuery( - new \Ibexa\Contracts\Payment\Payment\Query\Criterion\Identifier('f7578972-e7f4-4cae-85dc-a7c74610204e') + new Identifier('f7578972-e7f4-4cae-85dc-a7c74610204e') ); ``` diff --git a/docs/search/criteria_reference/payment_method_createdat_criterion.md b/docs/search/criteria_reference/payment_method_createdat_criterion.md index fd2280a011..48fc9c135c 100644 --- a/docs/search/criteria_reference/payment_method_createdat_criterion.md +++ b/docs/search/criteria_reference/payment_method_createdat_criterion.md @@ -18,9 +18,9 @@ The `CreatedAt` Search Criterion searches for payment methods based on the date ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\CreatedAt; -$criteria = new \Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\CreatedAt( +$criteria = new CreatedAt( new DateTime('2023-03-01') ); $query = new PaymentMethodQuery($criteria); diff --git a/docs/search/criteria_reference/payment_method_enabled_criterion.md b/docs/search/criteria_reference/payment_method_enabled_criterion.md index 2447da755f..868a1e2059 100644 --- a/docs/search/criteria_reference/payment_method_enabled_criterion.md +++ b/docs/search/criteria_reference/payment_method_enabled_criterion.md @@ -17,8 +17,9 @@ The `Enabled` Search Criterion searches for payment methods based on whether the ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Enabled; $query = new PaymentMethodQuery( - new \Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Enabled(true) + new Enabled(true) ); ``` diff --git a/docs/search/criteria_reference/payment_method_id_criterion.md b/docs/search/criteria_reference/payment_method_id_criterion.md index 2a2a7fb661..1c0f455781 100644 --- a/docs/search/criteria_reference/payment_method_id_criterion.md +++ b/docs/search/criteria_reference/payment_method_id_criterion.md @@ -17,8 +17,9 @@ The `Id` Search Criterion searches for payment methods based on the payment meth ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Id; $query = new PaymentMethodQuery( - new \Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Id(2) + new Id(2) ); ``` diff --git a/docs/search/criteria_reference/payment_method_identifier_criterion.md b/docs/search/criteria_reference/payment_method_identifier_criterion.md index 809cf68adc..79f6e2a29e 100644 --- a/docs/search/criteria_reference/payment_method_identifier_criterion.md +++ b/docs/search/criteria_reference/payment_method_identifier_criterion.md @@ -17,8 +17,9 @@ The `Identifier` Search Criterion searches for payment methods based on the paym ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Identifier; $query = new PaymentMethodQuery( - new \Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Identifier('f7578972-e7f4-4cae-85dc-a7c74610204e') + new Identifier('f7578972-e7f4-4cae-85dc-a7c74610204e') ); ``` diff --git a/docs/search/criteria_reference/payment_method_name_criterion.md b/docs/search/criteria_reference/payment_method_name_criterion.md index 95499b72c6..331d3a74f4 100644 --- a/docs/search/criteria_reference/payment_method_name_criterion.md +++ b/docs/search/criteria_reference/payment_method_name_criterion.md @@ -17,8 +17,9 @@ The `Name` Search Criterion searches for payment methods based on the existing p ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Name; $query = new PaymentMethodQuery( - new \Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Name('Credit Card') + new Name('Credit Card') ); ``` diff --git a/docs/search/criteria_reference/payment_method_type_criterion.md b/docs/search/criteria_reference/payment_method_type_criterion.md index 72524ab962..2e1a789ef1 100644 --- a/docs/search/criteria_reference/payment_method_type_criterion.md +++ b/docs/search/criteria_reference/payment_method_type_criterion.md @@ -17,11 +17,13 @@ The `Type` Search Criterion searches for payment methods based on payment method ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Type; +use Ibexa\Contracts\Payment\PaymentMethod\Type\TypeRegistryInterface; -/** @var \Ibexa\Contracts\Payment\PaymentMethod\Type\TypeRegistryInterface $paymentMethodTypeRegistry */ +/** @var TypeRegistryInterface $paymentMethodTypeRegistry */ $paymentMethodType = $paymentMethodTypeRegistry->getPaymentMethodType('offline'); $query = new PaymentMethodQuery( - new \Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\Type($paymentMethodType) + new Type($paymentMethodType) ); ``` diff --git a/docs/search/criteria_reference/payment_method_updatedat_criterion.md b/docs/search/criteria_reference/payment_method_updatedat_criterion.md index 13a04438f6..21d6765dc6 100644 --- a/docs/search/criteria_reference/payment_method_updatedat_criterion.md +++ b/docs/search/criteria_reference/payment_method_updatedat_criterion.md @@ -17,10 +17,10 @@ The `UpdatedAt` Search Criterion searches for payment methods based on the date ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\UpdatedAt; -$criteria = new \Ibexa\Contracts\Payment\PaymentMethod\Query\Criterion\UpdatedAt( +$criteria = new UpdatedAt( new DateTime('2023-03-01') ); $query = new PaymentMethodQuery($criteria); diff --git a/docs/search/criteria_reference/payment_order_criterion.md b/docs/search/criteria_reference/payment_order_criterion.md index 3eaf004566..0876f8e122 100644 --- a/docs/search/criteria_reference/payment_order_criterion.md +++ b/docs/search/criteria_reference/payment_order_criterion.md @@ -16,12 +16,14 @@ The `Order` Search Criterion searches for payments based on an ID of an associat ### PHP ``` php +use Ibexa\Contracts\OrderManagement\OrderServiceInterface; use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\Order; -/** @var \Ibexa\Contracts\OrderManagement\OrderServiceInterface $orderService */ +/** @var OrderServiceInterface $orderService */ $order = $orderService->getOrder(4); $query = new PaymentQuery( - new \Ibexa\Contracts\Payment\Payment\Query\Criterion\Order($order) + new Order($order) ); ``` diff --git a/docs/search/criteria_reference/payment_payment_method_criterion.md b/docs/search/criteria_reference/payment_payment_method_criterion.md index 98d7d033c3..7253c6c920 100644 --- a/docs/search/criteria_reference/payment_payment_method_criterion.md +++ b/docs/search/criteria_reference/payment_payment_method_criterion.md @@ -17,11 +17,13 @@ The `PaymentMethod` Search Criterion searches for payments based on a payment me ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\PaymentMethod; +use Ibexa\Contracts\Payment\PaymentMethodServiceInterface; -/** @var \Ibexa\Contracts\Payment\PaymentMethodServiceInterface $paymentMethodService */ +/** @var PaymentMethodServiceInterface $paymentMethodService */ $paymentMethod = $paymentMethodService->getPaymentMethod(2); $query = new PaymentQuery( - new \Ibexa\Contracts\Payment\Payment\Query\Criterion\PaymentMethod($paymentMethod) + new PaymentMethod($paymentMethod) ); ``` diff --git a/docs/search/criteria_reference/payment_status_criterion.md b/docs/search/criteria_reference/payment_status_criterion.md index deb1d6d8f2..b1a3a70c45 100644 --- a/docs/search/criteria_reference/payment_status_criterion.md +++ b/docs/search/criteria_reference/payment_status_criterion.md @@ -17,8 +17,9 @@ The `Status` Search Criterion searches for payments based on payment status. ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\Status; $query = new PaymentQuery( - new \Ibexa\Contracts\Payment\Payment\Query\Criterion\Status('failed') + new Status('failed') ); ``` diff --git a/docs/search/criteria_reference/payment_updatedat_criterion.md b/docs/search/criteria_reference/payment_updatedat_criterion.md index 8257b614ac..b605c97afe 100644 --- a/docs/search/criteria_reference/payment_updatedat_criterion.md +++ b/docs/search/criteria_reference/payment_updatedat_criterion.md @@ -17,10 +17,10 @@ The `UpdatedAt` Search Criterion searches for payments based on the date when th ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\Criterion\UpdatedAt; -$criteria = new \Ibexa\Contracts\Payment\Payment\Query\Criterion\UpdatedAt( +$criteria = new UpdatedAt( new DateTime('2023-03-01') ); $query = new PaymentQuery($criteria); diff --git a/docs/search/criteria_reference/price_currency_criterion.md b/docs/search/criteria_reference/price_currency_criterion.md index c96105d174..1f01014507 100644 --- a/docs/search/criteria_reference/price_currency_criterion.md +++ b/docs/search/criteria_reference/price_currency_criterion.md @@ -15,13 +15,14 @@ The `Currency` Search Criterion searches for prices based on the given currency. ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\CurrencyServiceInterface; use Ibexa\Contracts\ProductCatalog\Values\Price\PriceQuery; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Currency; -/** @var \Ibexa\Contracts\ProductCatalog\CurrencyServiceInterface $currencyService */ +/** @var CurrencyServiceInterface $currencyService */ $currency = $currencyService->getCurrencyByCode('EUR'); $query = new PriceQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Currency($currency) + new Currency($currency) ); ``` diff --git a/docs/search/criteria_reference/price_customergroup_criterion.md b/docs/search/criteria_reference/price_customergroup_criterion.md index 2c33e1bd64..8e72aca9ca 100644 --- a/docs/search/criteria_reference/price_customergroup_criterion.md +++ b/docs/search/criteria_reference/price_customergroup_criterion.md @@ -15,13 +15,14 @@ The `CustomerGroup` Search Criterion searches for prices based on the customer g ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\CustomerGroupServiceInterface; use Ibexa\Contracts\ProductCatalog\Values\Price\PriceQuery; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\CustomerGroup; -/** @var \Ibexa\Contracts\ProductCatalog\CustomerGroupServiceInterface $customerGroupService */ +/** @var CustomerGroupServiceInterface $customerGroupService */ $customerGroup = $customerGroupService->getCustomerGroup(123); $query = new PriceQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\CustomerGroup($customerGroup) + new CustomerGroup($customerGroup) ); ``` diff --git a/docs/search/criteria_reference/price_isbaseprice_criterion.md b/docs/search/criteria_reference/price_isbaseprice_criterion.md index 56efe39038..a2deae7aee 100644 --- a/docs/search/criteria_reference/price_isbaseprice_criterion.md +++ b/docs/search/criteria_reference/price_isbaseprice_criterion.md @@ -19,10 +19,10 @@ The `IsBasePrice` Criterion isn't available in Solr or Elasticsearch engines. ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\ProductCatalog\Values\Price\PriceQuery; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\IsBasePrice; $query = new PriceQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\IsBasePrice() + new IsBasePrice() ); ``` diff --git a/docs/search/criteria_reference/price_iscustomprice_criterion.md b/docs/search/criteria_reference/price_iscustomprice_criterion.md index 0aa2ec2afb..325fda0c47 100644 --- a/docs/search/criteria_reference/price_iscustomprice_criterion.md +++ b/docs/search/criteria_reference/price_iscustomprice_criterion.md @@ -19,10 +19,10 @@ The `IsCustomPrice` Criterion isn't available in Solr or Elasticsearch engines. ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\ProductCatalog\Values\Price\PriceQuery; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\IsCustomPrice; $query = new PriceQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\IsCustomPrice() + new IsCustomPrice() ); ``` diff --git a/docs/search/criteria_reference/price_logicaland_criterion.md b/docs/search/criteria_reference/price_logicaland_criterion.md index 7693f7a8e5..e531370f44 100644 --- a/docs/search/criteria_reference/price_logicaland_criterion.md +++ b/docs/search/criteria_reference/price_logicaland_criterion.md @@ -16,13 +16,17 @@ The `LogicalAnd` Search Criterion matches prices if all provided Criteria match. ### PHP ``` php +use Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface; use Ibexa\Contracts\ProductCatalog\Values\Price\PriceQuery; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Currency; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\IsCustomPrice; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\LogicalAnd; -/** @var \Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface $currencyUSD */ +/** @var CurrencyInterface $currencyUSD */ $query = new PriceQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\LogicalAnd( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Currency($currencyUSD), - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\IsCustomPrice() + new LogicalAnd( + new Currency($currencyUSD), + new IsCustomPrice() ) ); ``` diff --git a/docs/search/criteria_reference/price_logicalor_criterion.md b/docs/search/criteria_reference/price_logicalor_criterion.md index 246a4e14ec..ae70000db4 100644 --- a/docs/search/criteria_reference/price_logicalor_criterion.md +++ b/docs/search/criteria_reference/price_logicalor_criterion.md @@ -16,16 +16,19 @@ The `LogicalOr` Search Criterion matches prices if at least one of the provided ### PHP ``` php +use Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface; use Ibexa\Contracts\ProductCatalog\Values\Price\PriceQuery; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Currency; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\LogicalOr; /** - * @var \Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface $currencyUSD - * @var \Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface $currencyEUR + * @var CurrencyInterface $currencyUSD + * @var CurrencyInterface $currencyEUR */ $query = new PriceQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\LogicalOr( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Currency($currencyUSD), - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Currency($currencyEUR) + new LogicalOr( + new Currency($currencyUSD), + new Currency($currencyEUR) ) ); ``` diff --git a/docs/search/criteria_reference/price_product_criterion.md b/docs/search/criteria_reference/price_product_criterion.md index ff213b6a05..1d2f3846fc 100644 --- a/docs/search/criteria_reference/price_product_criterion.md +++ b/docs/search/criteria_reference/price_product_criterion.md @@ -15,10 +15,10 @@ The `Product` Search Criterion searches for prices based on product codes. ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\ProductCatalog\Values\Price\PriceQuery; +use Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Product; $query = new PriceQuery( - new \Ibexa\Contracts\ProductCatalog\Values\Price\Query\Criterion\Product('ergo_desk') + new Product('ergo_desk') ); ``` diff --git a/docs/search/criteria_reference/productavailability_criterion.md b/docs/search/criteria_reference/productavailability_criterion.md index 89b76bdaa7..1c7537d905 100644 --- a/docs/search/criteria_reference/productavailability_criterion.md +++ b/docs/search/criteria_reference/productavailability_criterion.md @@ -22,11 +22,11 @@ For more information, see [Availability and computed availability](products.md#a ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductAvailability; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductAvailability(true) + new ProductAvailability(true) ); ``` diff --git a/docs/search/criteria_reference/productcategory_criterion.md b/docs/search/criteria_reference/productcategory_criterion.md index 8ca37ebc9c..571d4bdda3 100644 --- a/docs/search/criteria_reference/productcategory_criterion.md +++ b/docs/search/criteria_reference/productcategory_criterion.md @@ -16,11 +16,11 @@ The `ProductCategory` Search Criterion searches for products by the category the ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCategory; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCategory([2, 3]) + new ProductCategory([2, 3]) ); ``` diff --git a/docs/search/criteria_reference/productcode_criterion.md b/docs/search/criteria_reference/productcode_criterion.md index 39d7e1b1af..934e2d67ea 100644 --- a/docs/search/criteria_reference/productcode_criterion.md +++ b/docs/search/criteria_reference/productcode_criterion.md @@ -16,11 +16,11 @@ The `ProductCode` Search Criterion searches for products by their codes. ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCode; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCode(['ergo_desk', 'alter_desk']) + new ProductCode(['ergo_desk', 'alter_desk']) ); ``` diff --git a/docs/search/criteria_reference/productname_criterion.md b/docs/search/criteria_reference/productname_criterion.md index 5a3d9a18cf..8601d2b699 100644 --- a/docs/search/criteria_reference/productname_criterion.md +++ b/docs/search/criteria_reference/productname_criterion.md @@ -16,11 +16,11 @@ The `ProductName` Search Criterion searches for products by their names. ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductName; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductName('sofa*') + new ProductName('sofa*') ); ``` diff --git a/docs/search/criteria_reference/producttype_criterion.md b/docs/search/criteria_reference/producttype_criterion.md index c98fbcdc09..81ca92ed62 100644 --- a/docs/search/criteria_reference/producttype_criterion.md +++ b/docs/search/criteria_reference/producttype_criterion.md @@ -16,11 +16,11 @@ The `ProductType` Search Criterion searches for products by their codes. ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductType; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductType(['dress']) + new ProductType(['dress']) ); ``` diff --git a/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md b/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md index 7a5a71edae..c903d79f69 100644 --- a/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md +++ b/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md @@ -16,15 +16,16 @@ The `RangeMeasurementAttributeMaximum` Search Criterion searches for products by ### PHP ``` php +use Ibexa\Contracts\Measurement\MeasurementServiceInterface; +use Ibexa\Contracts\Measurement\Product\Query\Criterion\RangeMeasurementAttributeMaximum; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; -/** @var \Ibexa\Contracts\Measurement\MeasurementServiceInterface $measurementService */ +/** @var MeasurementServiceInterface $measurementService */ $value = $measurementService->buildSimpleValue('length', 150, 'centimeter'); $query = new ProductQuery( null, - new \Ibexa\Contracts\Measurement\Product\Query\Criterion\RangeMeasurementAttributeMaximum( + new RangeMeasurementAttributeMaximum( 'length', $value ) diff --git a/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md b/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md index 7f103eee09..cbe4a621a7 100644 --- a/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md +++ b/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md @@ -16,15 +16,16 @@ The `RangeMeasurementAttributeMinimum` Search Criterion searches for products by ### PHP ``` php +use Ibexa\Contracts\Measurement\MeasurementServiceInterface; +use Ibexa\Contracts\Measurement\Product\Query\Criterion\RangeMeasurementAttributeMinimum; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; -/** @var \Ibexa\Contracts\Measurement\MeasurementServiceInterface $measurementService */ +/** @var MeasurementServiceInterface $measurementService */ $value = $measurementService->buildSimpleValue('length', 100, 'centimeter'); $query = new ProductQuery( null, - new \Ibexa\Contracts\Measurement\Product\Query\Criterion\RangeMeasurementAttributeMinimum( + new RangeMeasurementAttributeMinimum( 'length', $value ) diff --git a/docs/search/criteria_reference/selectionattribute_criterion.md b/docs/search/criteria_reference/selectionattribute_criterion.md index cbaf0be364..6a7f12d22b 100644 --- a/docs/search/criteria_reference/selectionattribute_criterion.md +++ b/docs/search/criteria_reference/selectionattribute_criterion.md @@ -17,11 +17,11 @@ The `SelectionAttribute` Search Criterion searches for products by the value of ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\SelectionAttribute; $query = new ProductQuery( null, - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\SelectionAttribute( + new SelectionAttribute( 'fabric_type', ['cotton'] ) diff --git a/docs/search/criteria_reference/shipment_createdat_criterion.md b/docs/search/criteria_reference/shipment_createdat_criterion.md index e0574ebb9a..2b8d6d3db6 100644 --- a/docs/search/criteria_reference/shipment_createdat_criterion.md +++ b/docs/search/criteria_reference/shipment_createdat_criterion.md @@ -17,10 +17,10 @@ The `CreatedAt` Search Criterion searches for shipments based on the date when t ### PHP ``` php -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\CreatedAt; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -$criteria = new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\CreatedAt( +$criteria = new CreatedAt( new DateTime('2023-03-01 14:07:02'), 'GTE' ); diff --git a/docs/search/criteria_reference/shipment_currency_criterion.md b/docs/search/criteria_reference/shipment_currency_criterion.md index 3081565e85..b9c23e6fc2 100644 --- a/docs/search/criteria_reference/shipment_currency_criterion.md +++ b/docs/search/criteria_reference/shipment_currency_criterion.md @@ -16,10 +16,10 @@ The `Currency` Search Criterion searches for shipments based on the currency cod ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Currency; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Currency(['USD', 'CZK']) + new Currency(['USD', 'CZK']) ); ``` diff --git a/docs/search/criteria_reference/shipment_id_criterion.md b/docs/search/criteria_reference/shipment_id_criterion.md index 36a7fb0479..b7b4e7a829 100644 --- a/docs/search/criteria_reference/shipment_id_criterion.md +++ b/docs/search/criteria_reference/shipment_id_criterion.md @@ -16,10 +16,10 @@ The `Id` Search Criterion searches for shipments based on the shipment ID. ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Id; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Id(2) + new Id(2) ); ``` diff --git a/docs/search/criteria_reference/shipment_identifier_criterion.md b/docs/search/criteria_reference/shipment_identifier_criterion.md index db55e3c658..dbba9113fb 100644 --- a/docs/search/criteria_reference/shipment_identifier_criterion.md +++ b/docs/search/criteria_reference/shipment_identifier_criterion.md @@ -16,10 +16,10 @@ The `Identifier` Search Criterion searches for shipments based on the shipment i ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Identifier; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Identifier('f1t7z-3rb3rt') + new Identifier('f1t7z-3rb3rt') ); ``` diff --git a/docs/search/criteria_reference/shipment_logicaland_criterion.md b/docs/search/criteria_reference/shipment_logicaland_criterion.md index 387e4c3bcf..bf42812308 100644 --- a/docs/search/criteria_reference/shipment_logicaland_criterion.md +++ b/docs/search/criteria_reference/shipment_logicaland_criterion.md @@ -16,13 +16,17 @@ The `LogicalAnd` Search Criterion matches shipments if all provided Criteria mat ### PHP ``` php +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\CreatedAt; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\LogicalAnd; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\ShippingMethod; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; +use Ibexa\Contracts\Shipping\Value\ShippingMethod\ShippingMethodInterface; -/** @var \Ibexa\Contracts\Shipping\Value\ShippingMethod\ShippingMethodInterface $shippingMethod */ +/** @var ShippingMethodInterface $shippingMethod */ $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\LogicalAnd( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\CreatedAt(new DateTime('2023-03-01')), - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\ShippingMethod($shippingMethod) + new LogicalAnd( + new CreatedAt(new DateTime('2023-03-01')), + new ShippingMethod($shippingMethod) ) ); ``` diff --git a/docs/search/criteria_reference/shipment_logicalor_criterion.md b/docs/search/criteria_reference/shipment_logicalor_criterion.md index 16a07037ff..48494cb49d 100644 --- a/docs/search/criteria_reference/shipment_logicalor_criterion.md +++ b/docs/search/criteria_reference/shipment_logicalor_criterion.md @@ -16,13 +16,17 @@ The `LogicalOr` Search Criterion matches shipments if at least one of the provid ### PHP ``` php +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\CreatedAt; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\LogicalOr; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\ShippingMethod; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; +use Ibexa\Contracts\Shipping\Value\ShippingMethod\ShippingMethodInterface; -/** @var \Ibexa\Contracts\Shipping\Value\ShippingMethod\ShippingMethodInterface $shippingMethod */ +/** @var ShippingMethodInterface $shippingMethod */ $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\LogicalOr( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\CreatedAt(new DateTime('2023-03-01')), - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\ShippingMethod($shippingMethod) + new LogicalOr( + new CreatedAt(new DateTime('2023-03-01')), + new ShippingMethod($shippingMethod) ) ); ``` diff --git a/docs/search/criteria_reference/shipment_owner_criterion.md b/docs/search/criteria_reference/shipment_owner_criterion.md index d836ff406d..b7762a7856 100644 --- a/docs/search/criteria_reference/shipment_owner_criterion.md +++ b/docs/search/criteria_reference/shipment_owner_criterion.md @@ -14,12 +14,13 @@ The `Owner` Criterion searches for shipments based on the user reference. ## Example ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Owner; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; +use Ibexa\Core\Repository\Values\User\UserReference; $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Owner( - new \Ibexa\Core\Repository\Values\User\UserReference(14) + new Owner( + new UserReference(14) ) ); ``` @@ -27,18 +28,19 @@ $query = new ShipmentQuery( `Owner` Criterion accepts also multiple values: ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\UserService; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Owner; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -/** @var \Ibexa\Contracts\Core\Repository\UserService $userService */ +/** @var UserService $userService */ $user1 = $userService->loadUser(12345); $user2 = $userService->loadUserByLogin('user'); $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Owner( + new Owner( [ - $user1, - $user2, + $user1, + $user2, ] ) ); diff --git a/docs/search/criteria_reference/shipment_shipping_method_criterion.md b/docs/search/criteria_reference/shipment_shipping_method_criterion.md index 447b71602b..20d1c52999 100644 --- a/docs/search/criteria_reference/shipment_shipping_method_criterion.md +++ b/docs/search/criteria_reference/shipment_shipping_method_criterion.md @@ -16,11 +16,12 @@ The `ShippingMethod` Search Criterion searches for shipments based on a shipping ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\ShippingMethod; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; +use Ibexa\Contracts\Shipping\Value\ShippingMethod\ShippingMethodInterface; -/** @var \Ibexa\Contracts\Shipping\Value\ShippingMethod\ShippingMethodInterface $shippingMethod */ +/** @var ShippingMethodInterface $shippingMethod */ $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\ShippingMethod($shippingMethod) + new ShippingMethod($shippingMethod) ); ``` diff --git a/docs/search/criteria_reference/shipment_status_criterion.md b/docs/search/criteria_reference/shipment_status_criterion.md index 05b0ec1a51..559ec0db4a 100644 --- a/docs/search/criteria_reference/shipment_status_criterion.md +++ b/docs/search/criteria_reference/shipment_status_criterion.md @@ -16,10 +16,10 @@ The `Status` Search Criterion searches for shipments based on shipment status. ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Status; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; $query = new ShipmentQuery( - new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\Status('pending') + new Status('pending') ); ``` diff --git a/docs/search/criteria_reference/shipment_updatedat_criterion.md b/docs/search/criteria_reference/shipment_updatedat_criterion.md index 72763c3c48..e98469986b 100644 --- a/docs/search/criteria_reference/shipment_updatedat_criterion.md +++ b/docs/search/criteria_reference/shipment_updatedat_criterion.md @@ -17,10 +17,10 @@ The `UpdatedAt` Search Criterion searches for shipments based on the date when t ### PHP ``` php -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Shipping\Shipment\Query\Criterion\UpdatedAt; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -$criteria = new \Ibexa\Contracts\Shipping\Shipment\Query\Criterion\UpdatedAt( +$criteria = new UpdatedAt( new DateTime('2023-03-01'), 'GTE' ); diff --git a/docs/search/criteria_reference/sibling_criterion.md b/docs/search/criteria_reference/sibling_criterion.md index e1504c979c..4a5b032950 100644 --- a/docs/search/criteria_reference/sibling_criterion.md +++ b/docs/search/criteria_reference/sibling_criterion.md @@ -26,11 +26,12 @@ $query->query = new Criterion\Sibling(59, 2); You can also use the named constructor `Criterion\Sibling::fromLocation` and provide it with the location object: ``` php +use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; $query = new Query(); -/** @var \Ibexa\Contracts\Core\Repository\LocationService $locationService */ +/** @var LocationService $locationService */ $location = $locationService->loadLocation(59); $query->query = Criterion\Sibling::fromLocation($location); ``` diff --git a/docs/search/criteria_reference/simplemeasurementattribute_criterion.md b/docs/search/criteria_reference/simplemeasurementattribute_criterion.md index 7cd56eb2c3..1dfae495fc 100644 --- a/docs/search/criteria_reference/simplemeasurementattribute_criterion.md +++ b/docs/search/criteria_reference/simplemeasurementattribute_criterion.md @@ -16,15 +16,16 @@ The `SimpleMeasurementAttribute` Search Criterion searches for products by the v ### PHP ``` php +use Ibexa\Contracts\Measurement\MeasurementServiceInterface; +use Ibexa\Contracts\Measurement\Product\Query\Criterion\SimpleMeasurementAttribute; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; -use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; -/** @var \Ibexa\Contracts\Measurement\MeasurementServiceInterface $measurementService */ +/** @var MeasurementServiceInterface $measurementService */ $value = $measurementService->buildSimpleValue('length', 120, 'centimeter'); $query = new ProductQuery( null, - new \Ibexa\Contracts\Measurement\Product\Query\Criterion\SimpleMeasurementAttribute( + new SimpleMeasurementAttribute( 'width', $value ) diff --git a/docs/search/sort_clause_reference/baseprice_sort_clause.md b/docs/search/sort_clause_reference/baseprice_sort_clause.md index b19edc4e07..adf7a02fb0 100644 --- a/docs/search/sort_clause_reference/baseprice_sort_clause.md +++ b/docs/search/sort_clause_reference/baseprice_sort_clause.md @@ -20,10 +20,11 @@ The `BasePrice` Sort Clause isn't available in the Legacy Search engine. ``` php use Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\BasePrice; /** @var CurrencyInterface $currency */ $sortClauses = [ - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\BasePrice( + new BasePrice( $currency, ProductQuery::SORT_ASC ), diff --git a/docs/search/sort_clause_reference/createdat_sort_clause.md b/docs/search/sort_clause_reference/createdat_sort_clause.md index f68a4944fa..6ce2ef2c78 100644 --- a/docs/search/sort_clause_reference/createdat_sort_clause.md +++ b/docs/search/sort_clause_reference/createdat_sort_clause.md @@ -14,13 +14,14 @@ The `CreatedAt` Sort Clause sorts search results by the date and time of the cre ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CreatedAt; $productQuery = new ProductQuery( null, null, [ - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CreatedAt( - \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CreatedAt::SORT_ASC + new CreatedAt( + CreatedAt::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/customprice_sort_clause.md b/docs/search/sort_clause_reference/customprice_sort_clause.md index 3d8fdc15f0..9c13f23269 100644 --- a/docs/search/sort_clause_reference/customprice_sort_clause.md +++ b/docs/search/sort_clause_reference/customprice_sort_clause.md @@ -23,13 +23,14 @@ The `CustomPrice` Sort Clause isn't available in the Legacy Search engine. use Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface; use Ibexa\Contracts\ProductCatalog\Values\CustomerGroupInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CustomPrice; /** * @var CurrencyInterface $currency * @var CustomerGroupInterface $customerGroup */ $sortClauses = [ - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CustomPrice( + new CustomPrice( $currency, ProductQuery::SORT_ASC, $customerGroup diff --git a/docs/search/sort_clause_reference/order_created_sort_clause.md b/docs/search/sort_clause_reference/order_created_sort_clause.md index 20a3a1f8c2..cbea2e7f73 100644 --- a/docs/search/sort_clause_reference/order_created_sort_clause.md +++ b/docs/search/sort_clause_reference/order_created_sort_clause.md @@ -15,14 +15,15 @@ The `Created` Sort Clause sorts search results by the date and time when the ord ``` php use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Created; $criteria = null; $orderQuery = new OrderQuery( $criteria, [ - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Created( - \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Created::SORT_ASC + new Created( + Created::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/order_id_sort_clause.md b/docs/search/sort_clause_reference/order_id_sort_clause.md index 74db82f0b9..8a31696723 100644 --- a/docs/search/sort_clause_reference/order_id_sort_clause.md +++ b/docs/search/sort_clause_reference/order_id_sort_clause.md @@ -15,14 +15,15 @@ The `Id` Sort Clause sorts search results by order Id. ``` php use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Id; $criteria = null; $orderQuery = new OrderQuery( $criteria, [ - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Id( - \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Id::SORT_ASC + new Id( + Id::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/order_status_sort_clause.md b/docs/search/sort_clause_reference/order_status_sort_clause.md index 3173d9bf18..10af68250c 100644 --- a/docs/search/sort_clause_reference/order_status_sort_clause.md +++ b/docs/search/sort_clause_reference/order_status_sort_clause.md @@ -15,14 +15,15 @@ The `Status` Sort Clause sorts search results by order status. ``` php use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Status; $criteria = null; $orderQuery = new OrderQuery( $criteria, [ - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Status( - \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Status::SORT_ASC + new Status( + Status::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/order_updated_sort_clause.md b/docs/search/sort_clause_reference/order_updated_sort_clause.md index 87a3a63d8c..16e9457db9 100644 --- a/docs/search/sort_clause_reference/order_updated_sort_clause.md +++ b/docs/search/sort_clause_reference/order_updated_sort_clause.md @@ -15,14 +15,15 @@ The `Updated` Sort Clause sorts search results by the date and time when order s ``` php use Ibexa\Contracts\OrderManagement\Value\Order\OrderQuery; +use Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Updated; $criteria = null; $orderQuery = new OrderQuery( $criteria, [ - new \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Updated( - \Ibexa\Contracts\OrderManagement\Value\Order\Query\SortClause\Updated::SORT_ASC + new Updated( + Updated::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_createdat_sort_clause.md b/docs/search/sort_clause_reference/payment_createdat_sort_clause.md index 5c9c6572bc..2cbc3156a9 100644 --- a/docs/search/sort_clause_reference/payment_createdat_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_createdat_sort_clause.md @@ -15,14 +15,15 @@ The `CreatedAt` Sort Clause sorts search results by the date and time when the p ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\SortClause\CreatedAt; $criteria = null; $paymentQuery = new PaymentQuery( $criteria, [ - new \Ibexa\Contracts\Payment\Payment\Query\SortClause\CreatedAt( - \Ibexa\Contracts\Payment\Payment\Query\SortClause\CreatedAt::SORT_ASC + new CreatedAt( + CreatedAt::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_id_sort_clause.md b/docs/search/sort_clause_reference/payment_id_sort_clause.md index b1ae85c22f..f33f647650 100644 --- a/docs/search/sort_clause_reference/payment_id_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_id_sort_clause.md @@ -15,14 +15,15 @@ The `Id` Sort Clause sorts search results by payment ID. ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\SortClause\Id; $criteria = null; $paymentQuery = new PaymentQuery( $criteria, [ - new \Ibexa\Contracts\Payment\Payment\Query\SortClause\Id( - \Ibexa\Contracts\Payment\Payment\Query\SortClause\Id::SORT_ASC + new Id( + Id::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_identifier_sort_clause.md b/docs/search/sort_clause_reference/payment_identifier_sort_clause.md index 9eb188771b..4172ab5b13 100644 --- a/docs/search/sort_clause_reference/payment_identifier_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_identifier_sort_clause.md @@ -15,14 +15,15 @@ The `Identifier` Sort Clause sorts search results by payment identifier. ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\SortClause\Identifier; $criteria = null; $paymentQuery = new PaymentQuery( $criteria, [ - new \Ibexa\Contracts\Payment\Payment\Query\SortClause\Identifier( - \Ibexa\Contracts\Payment\Payment\Query\SortClause\Identifier::SORT_ASC + new Identifier( + Identifier::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_method_createdat_sort_clause.md b/docs/search/sort_clause_reference/payment_method_createdat_sort_clause.md index e9b386d399..f5abea53e7 100644 --- a/docs/search/sort_clause_reference/payment_method_createdat_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_method_createdat_sort_clause.md @@ -15,14 +15,15 @@ The `CreatedAt` Sort Clause sorts search results by the date and time when the p ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\CreatedAt; $criteria = null; $paymentMethodQuery = new PaymentMethodQuery( $criteria, [ - new \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\CreatedAt( - \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\CreatedAt::SORT_ASC + new CreatedAt( + CreatedAt::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_method_enabled_sort_clause.md b/docs/search/sort_clause_reference/payment_method_enabled_sort_clause.md index 85e7f6e3e3..f1271554e2 100644 --- a/docs/search/sort_clause_reference/payment_method_enabled_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_method_enabled_sort_clause.md @@ -15,14 +15,15 @@ The `Enabled` Sort Clause sorts search results by payment method status. ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Enabled; $criteria = null; $paymentMethodQuery = new PaymentMethodQuery( $criteria, [ - new \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Enabled( - \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Enabled::SORT_DESC + new Enabled( + Enabled::SORT_DESC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_method_id_sort_clause.md b/docs/search/sort_clause_reference/payment_method_id_sort_clause.md index 5173b48c3e..ab151080f9 100644 --- a/docs/search/sort_clause_reference/payment_method_id_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_method_id_sort_clause.md @@ -15,14 +15,15 @@ The `Id` Sort Clause sorts search results by payment method ID. ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Id; $criteria = null; $paymentMethodQuery = new PaymentMethodQuery( $criteria, [ - new \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Id( - \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Id::SORT_ASC + new Id( + Id::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_method_identifier_sort_clause.md b/docs/search/sort_clause_reference/payment_method_identifier_sort_clause.md index 8a70fd9bd2..47ef363005 100644 --- a/docs/search/sort_clause_reference/payment_method_identifier_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_method_identifier_sort_clause.md @@ -15,14 +15,15 @@ The `Identifier` Sort Clause sorts search results by payment method identifier. ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Identifier; $criteria = null; $paymentMethodQuery = new PaymentMethodQuery( $criteria, [ - new \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Identifier( - \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Identifier::SORT_ASC + new Identifier( + Identifier::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_method_updatedat_sort_clause.md b/docs/search/sort_clause_reference/payment_method_updatedat_sort_clause.md index da117cf6c3..ebbbd3461e 100644 --- a/docs/search/sort_clause_reference/payment_method_updatedat_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_method_updatedat_sort_clause.md @@ -15,14 +15,15 @@ The `UpdatedAt` Sort Clause sorts search results by the date and time when payme ``` php use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery; +use Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\UpdatedAt; $criteria = null; $paymentMethodQuery = new PaymentMethodQuery( $criteria, [ - new \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\UpdatedAt( - \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\UpdatedAt::SORT_DESC + new UpdatedAt( + UpdatedAt::SORT_DESC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_status_sort_clause.md b/docs/search/sort_clause_reference/payment_status_sort_clause.md index d7f805f524..957f6d024d 100644 --- a/docs/search/sort_clause_reference/payment_status_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_status_sort_clause.md @@ -15,14 +15,15 @@ The `Status` Sort Clause sorts search results by payment status. ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\SortClause\Status; $criteria = null; $paymentQuery = new PaymentQuery( $criteria, [ - new \Ibexa\Contracts\Payment\Payment\Query\SortClause\Status( - \Ibexa\Contracts\Payment\Payment\Query\SortClause\Status::SORT_ASC + new Status( + Status::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/payment_updatedat_sort_clause.md b/docs/search/sort_clause_reference/payment_updatedat_sort_clause.md index 344505ba41..e4fce6ea74 100644 --- a/docs/search/sort_clause_reference/payment_updatedat_sort_clause.md +++ b/docs/search/sort_clause_reference/payment_updatedat_sort_clause.md @@ -15,14 +15,15 @@ The `UpdatedAt` Sort Clause sorts search results by the date and time when payme ``` php use Ibexa\Contracts\Payment\Payment\PaymentQuery; +use Ibexa\Contracts\Payment\Payment\Query\SortClause\UpdatedAt; $criteria = null; $paymentQuery = new PaymentQuery( $criteria, [ - new \Ibexa\Contracts\Payment\Payment\Query\SortClause\UpdatedAt( - \Ibexa\Contracts\Payment\Payment\Query\SortClause\UpdatedAt::SORT_ASC + new UpdatedAt( + UpdatedAt::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/productavailability_sort_clause.md b/docs/search/sort_clause_reference/productavailability_sort_clause.md index 9ef70c1406..5decc32b9c 100644 --- a/docs/search/sort_clause_reference/productavailability_sort_clause.md +++ b/docs/search/sort_clause_reference/productavailability_sort_clause.md @@ -14,12 +14,13 @@ The `ProductAvailability` Sort Clause sorts search results by whether they have ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductAvailability; $query = new ProductQuery( null, null, [ - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductAvailability(), + new ProductAvailability(), ] ); ``` diff --git a/docs/search/sort_clause_reference/productcode_sort_clause.md b/docs/search/sort_clause_reference/productcode_sort_clause.md index 8b20582234..4a6dd5af0c 100644 --- a/docs/search/sort_clause_reference/productcode_sort_clause.md +++ b/docs/search/sort_clause_reference/productcode_sort_clause.md @@ -14,12 +14,13 @@ The `ProductCode` Sort Clause sorts search results by the product code. ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductCode; $query = new ProductQuery( null, null, [ - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductCode(), + new ProductCode(), ] ); ``` diff --git a/docs/search/sort_clause_reference/productname_sort_clause.md b/docs/search/sort_clause_reference/productname_sort_clause.md index a7f8b4c3cd..20faab6a41 100644 --- a/docs/search/sort_clause_reference/productname_sort_clause.md +++ b/docs/search/sort_clause_reference/productname_sort_clause.md @@ -14,12 +14,13 @@ The `ProductName` Sort Clause sorts search results by the Product code. ``` php use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; +use Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductName; $query = new ProductQuery( null, null, [ - new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductName(), + new ProductName(), ] ); ``` diff --git a/docs/search/sort_clause_reference/shipment_createdat_sort_clause.md b/docs/search/sort_clause_reference/shipment_createdat_sort_clause.md index b8526a0aa2..10391911a7 100644 --- a/docs/search/sort_clause_reference/shipment_createdat_sort_clause.md +++ b/docs/search/sort_clause_reference/shipment_createdat_sort_clause.md @@ -14,14 +14,16 @@ The `CreatedAt` Sort Clause sorts search results by the date and time when the s ## Example ``` php +use Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface; +use Ibexa\Contracts\Shipping\Shipment\Query\SortClause\CreatedAt; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -/** @var \Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface $criteria */ +/** @var CriterionInterface $criteria */ $shipmentQuery = new ShipmentQuery( $criteria, [ - new \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\CreatedAt( - \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\CreatedAt::SORT_ASC + new CreatedAt( + CreatedAt::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/shipment_id_sort_clause.md b/docs/search/sort_clause_reference/shipment_id_sort_clause.md index 55f63a6560..7f65840752 100644 --- a/docs/search/sort_clause_reference/shipment_id_sort_clause.md +++ b/docs/search/sort_clause_reference/shipment_id_sort_clause.md @@ -14,14 +14,16 @@ The `Id` Sort Clause sorts search results by shipment Id. ## Example ``` php +use Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface; +use Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Id; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -/** @var \Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface $criteria */ +/** @var CriterionInterface $criteria */ $shipmentQuery = new ShipmentQuery( $criteria, [ - new \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Id( - \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Id::SORT_ASC + new Id( + Id::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/shipment_identifier_sort_clause.md b/docs/search/sort_clause_reference/shipment_identifier_sort_clause.md index 18a93a034e..f85d05d35b 100644 --- a/docs/search/sort_clause_reference/shipment_identifier_sort_clause.md +++ b/docs/search/sort_clause_reference/shipment_identifier_sort_clause.md @@ -14,14 +14,16 @@ The `Identifier` Sort Clause sorts search results by shipment identifier. ## Example ``` php +use Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface; +use Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Identifier; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -/** @var \Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface $criteria */ +/** @var CriterionInterface $criteria */ $shipmentQuery = new ShipmentQuery( $criteria, [ - new \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Identifier( - \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Identifier::SORT_ASC + new Identifier( + Identifier::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/shipment_status_sort_clause.md b/docs/search/sort_clause_reference/shipment_status_sort_clause.md index f4a48e908a..e6643ee292 100644 --- a/docs/search/sort_clause_reference/shipment_status_sort_clause.md +++ b/docs/search/sort_clause_reference/shipment_status_sort_clause.md @@ -14,14 +14,16 @@ The `Status` Sort Clause sorts search results by shipment status. ## Example ``` php +use Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface; +use Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Status; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -/** @var \Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface $criteria */ +/** @var CriterionInterface $criteria */ $shipmentQuery = new ShipmentQuery( $criteria, [ - new \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Status( - \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\Status::SORT_ASC + new Status( + Status::SORT_ASC ), ] ); diff --git a/docs/search/sort_clause_reference/shipment_updatedat_sort_clause.md b/docs/search/sort_clause_reference/shipment_updatedat_sort_clause.md index 412a452113..26cd6a0fc1 100644 --- a/docs/search/sort_clause_reference/shipment_updatedat_sort_clause.md +++ b/docs/search/sort_clause_reference/shipment_updatedat_sort_clause.md @@ -14,14 +14,16 @@ The `UpdatedAt` Sort Clause sorts search results by the date and time when shipm ## Example ``` php +use Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface; +use Ibexa\Contracts\Shipping\Shipment\Query\SortClause\UpdatedAt; use Ibexa\Contracts\Shipping\Shipment\ShipmentQuery; -/** @var \Ibexa\Contracts\Shipping\Shipment\Query\CriterionInterface $criteria */ +/** @var CriterionInterface $criteria */ $shipmentQuery = new ShipmentQuery( $criteria, [ - new \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\UpdatedAt( - \Ibexa\Contracts\Shipping\Shipment\Query\SortClause\UpdatedAt::SORT_ASC + new UpdatedAt( + UpdatedAt::SORT_ASC ), ] ); diff --git a/docs/templating/twig_function_reference/recommendations_twig_functions.md b/docs/templating/twig_function_reference/recommendations_twig_functions.md index b2792122ba..1fd1e3fe49 100644 --- a/docs/templating/twig_function_reference/recommendations_twig_functions.md +++ b/docs/templating/twig_function_reference/recommendations_twig_functions.md @@ -118,8 +118,7 @@ final readonly class MyCrmWebsiteUserIdProvider implements WebsiteIdContextProvi public function __construct( private ConfigResolverInterface $configResolver, private PermissionResolver $permissionResolver, - ) { - } + ) {} public function getWebsiteId(): ?string { diff --git a/docs/templating/urls_and_routes/custom_breadcrumbs.md b/docs/templating/urls_and_routes/custom_breadcrumbs.md index 0c5254bc61..765a8443d6 100644 --- a/docs/templating/urls_and_routes/custom_breadcrumbs.md +++ b/docs/templating/urls_and_routes/custom_breadcrumbs.md @@ -50,7 +50,7 @@ custom_blog_index: use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; - /** @var \Symfony\Component\HttpFoundation\Request $request */ + /** @var Request $request */ if ($request->getMethod() != Request::METHOD_POST) { throw new NotFoundHttpException(); } diff --git a/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md b/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md index 4f994a85c9..30cc388c7e 100644 --- a/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md +++ b/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md @@ -74,7 +74,7 @@ class RideQueryType implements QueryType } /** @param array $parameters */ - public function getQuery(array $parameters = []): \Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery + public function getQuery(array $parameters = []): LocationQuery { return new LocationQuery([ 'filter' => new Criterion\LogicalAnd( diff --git a/docs/tutorials/beginner_tutorial/7_embed_content.md b/docs/tutorials/beginner_tutorial/7_embed_content.md index c9404e183b..51b1ba8d1b 100644 --- a/docs/tutorials/beginner_tutorial/7_embed_content.md +++ b/docs/tutorials/beginner_tutorial/7_embed_content.md @@ -134,9 +134,7 @@ use Ibexa\Core\MVC\Symfony\View\ContentView; class RideController extends Controller { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} public function viewRideWithLandmarksAction(ContentView $view): ContentView { diff --git a/docs/update_and_migration/from_4.6/update_from_4.6.md b/docs/update_and_migration/from_4.6/update_from_4.6.md index a42ea652c4..95e6557830 100644 --- a/docs/update_and_migration/from_4.6/update_from_4.6.md +++ b/docs/update_and_migration/from_4.6/update_from_4.6.md @@ -168,7 +168,7 @@ If the new bundle `ibexa/core-search` has not been added by the recipes, enable ``` php return [ // ... - Ibexa\Bundle\CoreSearch\IbexaCoreSearchBundle::class => ['all' => true], + IbexaCoreSearchBundle::class => ['all' => true], ]; ``` diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 4e5502181f..ef5141495f 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -65,12 +65,12 @@ use Rector\Config\RectorConfig; return RectorConfig::configure() ->withPaths( [ - __DIR__ . '/src', + __DIR__ . '/src', ] ) ->withSets( [ - IbexaSetList::IBEXA_46->value, + IbexaSetList::IBEXA_46->value, ] ) ->withPhpSets(php83: true) diff --git a/docs/users/oauth_server.md b/docs/users/oauth_server.md index d5f28f9d38..f9f1be7457 100644 --- a/docs/users/oauth_server.md +++ b/docs/users/oauth_server.md @@ -25,8 +25,8 @@ Then, in `config/bundles.php`, at the end of an array with a list of bundles, ad return [ // A lot of bundles… - Ibexa\Bundle\OAuth2Server\IbexaOAuth2ServerBundle::class => ['all' => true], - League\Bundle\OAuth2ServerBundle\LeagueOAuth2ServerBundle::class => ['all' => true], + IbexaOAuth2ServerBundle::class => ['all' => true], + LeagueOAuth2ServerBundle::class => ['all' => true], ]; ``` From ddd481ffcc9bdcd9c689cecb3b7eee014152655e Mon Sep 17 00:00:00 2001 From: adriendupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 18:55:06 +0000 Subject: [PATCH 46/66] PHP & JS CS Fixes --- .../src/AI/Action/TranscribeAudioAction.php | 4 +++- .../src/AI/ActionType/TranscribeAudioActionType.php | 4 +++- code_samples/ai_actions/src/AI/DataType/Audio.php | 4 +++- .../src/AI/Handler/LLaVaTextToTextActionHandler.php | 5 +++-- .../AI/Handler/WhisperAudioToTextActionHandler.php | 3 +-- .../ai_actions/src/AI/REST/Value/AudioText.php | 4 +++- .../src/AI/REST/Value/TranscribeAudioAction.php | 3 ++- code_samples/ai_actions/src/Query/Search.php | 3 +-- .../src/Controller/CustomCheckoutController.php | 3 ++- .../api/notifications/notification_send.php | 9 +++------ .../src/Notifications/ControllerFeedback.php | 4 +++- .../src/Command/FindByTaxonomyEmbeddingCommand.php | 3 +-- .../src/Controller/CustomController.php | 4 +++- .../src/Controller/CustomFilterController.php | 4 +++- .../src/Controller/PaginationController.php | 4 +++- .../api/public_php_api/src/embedding_fields.php | 3 +-- .../api/public_php_api/src/perform_count.php | 3 +-- .../api/rest_api/src/Rest/Values/Greeting.php | 3 ++- .../src/Calendar/Holidays/EventSourceFactory.php | 4 +++- .../back_office/images/src/SvgController.php | 9 ++++----- .../back_office/images/src/SvgExtension.php | 4 +++- .../src/Controller/CustomLimitationController.php | 3 ++- code_samples/back_office/limitation/src/Kernel.php | 3 +-- .../Form/FormSubmissionServiceDecorator.php | 3 ++- .../Security/Form/FormSubmissionsTabDecorator.php | 3 +-- .../Security/Limitation/CustomLimitationType.php | 3 +-- .../Mapper/CustomLimitationFormMapper.php | 4 +++- .../src/Controller/AllContentListController.php | 3 ++- .../src/EventSubscriber/HelpMenuSubscriber.php | 3 ++- .../EventListener/ContentPublishEventListener.php | 4 +++- .../notifications/src/Notification/ListRenderer.php | 3 ++- .../notifications/src/Notification/MyRenderer.php | 3 ++- .../event/subscriber/RichTextBlockSubscriber.php | 8 +++++--- .../NotificationScenarioSubscriber.php | 4 +++- .../EventSubscriber/MySuggestionEventSubscriber.php | 10 +++++----- .../search/src/Query/DateTimeAttributeQuery.php | 3 +-- .../src/Query/DateTimeAttributeRangeQuery.php | 3 +-- .../src/Query/ProductCategorySubtreeQuery.php | 3 +-- .../search/src/Query/SymbolAttributeTypeQuery.php | 3 +-- .../back_office/search/src/Query/UpdatedAtQuery.php | 3 +-- .../search/src/Query/UpdatedAtRangeQuery.php | 3 +-- .../Suggestion/ProductSuggestionNormalizer.php | 2 +- .../src/Strategy/StaticThumbnailStrategy.php | 4 +++- .../cache/http_cache/src/response_tagging.php | 11 ++++------- .../CatalogFilter/ProductNameFilterFormMapper.php | 4 +++- .../Collaboration/Cart/CartResolverDecorator.php | 3 ++- .../Collaboration/Cart/Mapper/CartProxyMapper.php | 3 ++- .../Cart/Mapper/CartSessionDomainMapper.php | 3 ++- .../Cart/PermissionResolverDecorator.php | 3 ++- .../Cart/Persistence/Gateway/DatabaseGateway.php | 5 ++--- .../src/Controller/ShareCartCreateController.php | 6 +++--- .../src/Controller/ShareCartJoinController.php | 3 ++- .../collaboration/src/Form/Data/ShareCartData.php | 3 ++- code_samples/collaboration/src/Query/Search.php | 3 +-- .../ApplicationDetailsViewSubscriber.php | 2 +- .../EventSubscriber/VerifyStateEventSubscriber.php | 3 ++- .../src/Migrations/Action/AssignSection.php | 4 +++- .../src/Migrations/Action/AssignSectionExecutor.php | 6 +++--- .../src/Migrations/Step/ReplaceNameStepExecutor.php | 4 +++- .../discounts/src/Command/OrderPriceCommand.php | 2 +- .../CurrentUserRegistrationDateResolver.php | 3 ++- .../RecentDiscountPrioritizationStrategy.php | 4 +++- .../src/Discounts/Step/AnniversaryConditionStep.php | 3 ++- .../AnniversaryConditionStepEventSubscriber.php | 4 ++-- .../AnniversaryConditionStepEventSubscriber.php | 4 ++-- .../FormMapper/PurchasingPowerParityValueMapper.php | 2 +- code_samples/discounts/src/Query/Search.php | 3 +-- .../2dpoint_ft/src/FieldType/Point2D/Value.php | 3 ++- .../field_types/2dpoint_ft/steps/step_1/Value.php | 3 ++- .../Comparison/HelloWorldComparisonEngine.php | 4 +++- .../Comparison/HelloWorldComparisonResult.php | 4 +++- .../src/FieldType/HelloWorld/Comparison/Value.php | 2 +- .../RichtextDescriptionFieldSubmissionConverter.php | 4 +++- .../src/Controller/RelationController.php | 3 ++- .../src/Controller/BreadcrumbController.php | 3 ++- .../front/layouts/menu/src/Menu/MenuBuilder.php | 4 +++- .../front/view_matcher/src/View/Matcher/Owner.php | 13 +++++++------ .../mcp/src/Command/McpServerListCommand.php | 4 +++- .../src/Block/Attribute/MyStringAttributeMapper.php | 8 ++++---- .../src/Form/Extension/AttributeTypeExtension.php | 3 +-- .../Subscriber/BlockEmbedEventEventSubscriber.php | 7 ++++--- .../src/Block/Listener/MyBlockListener.php | 3 +-- ...tAvailabilityPurchasableWithoutStockStrategy.php | 4 +++- .../PurchasableWithoutStockAvailabilityContext.php | 4 +++- .../recent_activity/src/Event/MyFeatureEvent.php | 3 ++- .../EventSubscriber/MyFeatureEventSubscriber.php | 7 ++++--- ...MyFeaturePostActivityListLoadEventSubscriber.php | 4 +++- .../recent_activity/src/recent_activity_disable.php | 3 +-- code_samples/recommendations/EventData.php | 3 ++- code_samples/recommendations/EventMapper.php | 3 ++- code_samples/recommendations/EventSubscriber.php | 3 ++- .../search/content/customfield_criterion.php | 3 +-- .../content/taxonomy_no_entries_criterion.php | 3 +-- .../search/content/taxonomy_subtree_criterion.php | 3 +-- .../GroupResolver/ContentTypeGroupGroupResolver.php | 4 +++- .../Query/Aggregation/PriorityRangeAggregation.php | 4 +++- .../Elasticsearch/CameraManufacturerVisitor.php | 2 +- .../Criterion/Solr/CameraManufacturerVisitor.php | 2 +- .../WebinarEventParentNameFieldMapper.php | 5 +++-- .../search/location/isbookmarked_criterion.php | 3 +-- .../src/Controller/ProductViewController.php | 4 +++- .../CartShoppingListTransferController.php | 3 ++- code_samples/shopping_list/search/criteria.php | 3 +-- code_samples/shopping_list/search/sort_clauses.php | 3 +-- .../TranslationsManagement/MyCustomAiProvider.php | 3 ++- .../src/TranslationsManagement/MyCustomProvider.php | 3 ++- .../page_tutorial/src/Event/RandomBlockListener.php | 6 +++--- .../AuthenticationTokenCreatedSubscriber.php | 3 ++- .../src/OAuth/GoogleResourceOwnerMapper.php | 4 ++-- .../EventListener/ApprovedTransitionListener.php | 4 +++- .../src/EventListener/LegalTransitionListener.php | 3 ++- tests/ValidationBaseline.php | 3 ++- tests/bootstrap.php | 2 +- 113 files changed, 250 insertions(+), 184 deletions(-) diff --git a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php index 3e27de2c4b..6ab3027e0f 100644 --- a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php @@ -9,7 +9,9 @@ final class TranscribeAudioAction extends Action { - public function __construct(private readonly Audio $audio) {} + public function __construct(private readonly Audio $audio) + { + } public function getParameters(): array { diff --git a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php index 4c132398ce..918736e2e3 100644 --- a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php +++ b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php @@ -18,7 +18,9 @@ public const string IDENTIFIER = 'transcribe_audio'; /** @param iterable $actionHandlers*/ - public function __construct(private iterable $actionHandlers) {} + public function __construct(private iterable $actionHandlers) + { + } public function getIdentifier(): string { diff --git a/code_samples/ai_actions/src/AI/DataType/Audio.php b/code_samples/ai_actions/src/AI/DataType/Audio.php index 5ec4ba854b..bea562a1c9 100644 --- a/code_samples/ai_actions/src/AI/DataType/Audio.php +++ b/code_samples/ai_actions/src/AI/DataType/Audio.php @@ -14,7 +14,9 @@ final class Audio implements DataType /** * @param non-empty-array $base64 */ - public function __construct(private array $base64) {} + public function __construct(private array $base64) + { + } public function getBase64(): string { diff --git a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php index 05d8bb3532..b1bd6c17d8 100644 --- a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php @@ -19,7 +19,8 @@ public function __construct( private HttpClientInterface $client, private string $host = 'http://localhost:8080' - ) {} + ) { + } public function supports(ActionInterface $action): bool { @@ -30,7 +31,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var Text */ + /** @var \Ibexa\Contracts\ConnectorAi\Action\DataType\Text */ $input = $action->getInput(); $text = $this->sanitizeInput($input->getText()); diff --git a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php index 1d73bcdbae..6623f6f3bf 100644 --- a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php @@ -5,7 +5,6 @@ namespace App\AI\Handler; use App\AI\ActionType\TranscribeAudioActionType; -use App\AI\DataType\Audio; use Ibexa\Contracts\ConnectorAi\Action\ActionHandlerInterface; use Ibexa\Contracts\ConnectorAi\Action\DataType\Text; use Ibexa\Contracts\ConnectorAi\Action\Response\TextResponse; @@ -27,7 +26,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var Audio $input */ + /** @var \App\AI\DataType\Audio $input */ $input = $action->getInput(); $path = $this->saveInputToFile($input->getBase64()); diff --git a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php index 99c01975b4..d9f2cbc417 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php +++ b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php @@ -6,4 +6,6 @@ use Ibexa\ConnectorAi\REST\Value\RestActionResponse; -final class AudioText extends RestActionResponse {} +final class AudioText extends RestActionResponse +{ +} diff --git a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php index ef19ccbb0d..6e33f288a0 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php @@ -12,7 +12,8 @@ public function __construct( private Audio $input, private RuntimeContext $runtimeContext - ) {} + ) { + } public function getInput(): Audio { diff --git a/code_samples/ai_actions/src/Query/Search.php b/code_samples/ai_actions/src/Query/Search.php index 108968d3b7..2069f83899 100644 --- a/code_samples/ai_actions/src/Query/Search.php +++ b/code_samples/ai_actions/src/Query/Search.php @@ -5,7 +5,6 @@ use Ibexa\Contracts\ConnectorAi\ActionConfiguration\ActionConfigurationQuery; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\Criterion; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\SortClause; -use Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\AbstractSortClause; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; @@ -22,5 +21,5 @@ new SortClause\Identifier(AbstractSortClause::SORT_ASC), ] ); -/** @var ActionConfigurationServiceInterface $actionConfigurationService */ +/** @var \Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface $actionConfigurationService */ $results = $actionConfigurationService->findActionConfigurations($query); diff --git a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php index 4101afa7c6..6dead11eb5 100644 --- a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php +++ b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php @@ -14,7 +14,8 @@ class CustomCheckoutController extends Controller public function __construct( private readonly CartServiceInterface $cartService, private readonly CheckoutServiceInterface $checkoutService - ) {} + ) { + } public function showContentAction(): Response { diff --git a/code_samples/api/notifications/notification_send.php b/code_samples/api/notifications/notification_send.php index 3a584bebbd..ce542c33a3 100644 --- a/code_samples/api/notifications/notification_send.php +++ b/code_samples/api/notifications/notification_send.php @@ -1,9 +1,6 @@ send( new SymfonyNotificationAdapter(new MyNotification($subject)), diff --git a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php index 7effa66575..0c82a0be11 100644 --- a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php +++ b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php @@ -4,4 +4,6 @@ use Symfony\Component\Notifier\Notification\Notification; -class ControllerFeedback extends Notification {} +class ControllerFeedback extends Notification +{ +} diff --git a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php index 34a93889ec..4d0af39535 100644 --- a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php @@ -5,7 +5,6 @@ namespace App\Command; use Ibexa\Contracts\Core\Repository\SearchService; -use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\EmbeddingQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; @@ -54,7 +53,7 @@ protected function execute( foreach ($result->searchHits as $searchHit) { assert($searchHit instanceof SearchHit); - /** @var Content $content */ + /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $content = $searchHit->valueObject; $contentInfo = $content->versionInfo->contentInfo; diff --git a/code_samples/api/public_php_api/src/Controller/CustomController.php b/code_samples/api/public_php_api/src/Controller/CustomController.php index 0b539852b0..1f00f31571 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomController.php @@ -10,7 +10,9 @@ class CustomController extends Controller { - public function __construct(private readonly SearchService $searchService) {} + public function __construct(private readonly SearchService $searchService) + { + } public function showContentAction(int $locationId): Response { diff --git a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php index cbbc14c6be..07c057262d 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php @@ -10,7 +10,9 @@ class CustomFilterController extends Controller { - public function __construct(private readonly ContentService $contentService) {} + public function __construct(private readonly ContentService $contentService) + { + } public function showChildrenAction(ContentView $view): ContentView { diff --git a/code_samples/api/public_php_api/src/Controller/PaginationController.php b/code_samples/api/public_php_api/src/Controller/PaginationController.php index 339adc98a0..3d72169833 100644 --- a/code_samples/api/public_php_api/src/Controller/PaginationController.php +++ b/code_samples/api/public_php_api/src/Controller/PaginationController.php @@ -13,7 +13,9 @@ class PaginationController extends Controller { - public function __construct(private readonly SearchService $searchService) {} + public function __construct(private readonly SearchService $searchService) + { + } public function showContentAction( Request $request, diff --git a/code_samples/api/public_php_api/src/embedding_fields.php b/code_samples/api/public_php_api/src/embedding_fields.php index 61570a881e..269bc7b4b0 100644 --- a/code_samples/api/public_php_api/src/embedding_fields.php +++ b/code_samples/api/public_php_api/src/embedding_fields.php @@ -1,9 +1,8 @@ create(); echo $embeddingField->getType(); // for example, "ibexa_dense_vector_model_123" diff --git a/code_samples/api/public_php_api/src/perform_count.php b/code_samples/api/public_php_api/src/perform_count.php index 0db9aae9ec..db61e36d73 100644 --- a/code_samples/api/public_php_api/src/perform_count.php +++ b/code_samples/api/public_php_api/src/perform_count.php @@ -1,10 +1,9 @@ getExtension('ibexa'); // Add the policy provider, you can register multiple providers by calling the method repeatedly diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php index 1b9efd5c75..d8a445b449 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php @@ -20,7 +20,8 @@ public function __construct( private readonly PermissionResolver $permissionResolver, private readonly ContentService $contentService, private readonly FormSubmissionGateway $gateway, - ) {} + ) { + } public function create( ContentInfo $content, diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index 1145ce3e01..493df39e9b 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -8,7 +8,6 @@ use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\LanguageService; use Ibexa\Contracts\Core\Repository\PermissionResolver; -use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Contracts\FormBuilder\FormSubmission\FormSubmissionServiceInterface; use Ibexa\FormBuilder\FieldType\FormFactory; @@ -65,7 +64,7 @@ public function renderView(array $parameters): string #[\Override] public function evaluate(array $parameters): bool { - /** @var Content $content */ + /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $content = $parameters['content']; return $this->innerTab->evaluate($parameters) && diff --git a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php index c2b013d1de..855a359d41 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php @@ -9,7 +9,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference; -use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\ValidationError; @@ -53,7 +52,7 @@ public function buildValue(array $limitationValues): CustomLimitationValue } /** - * @param ValueObject[]|null $targets + * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject[]|null $targets * * @return bool|null */ diff --git a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php index 30e01f6317..3d879f9ff1 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php @@ -29,5 +29,7 @@ public function getFormTemplate(): string return '@ibexadesign/limitation/custom_limitation_form.html.twig'; } - public function filterLimitationValues(Limitation $limitation): void {} + public function filterLimitationValues(Limitation $limitation): void + { + } } diff --git a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php index 0fc3d7ca49..dd07d01498 100644 --- a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php +++ b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php @@ -16,7 +16,8 @@ class AllContentListController extends Controller public function __construct( private readonly SearchService $searchService, private readonly FormFactory $formFactory - ) {} + ) { + } public function listAction(int $page = 1): Response { diff --git a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php index 01e374efef..7a97326ba6 100644 --- a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php +++ b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php @@ -11,7 +11,8 @@ { public function __construct( private bool $kernelDebug - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php index 8a153f58f5..c1447f80ba 100644 --- a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php +++ b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php @@ -9,7 +9,9 @@ final readonly class ContentPublishEventListener implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) {} + public function __construct(private NotificationService $notificationService) + { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/Notification/ListRenderer.php b/code_samples/back_office/notifications/src/Notification/ListRenderer.php index dfd097be61..5156265cee 100644 --- a/code_samples/back_office/notifications/src/Notification/ListRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/ListRenderer.php @@ -17,7 +17,8 @@ public function __construct( protected Environment $twig, protected RouterInterface $router, protected RequestStack $requestStack - ) {} + ) { + } public function render(Notification $notification): string { diff --git a/code_samples/back_office/notifications/src/Notification/MyRenderer.php b/code_samples/back_office/notifications/src/Notification/MyRenderer.php index 5abe1a38e8..0c2d38ccd4 100644 --- a/code_samples/back_office/notifications/src/Notification/MyRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/MyRenderer.php @@ -15,7 +15,8 @@ class MyRenderer implements NotificationRenderer, TypedNotificationRendererInter public function __construct( protected Environment $twig, protected RouterInterface $router - ) {} + ) { + } public function render(Notification $notification): string { diff --git a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php index 6f052c3a60..924e92ea45 100644 --- a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php +++ b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php @@ -13,9 +13,11 @@ class RichTextBlockSubscriber implements EventSubscriberInterface { /** - * @param DOMDocumentFactory $domDocumentFactory + * @param \Ibexa\FieldTypeRichText\RichText\DOMDocumentFactory $domDocumentFactory */ - public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) {} + public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) + { + } /** * {@inheritdoc} @@ -28,7 +30,7 @@ public static function getSubscribedEvents(): array } /** - * @param PreRenderEvent $event + * @param \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent $event */ public function onBlockPreRender(PreRenderEvent $event): void { diff --git a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php index edeb298b81..78ae51c261 100644 --- a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php +++ b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php @@ -13,7 +13,9 @@ final readonly class NotificationScenarioSubscriber implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) {} + public function __construct(private NotificationService $notificationService) + { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php index 22c68d56cc..05fe585da8 100644 --- a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php +++ b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php @@ -7,8 +7,6 @@ use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; use Ibexa\Contracts\Search\Event\BuildSuggestionCollectionEvent; -use Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion; -use Ibexa\ProductCatalog\Local\Repository\Values\Product; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -17,7 +15,9 @@ class MySuggestionEventSubscriber implements EventSubscriberInterface, LoggerAwa { use LoggerAwareTrait; - public function __construct(private ProductServiceInterface $productService) {} + public function __construct(private ProductServiceInterface $productService) + { + } public static function getSubscribedEvents(): array { @@ -46,13 +46,13 @@ public function onBuildSuggestionCollectionEvent(BuildSuggestionCollectionEvent if ($searchResult->getTotalCount()) { $maxScore = 0.0; $suggestionsByContentIds = []; - /** @var ContentSuggestion $suggestion */ + /** @var \Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion $suggestion */ foreach ($suggestionCollection as $suggestion) { $maxScore = max($suggestion->getScore(), $maxScore); $suggestionsByContentIds[$suggestion->getContent()->id] = $suggestion; } - /** @var Product $product */ + /** @var \Ibexa\ProductCatalog\Local\Repository\Values\Product $product */ foreach ($searchResult as $product) { $contentId = $product->getContent()->id; if (array_key_exists($contentId, $suggestionsByContentIds)) { diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php index 89ffb7d420..adde49a43e 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php @@ -2,7 +2,6 @@ use DateTimeImmutable; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; -use Ibexa\Contracts\ProductCatalog\ProductServiceInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalogDateTimeAttribute\Search\Criterion\DateTimeAttribute; @@ -10,5 +9,5 @@ $filter = new DateTimeAttribute('event_date', new DateTimeImmutable('2025-07-06')); $filter->setOperator(FieldValueCriterion::COMPARISON_EQ); $query->setFilter($filter); -/** @var ProductServiceInterface $productService */ +/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php index c91b9863b6..f8016aa377 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php @@ -1,11 +1,10 @@ setFilter(new DateTimeAttributeRange('event_date', new DateTimeImmutable('2025-01-01'))); -/** @var ProductServiceInterface $productService */ +/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php index a4dad8ae90..d050f96bed 100644 --- a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php +++ b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php @@ -1,13 +1,12 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php index 046d20f568..2c449d97b8 100644 --- a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php +++ b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php @@ -1,10 +1,9 @@ setFilter(new SymbolAttribute('ean', ['5023920187205'])); -/** @var ProductServiceInterface $productService */ +/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php index fdf241ebf1..e30aeecc40 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php @@ -1,7 +1,6 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php index dc8435f80b..49c5461ecb 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php @@ -1,7 +1,6 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php index 7dd644361e..4653b75476 100644 --- a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php +++ b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php @@ -21,7 +21,7 @@ public function normalize( ?string $format = null, array $context = [] ): array { - /** @var ProductSuggestion $object */ + /** @var \App\Search\Model\Suggestion\ProductSuggestion $object */ return [ 'type' => 'product', 'name' => $object->getName(), diff --git a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php index 70beaca623..d129da2432 100644 --- a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php +++ b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php @@ -11,7 +11,9 @@ final readonly class StaticThumbnailStrategy implements ThumbnailStrategy { - public function __construct(private string $staticThumbnail) {} + public function __construct(private string $staticThumbnail) + { + } public function getThumbnail( ContentType $contentType, diff --git a/code_samples/cache/http_cache/src/response_tagging.php b/code_samples/cache/http_cache/src/response_tagging.php index b4c8ae877c..c25931aefd 100644 --- a/code_samples/cache/http_cache/src/response_tagging.php +++ b/code_samples/cache/http_cache/src/response_tagging.php @@ -1,16 +1,13 @@ tag($view); // When working with a view -/** @var Content $content */ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $responseTagger->tag($content->getContentInfo()); // When working with a content item -/** @var Location $location */ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ $responseTagger->tag($location); // When working with a location diff --git a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php index 51d10d4b0e..21c36d85b0 100644 --- a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php +++ b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php @@ -11,7 +11,9 @@ final class ProductNameFilterFormMapper implements FilterFormMapperInterface { - public function __construct() {} + public function __construct() + { + } public function createFilterForm( FilterDefinitionInterface $filterDefinition, diff --git a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php index e5edf08092..39d377f04c 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php @@ -16,7 +16,8 @@ public function __construct( private CartResolverInterface $innerCartResolver, private SessionServiceInterface $sessionService, private RequestStack $requestStack - ) {} + ) { + } public function resolveCart(?User $user = null): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php index dd8e7000c8..8e719eba26 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php @@ -14,7 +14,8 @@ public function __construct( private Repository $repository, private CartServiceInterface $cartService, private ProxyGeneratorInterface $proxyGenerator - ) {} + ) { + } public function createCartProxy(string $identifier): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php index ab1dea1603..8f8a51ddb1 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php @@ -20,7 +20,8 @@ public function __construct( private CartProxyMapperInterface $cartProxyMapper, private UserProxyDomainMapperInterface $userDomainMapper, private ParticipantCollectionDomainMapperInterface $participantCollectionDomainMapper - ) {} + ) { + } /** * @param \App\Collaboration\Cart\Persistence\Values\CartSession $data diff --git a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php index 37528daa7f..575bfc840b 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php @@ -22,7 +22,8 @@ public function __construct( private readonly PermissionResolverInterface $innerPermissionResolver, private readonly SessionServiceInterface $sessionService, private readonly RequestStack $requestStack, - ) {} + ) { + } public function canUser(PolicyInterface $policy): bool { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php index e9019391d8..98a6c8ff23 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php @@ -2,7 +2,6 @@ namespace App\Collaboration\Cart\Persistence\Gateway; -use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct as CreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionUpdateStruct as UpdateStruct; use Doctrine\DBAL\Types\Types; @@ -52,7 +51,7 @@ public function getDiscriminator(): string } /** - * @param CartSessionCreateStruct $createStruct + * @param \App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct $createStruct */ public function create( int $sessionId, @@ -65,7 +64,7 @@ public function create( } /** - * @param AbstractSessionUpdateStruct $updateStruct + * @param \Ibexa\Collaboration\Persistence\Values\AbstractSessionUpdateStruct $updateStruct */ public function update(AbstractSessionUpdateStruct $updateStruct): void { diff --git a/code_samples/collaboration/src/Controller/ShareCartCreateController.php b/code_samples/collaboration/src/Controller/ShareCartCreateController.php index 85f4939e49..b0b612eba4 100644 --- a/code_samples/collaboration/src/Controller/ShareCartCreateController.php +++ b/code_samples/collaboration/src/Controller/ShareCartCreateController.php @@ -4,7 +4,6 @@ use App\Collaboration\Cart\CartSessionCreateStruct; use App\Collaboration\Cart\CartSessionType; -use App\Form\Data\ShareCartData; use App\Form\Type\ShareCartType; use Ibexa\Contracts\Cart\CartResolverInterface; use Ibexa\Contracts\Collaboration\Participant\ExternalParticipantCreateStruct; @@ -23,7 +22,8 @@ final class ShareCartCreateController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, private readonly CartResolverInterface $cartResolver - ) {} + ) { + } public function __invoke(Request $request): Response { @@ -37,7 +37,7 @@ public function __invoke(Request $request): Response $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - /** @var ShareCartData $data */ + /** @var \App\Form\Data\ShareCartData $data */ $data = $form->getData(); // Handle the form submission diff --git a/code_samples/collaboration/src/Controller/ShareCartJoinController.php b/code_samples/collaboration/src/Controller/ShareCartJoinController.php index 1580b27deb..79601e9f05 100644 --- a/code_samples/collaboration/src/Controller/ShareCartJoinController.php +++ b/code_samples/collaboration/src/Controller/ShareCartJoinController.php @@ -18,7 +18,8 @@ final class ShareCartJoinController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, - ) {} + ) { + } public function __invoke( Request $request, diff --git a/code_samples/collaboration/src/Form/Data/ShareCartData.php b/code_samples/collaboration/src/Form/Data/ShareCartData.php index 38391c76e4..37c2e0cc2c 100644 --- a/code_samples/collaboration/src/Form/Data/ShareCartData.php +++ b/code_samples/collaboration/src/Form/Data/ShareCartData.php @@ -6,7 +6,8 @@ final class ShareCartData { public function __construct( private ?string $email = null - ) {} + ) { + } public function getEmail(): ?string { diff --git a/code_samples/collaboration/src/Query/Search.php b/code_samples/collaboration/src/Query/Search.php index 8592b7430b..b4f7dfbabc 100644 --- a/code_samples/collaboration/src/Query/Search.php +++ b/code_samples/collaboration/src/Query/Search.php @@ -3,7 +3,6 @@ use Ibexa\Contracts\Collaboration\Session\Query\Criterion; use Ibexa\Contracts\Collaboration\Session\Query\SortClause; use Ibexa\Contracts\Collaboration\Session\SessionQuery; -use Ibexa\Contracts\Collaboration\SessionServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; use Ibexa\Contracts\CoreSearch\Values\Query\SortClause\FieldValueSortClause; @@ -18,5 +17,5 @@ new SortClause\CreatedAt(FieldValueSortClause::SORT_DESC), ] ); -/** @var SessionServiceInterface $sessionService */ +/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */ $sessionList = $sessionService->findSessions($query); diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php index 9412f88b68..a3aa625019 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php @@ -21,7 +21,7 @@ public function __construct( } /** - * @param ApplicationDetailsView $view + * @param \Ibexa\CorporateAccount\View\ApplicationDetailsView $view */ protected function configureView(View $view): void { diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php index ff4a2d7243..54a85470e1 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php @@ -23,7 +23,8 @@ public function __construct( private FormFactoryInterface $formFactory, private HandlerInterface $applicationStateHandler, private TranslatableNotificationHandlerInterface $notificationHandler - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSection.php b/code_samples/data_migration/src/Migrations/Action/AssignSection.php index d809fced4e..876c51491a 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSection.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSection.php @@ -10,7 +10,9 @@ { public const string TYPE = 'assign_section'; - public function __construct(private string $sectionIdentifier) {} + public function __construct(private string $sectionIdentifier) + { + } /** * @return string diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php index 1dcb4e7a1e..85f5ca40f3 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php @@ -4,7 +4,6 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\SectionService; -use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\ValueObject as APIValueObject; use Ibexa\Migration\StepExecutor\ActionExecutor\ExecutorInterface; use Ibexa\Migration\ValueObject; @@ -14,11 +13,12 @@ public function __construct( private ContentService $contentService, private SectionService $sectionService - ) {} + ) { + } /** * @param AssignSection $action - * @param Content $content + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ public function handle( ValueObject\Step\Action $action, diff --git a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php index 6d42605ca4..394e3dfd01 100644 --- a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php +++ b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php @@ -12,7 +12,9 @@ final class ReplaceNameStepExecutor extends AbstractStepExecutor { - public function __construct(private readonly ContentService $contentService) {} + public function __construct(private readonly ContentService $contentService) + { + } protected function doHandle(StepInterface $step) { diff --git a/code_samples/discounts/src/Command/OrderPriceCommand.php b/code_samples/discounts/src/Command/OrderPriceCommand.php index 56c96a64df..a5cd9d544f 100644 --- a/code_samples/discounts/src/Command/OrderPriceCommand.php +++ b/code_samples/discounts/src/Command/OrderPriceCommand.php @@ -62,7 +62,7 @@ public function execute( $output->writeln(sprintf('Discounted price: %s', $this->formatPrice($resolvedPrice->getMoney()))); if ($resolvedPrice instanceof PriceEnvelopeInterface) { - /** @var DiscountStamp $discountStamp */ + /** @var \Ibexa\Discounts\Value\Price\Stamp\DiscountStamp $discountStamp */ foreach ($resolvedPrice->all(DiscountStamp::class) as $discountStamp) { $output->writeln( sprintf( diff --git a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php index cddfb2767e..a232085345 100644 --- a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php +++ b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php @@ -12,7 +12,8 @@ public function __construct( private PermissionResolver $permissionResolver, private UserService $userService - ) {} + ) { + } /** * @return array{current_user_registration_date: \DateTimeInterface} diff --git a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php index 392f75d6f6..7805cfab00 100644 --- a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php +++ b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php @@ -7,7 +7,9 @@ final readonly class RecentDiscountPrioritizationStrategy implements DiscountPrioritizationStrategyInterface { - public function __construct(private DiscountPrioritizationStrategyInterface $inner) {} + public function __construct(private DiscountPrioritizationStrategyInterface $inner) + { + } public function getOrder(): array { diff --git a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php index 558f14bf90..3c40c44fdf 100644 --- a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php +++ b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php @@ -11,5 +11,6 @@ final class AnniversaryConditionStep extends AbstractDiscountStep public function __construct( public bool $enabled = false, public int $tolerance = 0 - ) {} + ) { + } } diff --git a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php index 9a4913093f..8765383d45 100644 --- a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array } /** - * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event + * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -30,7 +30,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var IsAccountAnniversary $discount */ + /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php index 0b71977079..8f60118ad1 100644 --- a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array } /** - * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event + * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -35,7 +35,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var IsAccountAnniversary $discount */ + /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php index d2c460bc1b..e25d813e2d 100644 --- a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php +++ b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php @@ -50,7 +50,7 @@ public function mapUpdateDataToStruct( } /** - * @param DiscountCreateStruct|DiscountUpdateStruct $struct + * @param \Ibexa\Contracts\Discounts\Value\Struct\DiscountCreateStruct|\Ibexa\Contracts\Discounts\Value\Struct\DiscountUpdateStruct $struct */ private function addRuleToStruct( DiscountValueInterface $data, diff --git a/code_samples/discounts/src/Query/Search.php b/code_samples/discounts/src/Query/Search.php index 2f0a0f4d49..9a6af40415 100644 --- a/code_samples/discounts/src/Query/Search.php +++ b/code_samples/discounts/src/Query/Search.php @@ -3,7 +3,6 @@ declare(strict_types=1); use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; -use Ibexa\Contracts\Discounts\DiscountServiceInterface; use Ibexa\Contracts\Discounts\Value\Query\Criterion; use Ibexa\Contracts\Discounts\Value\Query\DiscountQuery; use Ibexa\Contracts\Discounts\Value\Query\SortClause; @@ -26,5 +25,5 @@ ] ); -/** @var DiscountServiceInterface $discountService */ +/** @var \Ibexa\Contracts\Discounts\DiscountServiceInterface $discountService */ $results = $discountService->findDiscounts($query); diff --git a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php index 985549c9d2..894181613d 100644 --- a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php +++ b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php @@ -13,7 +13,8 @@ public function __construct( private ?float $x = null, #[Assert\NotBlank] private ?float $y = null - ) {} + ) { + } public function getX(): ?float { diff --git a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php index cbe2011bd9..7b5b193696 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php @@ -10,7 +10,8 @@ final class Value implements ValueInterface public function __construct( private ?float $x = null, private ?float $y = null - ) {} + ) { + } public function getX(): ?float { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php index 9569b98b2e..4cdb90f8fa 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php @@ -11,7 +11,9 @@ final readonly class HelloWorldComparisonEngine implements FieldTypeComparisonEngine { - public function __construct(private StringComparisonEngine $stringValueComparisonEngine) {} + public function __construct(private StringComparisonEngine $stringValueComparisonEngine) + { + } /** * @param Value $comparisonDataA diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php index a97569385a..4e6548d4d2 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php @@ -9,7 +9,9 @@ final readonly class HelloWorldComparisonResult implements ComparisonResult { - public function __construct(private StringComparisonResult $stringDiff) {} + public function __construct(private StringComparisonResult $stringDiff) + { + } public function getHelloWorldDiff(): StringComparisonResult { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php index 85b5b85c6b..54df3906f9 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php @@ -9,6 +9,6 @@ class Value extends FieldTypeComparisonValue { - /** @var StringComparisonValue */ + /** @var \Ibexa\VersionComparison\ComparisonValue\StringComparisonValue */ public StringComparisonValue $name; } diff --git a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php index afd3c1ce24..30981233db 100644 --- a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php +++ b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php @@ -4,4 +4,6 @@ use Ibexa\FormBuilder\FormSubmission\Converter\BooleanFieldSubmissionConverter; -class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter {} +class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter +{ +} diff --git a/code_samples/front/embed_content/src/Controller/RelationController.php b/code_samples/front/embed_content/src/Controller/RelationController.php index e30e63e33d..5af6bf03b6 100644 --- a/code_samples/front/embed_content/src/Controller/RelationController.php +++ b/code_samples/front/embed_content/src/Controller/RelationController.php @@ -13,7 +13,8 @@ class RelationController public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService - ) {} + ) { + } public function showContentAction( View $view, diff --git a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php index cdc28a5ba2..b82a4feeed 100644 --- a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php +++ b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php @@ -14,7 +14,8 @@ class BreadcrumbController extends Controller public function __construct( private readonly LocationService $locationService, private readonly SearchService $searchService - ) {} + ) { + } public function showBreadcrumbsAction($locationId): Response { diff --git a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php index f320e4cb22..9266372cf2 100644 --- a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php +++ b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php @@ -7,7 +7,9 @@ class MenuBuilder { - public function __construct(private readonly FactoryInterface $factory) {} + public function __construct(private readonly FactoryInterface $factory) + { + } public function buildMenu(): ItemInterface { diff --git a/code_samples/front/view_matcher/src/View/Matcher/Owner.php b/code_samples/front/view_matcher/src/View/Matcher/Owner.php index d441783063..9c21e12141 100644 --- a/code_samples/front/view_matcher/src/View/Matcher/Owner.php +++ b/code_samples/front/view_matcher/src/View/Matcher/Owner.php @@ -2,7 +2,6 @@ namespace App\View\Matcher; -use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -17,10 +16,12 @@ class Owner implements MatcherInterface /** @var string[] */ private array $matchingUserLogins; - public function __construct(private readonly UserService $userService) {} + public function __construct(private readonly UserService $userService) + { + } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function matchLocation(Location $location): bool { @@ -28,7 +29,7 @@ public function matchLocation(Location $location): bool } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function matchContentInfo(ContentInfo $contentInfo): bool { @@ -36,7 +37,7 @@ public function matchContentInfo(ContentInfo $contentInfo): bool } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function match(View $view): ?bool { @@ -52,7 +53,7 @@ public function match(View $view): ?bool } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ private function hasOwner(ContentInfo $contentInfo): bool { diff --git a/code_samples/mcp/src/Command/McpServerListCommand.php b/code_samples/mcp/src/Command/McpServerListCommand.php index 12ccbb909e..ad21b3f104 100644 --- a/code_samples/mcp/src/Command/McpServerListCommand.php +++ b/code_samples/mcp/src/Command/McpServerListCommand.php @@ -10,7 +10,9 @@ #[AsCommand(name: 'app:mcp:server_list', description: 'List MCP servers')] class McpServerListCommand { - public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) {} + public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) + { + } public function __invoke(SymfonyStyle $io): int { diff --git a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php index f3641d6a65..f5158b7d1c 100644 --- a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php +++ b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php @@ -10,12 +10,12 @@ class MyStringAttributeMapper implements AttributeFormTypeMapperInterface { /** - * @param FormBuilderInterface $formBuilder - * @param BlockDefinition $blockDefinition - * @param BlockAttributeDefinition $blockAttributeDefinition + * @param \Symfony\Component\Form\FormBuilderInterface $formBuilder + * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockDefinition $blockDefinition + * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockAttributeDefinition $blockAttributeDefinition * @param array $constraints * - * @return FormBuilderInterface + * @return \Symfony\Component\Form\FormBuilderInterface * * @throws \Exception */ diff --git a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php index 779bcc8a74..33c2e4e853 100644 --- a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php +++ b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php @@ -1,6 +1,5 @@ getConstraints()['custom_not_blank'])) { diff --git a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php index 6b06810792..408be0db42 100644 --- a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php +++ b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php @@ -5,12 +5,13 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; -use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class BlockEmbedEventEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ContentService $contentService) {} + public function __construct(private readonly ContentService $contentService) + { + } public static function getSubscribedEvents(): array { @@ -21,7 +22,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var TwigRenderRequest $renderRequest */ + /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); $parameters['event_content'] = $this->contentService->loadContent($parameters['event']); diff --git a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php index 914b498f0f..00f0884efb 100644 --- a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php +++ b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php @@ -4,7 +4,6 @@ use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; -use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyBlockListener implements EventSubscriberInterface @@ -18,7 +17,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var TwigRenderRequest $renderRequest */ + /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); diff --git a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php index c28aa7ddc7..0c28ad889d 100644 --- a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php +++ b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php @@ -11,7 +11,9 @@ final readonly class ProductAvailabilityPurchasableWithoutStockStrategy implements ProductAvailabilityStrategyInterface { - public function __construct(private HandlerInterface $handler) {} + public function __construct(private HandlerInterface $handler) + { + } public function accept(AvailabilityContextInterface $context): bool { diff --git a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php index 0e4c6f1101..e8e8e547f6 100644 --- a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php +++ b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php @@ -4,4 +4,6 @@ use Ibexa\Contracts\ProductCatalog\Values\Availability\AvailabilityContextInterface; -final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface {} +final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface +{ +} diff --git a/code_samples/recent_activity/src/Event/MyFeatureEvent.php b/code_samples/recent_activity/src/Event/MyFeatureEvent.php index 51b7ba50e1..84b46ba6c1 100644 --- a/code_samples/recent_activity/src/Event/MyFeatureEvent.php +++ b/code_samples/recent_activity/src/Event/MyFeatureEvent.php @@ -9,7 +9,8 @@ class MyFeatureEvent extends Event public function __construct( private readonly object $object, private readonly string $action - ) {} + ) { + } public function getObject(): object { diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php index 4ba4a98456..812875614c 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php @@ -3,13 +3,14 @@ namespace App\EventSubscriber; use App\Event\MyFeatureEvent; -use App\MyFeature\MyFeature; use Ibexa\Contracts\ActivityLog\ActivityLogServiceInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyFeatureEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ActivityLogServiceInterface $activityLogService) {} + public function __construct(private readonly ActivityLogServiceInterface $activityLogService) + { + } public static function getSubscribedEvents(): array { @@ -20,7 +21,7 @@ public static function getSubscribedEvents(): array public function onMyFeatureEvent(MyFeatureEvent $event): void { - /** @var MyFeature $object */ + /** @var \App\MyFeature\MyFeature $object */ $object = $event->getObject(); $className = $object::class; $id = (string)$object->id; diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php index 354928100c..2133b67029 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php @@ -11,7 +11,9 @@ class MyFeaturePostActivityListLoadEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly MyFeatureService $myFeatureService) {} + public function __construct(private readonly MyFeatureService $myFeatureService) + { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/recent_activity/src/recent_activity_disable.php b/code_samples/recent_activity/src/recent_activity_disable.php index 0482bb0160..ba153acadf 100644 --- a/code_samples/recent_activity/src/recent_activity_disable.php +++ b/code_samples/recent_activity/src/recent_activity_disable.php @@ -1,7 +1,6 @@ disable(); // Perform operations that should not be logged to the activity log diff --git a/code_samples/recommendations/EventData.php b/code_samples/recommendations/EventData.php index 78a20b405a..4825ed6114 100644 --- a/code_samples/recommendations/EventData.php +++ b/code_samples/recommendations/EventData.php @@ -10,7 +10,8 @@ class EventData { public function __construct( private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) {} + ) { + } public function dispatchVisitEvent(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventMapper.php b/code_samples/recommendations/EventMapper.php index f8b924a91f..cf0bd3bd8e 100644 --- a/code_samples/recommendations/EventMapper.php +++ b/code_samples/recommendations/EventMapper.php @@ -13,7 +13,8 @@ class EventMapper public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) {} + ) { + } public function trackProductView(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventSubscriber.php b/code_samples/recommendations/EventSubscriber.php index 1be6a3fa84..175784efc4 100644 --- a/code_samples/recommendations/EventSubscriber.php +++ b/code_samples/recommendations/EventSubscriber.php @@ -14,7 +14,8 @@ class EventSubscriber implements EventSubscriberInterface public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/search/content/customfield_criterion.php b/code_samples/search/content/customfield_criterion.php index f675f94e42..a9a52400de 100644 --- a/code_samples/search/content/customfield_criterion.php +++ b/code_samples/search/content/customfield_criterion.php @@ -1,6 +1,5 @@ query = new Query\Criterion\CustomField('content_name_s', Operator::EQ, '/Ibexa.*/'); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_no_entries_criterion.php b/code_samples/search/content/taxonomy_no_entries_criterion.php index 2055b506ec..048006d41c 100644 --- a/code_samples/search/content/taxonomy_no_entries_criterion.php +++ b/code_samples/search/content/taxonomy_no_entries_criterion.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -16,5 +15,5 @@ ] ); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_subtree_criterion.php b/code_samples/search/content/taxonomy_subtree_criterion.php index fc4e59ff9d..c13f94ed70 100644 --- a/code_samples/search/content/taxonomy_subtree_criterion.php +++ b/code_samples/search/content/taxonomy_subtree_criterion.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -16,5 +15,5 @@ ] ); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php index 31f0257cef..a707b331c5 100644 --- a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php +++ b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php @@ -10,7 +10,9 @@ final readonly class ContentTypeGroupGroupResolver implements GroupResolverInterface { - public function __construct(private Handler $contentTypeHandler) {} + public function __construct(private Handler $contentTypeHandler) + { + } public function resolveDocumentGroup(BaseDocument $document): string { diff --git a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php index 7089067cb1..2952020fcd 100644 --- a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php +++ b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php @@ -12,4 +12,6 @@ * * @phpstan-extends \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\AbstractRangeAggregation */ -final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation {} +final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation +{ +} diff --git a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php index 58f2c79eca..d74655dd23 100644 --- a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php @@ -19,7 +19,7 @@ public function supports( } /** - * @param CameraManufacturerCriterion $criterion + * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion */ public function visit( CriterionVisitor $dispatcher, diff --git a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php index 1a4622ebd4..434b6ee313 100644 --- a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php @@ -16,7 +16,7 @@ public function canVisit(CriterionInterface $criterion): bool } /** - * @param CameraManufacturerCriterion $criterion + * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion */ public function visit( CriterionInterface $criterion, diff --git a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php index 6c894f539b..f2fe9173bf 100644 --- a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php +++ b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php @@ -14,7 +14,8 @@ class WebinarEventParentNameFieldMapper extends ContentFieldMapper public function __construct( protected ContentHandler $contentHandler, protected LocationHandler $locationHandler - ) {} + ) { + } public function accept(Content $content): bool { @@ -23,7 +24,7 @@ public function accept(Content $content): bool } /** - * @return Field[] + * @return \Ibexa\Contracts\Core\Search\Field[] */ public function mapFields(Content $content): array { diff --git a/code_samples/search/location/isbookmarked_criterion.php b/code_samples/search/location/isbookmarked_criterion.php index c7a67f7316..c61bf951b1 100644 --- a/code_samples/search/location/isbookmarked_criterion.php +++ b/code_samples/search/location/isbookmarked_criterion.php @@ -1,10 +1,9 @@ filter = new IsBookmarked(); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $results = $searchService->findLocations($query); diff --git a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php index 0e5fdfb877..a0988ff216 100644 --- a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php +++ b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php @@ -13,7 +13,9 @@ class ProductViewController extends AbstractController { - public function __construct(private readonly LocalProductServiceInterface $productService) {} + public function __construct(private readonly LocalProductServiceInterface $productService) + { + } public function viewAction( Request $request, diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index 01758aa43d..c6a9721824 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -31,7 +31,8 @@ public function __construct( private readonly ShoppingListServiceInterface $shoppingListService, private readonly CartShoppingListTransferServiceInterface $cartShoppingListTransferService, private readonly LocalProductServiceInterface $productService - ) {} + ) { + } #[Route( path: '/app-shopping-list-cart', diff --git a/code_samples/shopping_list/search/criteria.php b/code_samples/shopping_list/search/criteria.php index 054c916e00..18c0ae2429 100644 --- a/code_samples/shopping_list/search/criteria.php +++ b/code_samples/shopping_list/search/criteria.php @@ -1,10 +1,9 @@ getCurrentUserReference()), diff --git a/code_samples/shopping_list/search/sort_clauses.php b/code_samples/shopping_list/search/sort_clauses.php index 8530a64aa4..4927957c09 100644 --- a/code_samples/shopping_list/search/sort_clauses.php +++ b/code_samples/shopping_list/search/sort_clauses.php @@ -1,11 +1,10 @@ findShoppingLists( new ShoppingListQuery( null, diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php index 33353fa67b..b1a2c4bf12 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php @@ -16,7 +16,8 @@ public function __construct( private MyApiClient $apiClient, private string $actionConfigurationIdentifier, - ) {} + ) { + } public function getIdentifier(): string { diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php index 204b93e79b..e726d3435f 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php @@ -15,7 +15,8 @@ */ public function __construct( private MyApiClient $apiClient, - ) {} + ) { + } public function getIdentifier(): string { diff --git a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php index 580273da51..04d20d6b93 100644 --- a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php +++ b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php @@ -12,7 +12,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; -use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class RandomBlockListener implements EventSubscriberInterface @@ -21,7 +20,8 @@ public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService, private readonly SearchService $searchService - ) {} + ) { + } public static function getSubscribedEvents(): array { @@ -33,7 +33,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { $blockValue = $event->getBlockValue(); - /** @var TwigRenderRequest $renderRequest */ + /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $renderRequest->getParameters(); diff --git a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php index 9a24a9f89e..4f351028c5 100644 --- a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php +++ b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php @@ -16,7 +16,8 @@ public function __construct( private readonly ConfigResolverInterface $configResolver, private readonly UserService $userService, private readonly array $userMap = [], - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php index b82f2c29ce..cbd1d14a74 100644 --- a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php +++ b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php @@ -31,7 +31,7 @@ public function __construct( } /** - * @param GoogleUser $resourceOwner + * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner */ protected function loadUser( ResourceOwnerInterface $resourceOwner, @@ -41,7 +41,7 @@ protected function loadUser( } /** - * @param GoogleUser $resourceOwner + * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner */ protected function createUser( ResourceOwnerInterface $resourceOwner, diff --git a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php index d113b372c2..1e6d72e701 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php @@ -10,7 +10,9 @@ class ApprovedTransitionListener extends AbstractTransitionWorkflowActionListener { - public function __construct(private readonly NotificationInterface $notificationHandler) {} + public function __construct(private readonly NotificationInterface $notificationHandler) + { + } public function getIdentifier(): string { diff --git a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php index 8bf9453e9d..9534a666a9 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php @@ -14,7 +14,8 @@ class LegalTransitionListener extends AbstractTransitionWorkflowActionListener public function __construct( private readonly NotificationInterface $notificationHandler, protected WorkflowRegistryInterface $workflowRegistry - ) {} + ) { + } public function getIdentifier(): string { diff --git a/tests/ValidationBaseline.php b/tests/ValidationBaseline.php index 53422e93e0..99ce772226 100644 --- a/tests/ValidationBaseline.php +++ b/tests/ValidationBaseline.php @@ -28,7 +28,8 @@ final class ValidationBaseline public function __construct( private readonly string $baselineFile, private readonly string $repoRoot, - ) {} + ) { + } public function isInBaseline( string $relativePath, diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 00cd6610cc..9374e6f3a2 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,7 +8,7 @@ use Composer\Autoload\ClassLoader; -/** @var ClassLoader $loader */ +/** @var \Composer\Autoload\ClassLoader $loader */ $loader = require __DIR__ . '/../vendor/autoload.php'; /** From 87af18cf061a50a9f7ffe8f45da206fcb476d00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Fri, 10 Jul 2026 10:46:16 +0200 Subject: [PATCH 47/66] Fix phpstan, mainly class.notFound Looks a lot like #3206 --- .../back_office_menus/back_office_menus.md | 4 +- .../back_office/notifications.md | 2 +- .../configuration/configuration.md | 2 +- .../configuration/repository_configuration.md | 2 +- docs/ai/ai_actions/configure_ai_actions.md | 2 +- .../shopping_list/install_shopping_list.md | 2 +- .../configure_collaborative_editing.md | 4 +- .../content_api/browsing_content.md | 14 +++--- .../content_api/creating_content.md | 4 +- .../content_api/managing_content.md | 6 +-- .../field_type_reference/authorfield.md | 26 +++++----- .../field_type_reference/binaryfilefield.md | 4 +- .../field_type_reference/countryfield.md | 4 +- .../field_type_reference/floatfield.md | 2 +- .../field_type_reference/imageassetfield.md | 4 +- .../field_type_reference/imagefield.md | 20 ++++---- .../field_type_reference/integerfield.md | 2 +- .../field_type_reference/relationfield.md | 4 +- .../field_type_reference/relationlistfield.md | 6 +-- .../field_type_reference/richtextfield.md | 4 +- .../field_type_reference/selectionfield.md | 2 +- .../field_type_reference/textlinefield.md | 2 +- .../field_type_reference/urlfield.md | 2 +- .../file_management/file_management.md | 4 +- .../taxonomy/taxonomy_api.md | 4 +- .../url_management/url_management.md | 2 +- .../workflow/add_custom_workflow_action.md | 2 +- .../cache/http_cache/content_aware_cache.md | 8 +-- .../siteaccess/injecting_siteaccess.md | 10 ++-- .../criteria_reference/ancestor_criterion.md | 46 ++++++++++------- .../parentlocationid_criterion.md | 49 ++++++++++++------- .../5_display_a_list_of_content_items.md | 1 + .../beginner_tutorial/7_embed_content.md | 1 + .../from_4.6/update_from_4.6.md | 2 +- docs/users/oauth_server.md | 4 +- 35 files changed, 144 insertions(+), 113 deletions(-) diff --git a/docs/administration/back_office/back_office_menus/back_office_menus.md b/docs/administration/back_office/back_office_menus/back_office_menus.md index 68f5ab6655..0290c90c87 100644 --- a/docs/administration/back_office/back_office_menus/back_office_menus.md +++ b/docs/administration/back_office/back_office_menus/back_office_menus.md @@ -86,7 +86,7 @@ The following method adds a new menu section under **Content**, and under it, a You can also pass parameters to templates used to render menu items with `template_parameters`: ``` php -/** @var ItemInterface $menu */ +/** @var \Knp\Menu\ItemInterface $menu */ $menu->addChild( 'all_content_list', [ @@ -107,7 +107,7 @@ You can then use the variable `custom_parameter` in `templates/themes/admin/list To have translatable labels, use `translation.key` from the `messages` domain: ``` php -/** @var ItemInterface $menu */ +/** @var \Knp\Menu\ItemInterface $menu */ $menu->addChild( 'all_content_list', [ diff --git a/docs/administration/back_office/notifications.md b/docs/administration/back_office/notifications.md index 8676f791e2..352934598a 100644 --- a/docs/administration/back_office/notifications.md +++ b/docs/administration/back_office/notifications.md @@ -26,7 +26,7 @@ There are four types of notifications: `info`, `success`, `warning` and `error`. To send a notification from PHP, inject the `TranslatableNotificationHandlerInterface` into your class. ``` php -/** @var TranslatableNotificationHandlerInterface $notificationHandler */ +/** @var \Ibexa\Contracts\AdminUi\Notification\TranslatableNotificationHandlerInterface $notificationHandler */ $notificationHandler->info( /** @Desc("Notification text") */ 'example.notification.text', diff --git a/docs/administration/configuration/configuration.md b/docs/administration/configuration/configuration.md index 2a99fd12f5..064d8ac3e4 100644 --- a/docs/administration/configuration/configuration.md +++ b/docs/administration/configuration/configuration.md @@ -74,7 +74,7 @@ parameters: ``` php // Usage inside a controller -/** @var ContainerInterface $container */ +/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */ $myParameter = $container->getParameter('myapp.parameter.name'); ``` diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index 5839c248d3..30e0815b6b 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -347,6 +347,6 @@ final class AcmeFeatureBundle extends Bundle To access the configuration settings, use the `Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider::getRepositoryConfig` method: ``` php -/** @var RepositoryConfigurationProviderInterface $repositoryConfigProvider */ +/** @var \Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface $repositoryConfigProvider */ $acmeConfig = $repositoryConfigProvider->getRepositoryConfig()['acme']; ``` diff --git a/docs/ai/ai_actions/configure_ai_actions.md b/docs/ai/ai_actions/configure_ai_actions.md index 269d584301..5e1eccbf1b 100644 --- a/docs/ai/ai_actions/configure_ai_actions.md +++ b/docs/ai/ai_actions/configure_ai_actions.md @@ -108,7 +108,7 @@ Then, if not using Symfony Flex, enable the bundle in `config/bundles.php`: ``` php return [ // ... - IbexaConnectorGeminiBundle::class => ['all' => true], + Ibexa\Bundle\ConnectorGemini\IbexaConnectorGeminiBundle::class => ['all' => true], ]; ``` diff --git a/docs/commerce/shopping_list/install_shopping_list.md b/docs/commerce/shopping_list/install_shopping_list.md index 9ce2a3bafa..3238f3982e 100644 --- a/docs/commerce/shopping_list/install_shopping_list.md +++ b/docs/commerce/shopping_list/install_shopping_list.md @@ -21,7 +21,7 @@ Check that the following line has been added by the recipe to `config/bundles.ph ``` php return [ // ... - IbexaShoppingListBundle::class => ['all' => true], + Ibexa\Bundle\ShoppingList\IbexaShoppingListBundle::class => ['all' => true], ]; ``` diff --git a/docs/content_management/collaborative_editing/configure_collaborative_editing.md b/docs/content_management/collaborative_editing/configure_collaborative_editing.md index cad6c0b566..b96b50a217 100644 --- a/docs/content_management/collaborative_editing/configure_collaborative_editing.md +++ b/docs/content_management/collaborative_editing/configure_collaborative_editing.md @@ -29,8 +29,8 @@ Then, if not using Symfony Flex, add the following code to the `config/bundles.p return [ // A lot of bundles… - IbexaFieldTypeRichTextRTEBundle::class => ['all' => true], - IbexaCkeditorPremiumBundle::class => ['all' => true], + Ibexa\Bundle\FieldTypeRichTextRTE\IbexaFieldTypeRichTextRTEBundle::class => ['all' => true], + Ibexa\Bundle\CkeditorPremium\IbexaCkeditorPremiumBundle::class => ['all' => true], ]; ``` diff --git a/docs/content_management/content_api/browsing_content.md b/docs/content_management/content_api/browsing_content.md index a3da25442e..96d889ff60 100644 --- a/docs/content_management/content_api/browsing_content.md +++ b/docs/content_management/content_api/browsing_content.md @@ -115,8 +115,8 @@ You can also specify the version number as the second argument to get Relations ``` php /** - * @var ContentInfo $contentInfo - * @var ContentService $contentService + * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo + * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService */ $versionInfo = $contentService->loadVersionInfo($contentInfo, 2); ``` @@ -187,7 +187,7 @@ To load a specific language, provide its language code when loading the content ``` php /** * @var int $contentId - * @var ContentService $contentService + * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService */ $content = $contentService->loadContent($contentId, ['ger-DE']); ``` @@ -230,7 +230,7 @@ You can do it through the `getMainLocation` method of the ContentInfo object. Next, use the `getParentLocation` method of the location object to access the parent location: ``` php -/** @var ContentInfo $contentInfo */ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ $mainLocation = $contentInfo->getMainLocation(); $parentLocation = $mainLocation?->getParentLocation(); if ($parentLocation !== null) { @@ -255,11 +255,11 @@ For example, to get the comparison between the `name` field of two versions: ``` php /** - * @var ContentInfo $contentInfo + * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo * @var int $versionFromId * @var int $versionToId - * @var ContentService $contentService - * @var VersionComparisonServiceInterface $comparisonService + * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var \Ibexa\Contracts\VersionComparison\Service\VersionComparisonServiceInterface $comparisonService */ $versionFrom = $contentService->loadVersionInfo($contentInfo, $versionFromId); $versionTo = $contentService->loadVersionInfo($contentInfo, $versionToId); diff --git a/docs/content_management/content_api/creating_content.md b/docs/content_management/content_api/creating_content.md index 284539b466..55c3ee89c1 100644 --- a/docs/content_management/content_api/creating_content.md +++ b/docs/content_management/content_api/creating_content.md @@ -104,8 +104,8 @@ You can delete a single translation from a content item's version using [`Conten The method must be provided with a `VersionInfo` object and the code of the language to delete: ``` php -/** @var VersionInfo $versionInfo */ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo */ $languageCode = 'ger-DE'; -/** @var ContentService $contentService */ +/** @var \Ibexa\Contracts\Core\Repository\ContentService $contentService */ $contentService->deleteTranslationFromDraft($versionInfo, $languageCode); ``` diff --git a/docs/content_management/content_api/managing_content.md b/docs/content_management/content_api/managing_content.md index 461a1f652c..2a05e068d3 100644 --- a/docs/content_management/content_api/managing_content.md +++ b/docs/content_management/content_api/managing_content.md @@ -118,9 +118,9 @@ You can also provide a different location to restore in as a second argument: ``` php /** - * @var TrashItem $trashItem - * @var LocationService $locationService - * @var TrashService $trashService + * @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem $trashItem + * @var \Ibexa\Contracts\Core\Repository\LocationService $locationService + * @var \Ibexa\Contracts\Core\Repository\TrashService $trashService */ $locationId = 12345; $newParent = $locationService->loadLocation($locationId); diff --git a/docs/content_management/field_types/field_type_reference/authorfield.md b/docs/content_management/field_types/field_type_reference/authorfield.md index 38295289f8..aa343cf4c7 100644 --- a/docs/content_management/field_types/field_type_reference/authorfield.md +++ b/docs/content_management/field_types/field_type_reference/authorfield.md @@ -42,18 +42,20 @@ The hash format mostly matches the value object. It has the following key `autho Example ``` php -[ - [ - 'id' => 1, - 'name' => 'Boba Fett', - 'email' => 'boba.fett@example.com', - ], - [ - 'id' => 2, - 'name' => 'Darth Vader', - 'email' => 'darth.vader@example.com', - ], -]; +use Ibexa\Core\FieldType\Author; + +$authorList = new Author\Value([ + new Author\Author([ + 'id' => 1, + 'name' => 'Boba Fett', + 'email' => 'boba.fett@example.com', + ]), + new Author\Author([ + 'id' => 2, + 'name' => 'Darth Vader', + 'email' => 'darth.vader@example.com', + ]), +]); ``` #### String representation diff --git a/docs/content_management/field_types/field_type_reference/binaryfilefield.md b/docs/content_management/field_types/field_type_reference/binaryfilefield.md index 534185edaf..0d3d48903a 100644 --- a/docs/content_management/field_types/field_type_reference/binaryfilefield.md +++ b/docs/content_management/field_types/field_type_reference/binaryfilefield.md @@ -47,8 +47,8 @@ The hash format mostly matches the value object. It has the following keys: Example: ``` php -/** @var ContentCreateStruct $fileContentCreateStruct */ -$fileContentCreateStruct->setField('file', new Value([ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct $fileContentCreateStruct */ +$fileContentCreateStruct->setField('file', new Ibexa\Core\FieldType\BinaryFile\Value([ 'fileName' => 'example.pdf', 'inputUri' => '/tmp/example_for_website.pdf', ])); diff --git a/docs/content_management/field_types/field_type_reference/countryfield.md b/docs/content_management/field_types/field_type_reference/countryfield.md index 04d2301a2b..7acea36ab3 100644 --- a/docs/content_management/field_types/field_type_reference/countryfield.md +++ b/docs/content_management/field_types/field_type_reference/countryfield.md @@ -51,7 +51,7 @@ It's also available when setting value on the content field, by setting the valu ``` php // Value object content example -/** @var Content $content */ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $content->fields['countries'] = ['JP', 'NO']; ``` @@ -69,7 +69,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var Value $value */ +/** @var \Ibexa\Core\FieldType\Country\Value $value */ $value->countries = [ 'JP' => [ 'Name' => 'Japan', diff --git a/docs/content_management/field_types/field_type_reference/floatfield.md b/docs/content_management/field_types/field_type_reference/floatfield.md index 9159fb1489..b8f36d8faa 100644 --- a/docs/content_management/field_types/field_type_reference/floatfield.md +++ b/docs/content_management/field_types/field_type_reference/floatfield.md @@ -64,7 +64,7 @@ This field type supports `FloatValueValidator`, defining maximum and minimum flo ``` php // Validator configuration example in PHP -/** @var Repository $repository */ +/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ $contentTypeService = $repository->getContentTypeService(); $floatFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('float', 'ibexa_float'); diff --git a/docs/content_management/field_types/field_type_reference/imageassetfield.md b/docs/content_management/field_types/field_type_reference/imageassetfield.md index 266c853565..6c0d80ec96 100644 --- a/docs/content_management/field_types/field_type_reference/imageassetfield.md +++ b/docs/content_management/field_types/field_type_reference/imageassetfield.md @@ -33,8 +33,8 @@ Value object of `ibexa_image_asset` contains the following properties: /** * Value object content example. * - * @var Value $imageAssetValue - * @var ContentInfo $contentInfo + * @var \Ibexa\Core\FieldType\ImageAsset\Value $imageAssetValue + * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ $imageAssetValue->destinationContentId = $contentInfo->id; $imageAssetValue->alternativeText = 'Picture of an apple.'; diff --git a/docs/content_management/field_types/field_type_reference/imagefield.md b/docs/content_management/field_types/field_type_reference/imagefield.md index 332fbb7d1a..ad9ea71866 100644 --- a/docs/content_management/field_types/field_type_reference/imagefield.md +++ b/docs/content_management/field_types/field_type_reference/imagefield.md @@ -151,9 +151,9 @@ It expects a VersionInfo, the Image field, and the variation name as a string (` ``` php /** - * @var VariationHandler $imageVariationHandler - * @var Field $imageField - * @var VersionInfo $versionInfo + * @var \Ibexa\Contracts\Core\Variation\VariationHandler $imageVariationHandler + * @var \Ibexa\Contracts\Core\Repository\Values\Content\Field $imageField + * @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo */ $variation = $imageVariationHandler->getVariation( $imageField, @@ -173,8 +173,8 @@ For an Image, the quickest is to call `setField()` on the ContentStruct: ``` php /** - * @var ContentService $contentService - * @var ContentTypeService $contentTypeService + * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var \Ibexa\Contracts\Core\Repository\ContentTypeService $contentTypeService */ $createStruct = $contentService->newContentCreateStruct( $contentTypeService->loadContentTypeByIdentifier('image'), @@ -189,15 +189,15 @@ For that, you can use the `Image\Value::fromString()` method that accepts the pa ``` php /** - * @var ContentService $contentService - * @var ContentTypeService $contentTypeService + * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var \Ibexa\Contracts\Core\Repository\ContentTypeService $contentTypeService */ $createStruct = $contentService->newContentCreateStruct( $contentTypeService->loadContentTypeByIdentifier('image'), 'eng-GB' ); -$imageField = Value::fromString('/tmp/image.png'); +$imageField = \Ibexa\Core\FieldType\Image\Value::fromString('/tmp/image.png'); $imageField->alternativeText = 'My alternative text'; $createStruct->setField('image', $imageField); ``` @@ -205,8 +205,8 @@ $createStruct->setField('image', $imageField); You can also provide a hash of `Image\Value` properties, either to `setField()`, or to the constructor: ``` php -/** @var ContentCreateStruct $createStruct */ -$imageValue = new Value( +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct $createStruct */ +$imageValue = new \Ibexa\Core\FieldType\Image\Value( [ 'id' => '/tmp/image.png', 'fileSize' => 37931, diff --git a/docs/content_management/field_types/field_type_reference/integerfield.md b/docs/content_management/field_types/field_type_reference/integerfield.md index 26c4692b59..1315514313 100644 --- a/docs/content_management/field_types/field_type_reference/integerfield.md +++ b/docs/content_management/field_types/field_type_reference/integerfield.md @@ -26,7 +26,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var Value $integer */ +/** @var \Ibexa\Core\FieldType\Integer\Value $integer */ $integer->value = 8; ``` diff --git a/docs/content_management/field_types/field_type_reference/relationfield.md b/docs/content_management/field_types/field_type_reference/relationfield.md index d9f2016d2f..e60971614e 100644 --- a/docs/content_management/field_types/field_type_reference/relationfield.md +++ b/docs/content_management/field_types/field_type_reference/relationfield.md @@ -29,8 +29,8 @@ The Value class of this field type contains the following properties: /** * Value object content example. * - * @var Value $relation - * @var ContentInfo $contentInfo + * @var \Ibexa\Core\FieldType\Relation\Value $relation + * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ $relation->destinationContentId = $contentInfo->id; ``` diff --git a/docs/content_management/field_types/field_type_reference/relationlistfield.md b/docs/content_management/field_types/field_type_reference/relationlistfield.md index bd93d4bdc4..83d40a0935 100644 --- a/docs/content_management/field_types/field_type_reference/relationlistfield.md +++ b/docs/content_management/field_types/field_type_reference/relationlistfield.md @@ -31,9 +31,9 @@ This field type makes it possible to store and retrieve values of a relation to /** * Value object content example. * - * @var Value $relationList - * @var ContentInfo $contentInfo1 - * @var ContentInfo $contentInfo2 + * @var \Ibexa\Core\FieldType\RelationList\Value $relationList + * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo1 + * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo2 */ $relationList->destinationContentIds = [ $contentInfo1->id, diff --git a/docs/content_management/field_types/field_type_reference/richtextfield.md b/docs/content_management/field_types/field_type_reference/richtextfield.md index c0032c4eb3..1c91af55ab 100644 --- a/docs/content_management/field_types/field_type_reference/richtextfield.md +++ b/docs/content_management/field_types/field_type_reference/richtextfield.md @@ -72,8 +72,8 @@ The following example shows how to pass DocBook content to a [create struct](cre ``` php /** - * @var ContentService $contentService - * @var ContentType $contentType + * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType $contentType */ $contentCreateStruct = $contentService->newContentCreateStruct($contentType, 'eng-GB'); diff --git a/docs/content_management/field_types/field_type_reference/selectionfield.md b/docs/content_management/field_types/field_type_reference/selectionfield.md index f11d67084f..8d76e61b6e 100644 --- a/docs/content_management/field_types/field_type_reference/selectionfield.md +++ b/docs/content_management/field_types/field_type_reference/selectionfield.md @@ -27,7 +27,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content examples -/** @var Value $value */ +/** @var \Ibexa\Core\FieldType\Selection\Value $value */ // Single selection $value->selection = [1]; diff --git a/docs/content_management/field_types/field_type_reference/textlinefield.md b/docs/content_management/field_types/field_type_reference/textlinefield.md index 532fe18e79..5335516a4c 100644 --- a/docs/content_management/field_types/field_type_reference/textlinefield.md +++ b/docs/content_management/field_types/field_type_reference/textlinefield.md @@ -35,7 +35,7 @@ The length of the string provided must be between the minimum length defined in The default value for both properties is 0, which means that the validation is disabled by default. To set the validation properties, the `validateValidatorConfiguration()` method needs to be inspected, which receives an array with `minStringLength` and `maxStringLength` like in the following representation: -``` php +``` php {skip-validation} [ 'StringLengthValidator' => [ 'maxStringLength' => 60, diff --git a/docs/content_management/field_types/field_type_reference/urlfield.md b/docs/content_management/field_types/field_type_reference/urlfield.md index 5e91eb9e9f..9aae6a0c60 100644 --- a/docs/content_management/field_types/field_type_reference/urlfield.md +++ b/docs/content_management/field_types/field_type_reference/urlfield.md @@ -30,7 +30,7 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var Value $url */ +/** @var \Ibexa\Core\FieldType\Url\Value $url */ $url->link = 'https://www.ibexa.co'; $url->text = 'Ibexa'; ``` diff --git a/docs/content_management/file_management/file_management.md b/docs/content_management/file_management/file_management.md index 2c0c0e8c22..f2cd924f12 100644 --- a/docs/content_management/file_management/file_management.md +++ b/docs/content_management/file_management/file_management.md @@ -10,8 +10,8 @@ To access binary files from the PHP API, use the `Ibexa\Core\IO\IOServiceInterfa ``` php /** - * @var Field $field - * @var IOServiceInterface $ioService + * @var \Ibexa\Contracts\Core\Repository\Values\Content\Field $field + * @var \Ibexa\Core\IO\IOServiceInterface $ioService */ $file = $ioService->loadBinaryFile($field->value->id); $fileContent = $ioService->getFileContents($file); diff --git a/docs/content_management/taxonomy/taxonomy_api.md b/docs/content_management/taxonomy/taxonomy_api.md index 696c57d015..3956d093ca 100644 --- a/docs/content_management/taxonomy/taxonomy_api.md +++ b/docs/content_management/taxonomy/taxonomy_api.md @@ -22,8 +22,8 @@ and use `TaxonomyServiceInterface::loadEntryByIdentifier()`: A taxonomy entry identifier is unique per taxonomy. If you have [several taxonomies](taxonomy.md#customize-taxonomy-structure), you can increase code readability by always passing the taxonomy identifier even when it's the default one. The default taxonomy is `tags` if it exists, else the first configured taxonomy (see `\Ibexa\Taxonomy\Service\TaxonomyConfiguration::getDefaultTaxonomyName` for details). ``` php /** - * @var array $springs - * @var TaxonomyServiceInterface $taxonomyService + * @var array $springs + * @var \Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface $taxonomyService */ $springs[] = $taxonomyService->loadEntryByIdentifier('spring', 'tags'); $springs[] = $taxonomyService->loadEntryByIdentifier('spring', 'events'); diff --git a/docs/content_management/url_management/url_management.md b/docs/content_management/url_management/url_management.md index cc4c8569be..628535126c 100644 --- a/docs/content_management/url_management/url_management.md +++ b/docs/content_management/url_management/url_management.md @@ -213,7 +213,7 @@ The **URL wildcards** tab contains all the information about each URL wildcard. You can create URL wildcards with the public PHP API by using the `URLWildcardService` service: ``` php -/** @var Repository $repository */ +/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ $source = 'pictures/*/*'; $destination = 'media/images/{1}/{2}'; $redirect = true; diff --git a/docs/content_management/workflow/add_custom_workflow_action.md b/docs/content_management/workflow/add_custom_workflow_action.md index 93f78895d4..4fe26b1534 100644 --- a/docs/content_management/workflow/add_custom_workflow_action.md +++ b/docs/content_management/workflow/add_custom_workflow_action.md @@ -83,7 +83,7 @@ For example, you can override the message typed by the user: ``` php /** * @var array $context - * @var TransitionEvent $event + * @var \Symfony\Component\Workflow\Event\TransitionEvent $event */ $new_context = $context; $new_context['message'] = 'This article went through proofreading'; diff --git a/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md b/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md index 372a95cc80..a8d3eede50 100644 --- a/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md +++ b/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md @@ -173,9 +173,9 @@ Examples for adding specific content tags using the autowireable `ContentTagInte ``` php /** - * @var ContentTagInterface $tagHandler - * @var Content $content - * @var Location $location + * @var \Ibexa\Contracts\HttpCache\Handler\ContentTagInterface $tagHandler + * @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content + * @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ // Example for tagging everything needed for Content: @@ -211,7 +211,7 @@ For custom or built-in controllers (for example, REST) that still use `X-Locatio It supports singular and comma-separated location ID value(s): ``` php -/** @var Response $response */ +/** @var \Symfony\Component\HttpFoundation\Response $response */ $response->headers->set('X-Location-Id', '123'); // Alternatively using several Location ID values diff --git a/docs/multisite/siteaccess/injecting_siteaccess.md b/docs/multisite/siteaccess/injecting_siteaccess.md index c075d34fb0..d3ea7aae5e 100644 --- a/docs/multisite/siteaccess/injecting_siteaccess.md +++ b/docs/multisite/siteaccess/injecting_siteaccess.md @@ -23,14 +23,18 @@ declare(strict_types=1); namespace App; -use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface; class MyService { public function __construct( - private readonly SiteAccessServiceInterface $siteAccessService, - private readonly ContentService $contentService + private readonly SiteAccessServiceInterface $siteAccessService ) {} + + public function doSomethingWithCurrentSiteAccess(): void + { + $currentSiteAccess = $this->siteAccessService->getCurrent(); + // ... + } } ``` diff --git a/docs/search/criteria_reference/ancestor_criterion.md b/docs/search/criteria_reference/ancestor_criterion.md index 0b916fd62a..7cf1d72193 100644 --- a/docs/search/criteria_reference/ancestor_criterion.md +++ b/docs/search/criteria_reference/ancestor_criterion.md @@ -50,28 +50,40 @@ $query->query = new Criterion\Ancestor([$locationService->loadLocation(62)->path You can use the Ancestor Search Criterion to create a list of breadcrumbs leading to the Location: -``` php hl_lines="8" +``` php hl_lines="20" +use Ibexa\Bundle\Core\Controller; use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; - -$locationId = 12345; - -$query = new LocationQuery(); -/** @var LocationService $locationService */ -$query->query = new Criterion\Ancestor([$locationService->loadLocation($locationId)->pathString]); - -/** @var SearchService $searchService */ -$results = $searchService->findLocations($query); -$breadcrumbs = []; -foreach ($results->searchHits as $searchHit) { - $breadcrumbs[] = $searchHit; +use Symfony\Component\HttpFoundation\Response; + +class NavigationController extends Controller +{ + public function __construct( + private readonly LocationService $locationService, + private readonly SearchService $searchService + ) {} + + public function breadcrumbsAction(): Response + { + $locationId = 12345; + + $query = new LocationQuery(); + $query->query = new Criterion\Ancestor([$this->locationService->loadLocation($locationId)->pathString]); + + /** @var SearchService $searchService */ + $results = $this->searchService->findLocations($query); + $breadcrumbs = []; + foreach ($results->searchHits as $searchHit) { + $breadcrumbs[] = $searchHit; + } + + return $this->render('parts/breadcrumbs.html.twig', [ + 'breadcrumbs' => $breadcrumbs, + ]); + } } - -return $this->render('parts/breadcrumbs.html.twig', [ - 'breadcrumbs' => $breadcrumbs, -]); ``` ``` html+twig diff --git a/docs/search/criteria_reference/parentlocationid_criterion.md b/docs/search/criteria_reference/parentlocationid_criterion.md index 0e59dc6fc9..b19b60b710 100644 --- a/docs/search/criteria_reference/parentlocationid_criterion.md +++ b/docs/search/criteria_reference/parentlocationid_criterion.md @@ -49,29 +49,40 @@ $query->query = new Criterion\ParentLocationId([54, 58]); You can use the `ParentLocationId` Search Criterion to list blog posts contained in a blog: -``` php hl_lines="9" +``` php hl_lines="20" +use Ibexa\Bundle\Core\Controller; use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; - -$locationId = 12345; - -$query = new LocationQuery(); -$query->query = new Criterion\LogicalAnd([ - new Criterion\Visibility(Criterion\Visibility::VISIBLE), - new Criterion\ParentLocationId($locationId), -]); - -/** @var SearchService $searchService */ -$results = $searchService->findLocations($query); -$posts = []; -foreach ($results->searchHits as $searchHit) { - $posts[] = $searchHit; +use Symfony\Component\HttpFoundation\Response; + +class NavigationController extends Controller +{ + public function __construct( + private readonly SearchService $searchService + ) {} + + public function blogAction(): Response + { + $locationId = 12345; + + $query = new LocationQuery(); + $query->query = new Criterion\LogicalAnd([ + new Criterion\Visibility(Criterion\Visibility::VISIBLE), + new Criterion\ParentLocationId($locationId), + ]); + + $results = $this->searchService->findLocations($query); + $posts = []; + foreach ($results->searchHits as $searchHit) { + $posts[] = $searchHit; + } + + return $this->render('full/blog.html.twig', [ + 'posts' => $posts, + ]); + } } - -return $this->render('full/blog.html.twig', [ - 'posts' => $posts, -]); ``` ``` html+twig diff --git a/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md b/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md index 30cc388c7e..40c4ee08eb 100644 --- a/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md +++ b/docs/tutorials/beginner_tutorial/5_display_a_list_of_content_items.md @@ -86,6 +86,7 @@ class RideQueryType implements QueryType ]); } + /** @return array */ public function getSupportedParameters(): array { return []; diff --git a/docs/tutorials/beginner_tutorial/7_embed_content.md b/docs/tutorials/beginner_tutorial/7_embed_content.md index 51b1ba8d1b..aad2775a60 100644 --- a/docs/tutorials/beginner_tutorial/7_embed_content.md +++ b/docs/tutorials/beginner_tutorial/7_embed_content.md @@ -139,6 +139,7 @@ class RideController extends Controller public function viewRideWithLandmarksAction(ContentView $view): ContentView { $currentContent = $view->getContent(); + /** @var \Ibexa\Core\FieldType\RelationList\Value $landmarksListId */ $landmarksListId = $currentContent->getFieldValue('landmarks'); $landmarksList = []; diff --git a/docs/update_and_migration/from_4.6/update_from_4.6.md b/docs/update_and_migration/from_4.6/update_from_4.6.md index 95e6557830..a42ea652c4 100644 --- a/docs/update_and_migration/from_4.6/update_from_4.6.md +++ b/docs/update_and_migration/from_4.6/update_from_4.6.md @@ -168,7 +168,7 @@ If the new bundle `ibexa/core-search` has not been added by the recipes, enable ``` php return [ // ... - IbexaCoreSearchBundle::class => ['all' => true], + Ibexa\Bundle\CoreSearch\IbexaCoreSearchBundle::class => ['all' => true], ]; ``` diff --git a/docs/users/oauth_server.md b/docs/users/oauth_server.md index f9f1be7457..d5f28f9d38 100644 --- a/docs/users/oauth_server.md +++ b/docs/users/oauth_server.md @@ -25,8 +25,8 @@ Then, in `config/bundles.php`, at the end of an array with a list of bundles, ad return [ // A lot of bundles… - IbexaOAuth2ServerBundle::class => ['all' => true], - LeagueOAuth2ServerBundle::class => ['all' => true], + Ibexa\Bundle\OAuth2Server\IbexaOAuth2ServerBundle::class => ['all' => true], + League\Bundle\OAuth2ServerBundle\LeagueOAuth2ServerBundle::class => ['all' => true], ]; ``` From c277fee54719e2e4f138039c3bb39d69ddedd075 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:03:39 +0100 Subject: [PATCH 48/66] fix-cs --- .../src/AI/Action/TranscribeAudioAction.php | 4 +-- .../ActionType/TranscribeAudioActionType.php | 4 +-- .../ai_actions/src/AI/DataType/Audio.php | 4 +-- .../Handler/LLaVaTextToTextActionHandler.php | 5 ++- .../WhisperAudioToTextActionHandler.php | 3 +- .../src/AI/REST/Value/AudioText.php | 4 +-- .../AI/REST/Value/TranscribeAudioAction.php | 3 +- code_samples/ai_actions/src/Query/Search.php | 3 +- .../Controller/CustomCheckoutController.php | 3 +- .../api/notifications/notification_send.php | 9 +++-- .../src/Notifications/ControllerFeedback.php | 4 +-- .../FindByTaxonomyEmbeddingCommand.php | 3 +- .../src/Controller/CustomController.php | 4 +-- .../src/Controller/CustomFilterController.php | 4 +-- .../src/Controller/PaginationController.php | 4 +-- .../public_php_api/src/embedding_fields.php | 3 +- .../api/public_php_api/src/perform_count.php | 3 +- .../api/rest_api/src/Rest/Values/Greeting.php | 3 +- .../Calendar/Holidays/EventSourceFactory.php | 4 +-- .../back_office/images/src/SvgController.php | 9 ++--- .../back_office/images/src/SvgExtension.php | 4 +-- .../Controller/CustomLimitationController.php | 3 +- .../back_office/limitation/src/Kernel.php | 3 +- .../Form/FormSubmissionServiceDecorator.php | 3 +- .../Form/FormSubmissionsTabDecorator.php | 3 +- .../Limitation/CustomLimitationType.php | 3 +- .../Mapper/CustomLimitationFormMapper.php | 4 +-- .../Controller/AllContentListController.php | 3 +- .../EventSubscriber/HelpMenuSubscriber.php | 3 +- .../ContentPublishEventListener.php | 4 +-- .../src/Notification/ListRenderer.php | 3 +- .../src/Notification/MyRenderer.php | 3 +- .../subscriber/RichTextBlockSubscriber.php | 8 ++--- .../NotificationScenarioSubscriber.php | 4 +-- .../MySuggestionEventSubscriber.php | 10 +++--- .../src/Query/DateTimeAttributeQuery.php | 3 +- .../src/Query/DateTimeAttributeRangeQuery.php | 3 +- .../src/Query/ProductCategorySubtreeQuery.php | 3 +- .../src/Query/SymbolAttributeTypeQuery.php | 3 +- .../search/src/Query/UpdatedAtQuery.php | 3 +- .../search/src/Query/UpdatedAtRangeQuery.php | 3 +- .../ProductSuggestionNormalizer.php | 2 +- .../src/Strategy/StaticThumbnailStrategy.php | 4 +-- .../cache/http_cache/src/response_tagging.php | 11 +++--- .../ProductNameFilterFormMapper.php | 4 +-- .../Cart/CartResolverDecorator.php | 3 +- .../Cart/Mapper/CartProxyMapper.php | 3 +- .../Cart/Mapper/CartSessionDomainMapper.php | 3 +- .../Cart/PermissionResolverDecorator.php | 3 +- .../Persistence/Gateway/DatabaseGateway.php | 5 +-- .../Controller/ShareCartCreateController.php | 6 ++-- .../Controller/ShareCartJoinController.php | 3 +- .../src/Form/Data/ShareCartData.php | 3 +- .../collaboration/src/Query/Search.php | 3 +- .../ApplicationDetailsViewSubscriber.php | 2 +- .../VerifyStateEventSubscriber.php | 3 +- .../src/Migrations/Action/AssignSection.php | 4 +-- .../Action/AssignSectionExecutor.php | 6 ++-- .../Step/ReplaceNameStepExecutor.php | 4 +-- .../src/Command/OrderPriceCommand.php | 2 +- .../CurrentUserRegistrationDateResolver.php | 3 +- .../RecentDiscountPrioritizationStrategy.php | 4 +-- .../Step/AnniversaryConditionStep.php | 3 +- ...nniversaryConditionStepEventSubscriber.php | 4 +-- ...nniversaryConditionStepEventSubscriber.php | 4 +-- .../PurchasingPowerParityValueMapper.php | 2 +- code_samples/discounts/src/Query/Search.php | 3 +- .../src/FieldType/Point2D/Value.php | 3 +- .../2dpoint_ft/steps/step_1/Value.php | 3 +- .../Comparison/HelloWorldComparisonEngine.php | 4 +-- .../Comparison/HelloWorldComparisonResult.php | 4 +-- .../FieldType/HelloWorld/Comparison/Value.php | 2 +- ...extDescriptionFieldSubmissionConverter.php | 4 +-- .../src/Controller/RelationController.php | 3 +- .../src/Controller/BreadcrumbController.php | 3 +- .../layouts/menu/src/Menu/MenuBuilder.php | 4 +-- .../view_matcher/src/View/Matcher/Owner.php | 13 ++++--- .../mcp/src/Command/McpServerListCommand.php | 4 +-- .../Attribute/MyStringAttributeMapper.php | 8 ++--- .../Form/Extension/AttributeTypeExtension.php | 3 +- .../BlockEmbedEventEventSubscriber.php | 7 ++-- .../src/Block/Listener/MyBlockListener.php | 3 +- ...abilityPurchasableWithoutStockStrategy.php | 4 +-- ...hasableWithoutStockAvailabilityContext.php | 4 +-- .../src/Event/MyFeatureEvent.php | 3 +- .../MyFeatureEventSubscriber.php | 7 ++-- ...urePostActivityListLoadEventSubscriber.php | 4 +-- .../src/recent_activity_disable.php | 3 +- code_samples/recommendations/EventData.php | 3 +- code_samples/recommendations/EventMapper.php | 3 +- .../recommendations/EventSubscriber.php | 3 +- .../search/content/customfield_criterion.php | 3 +- .../content/taxonomy_no_entries_criterion.php | 3 +- .../content/taxonomy_subtree_criterion.php | 3 +- .../ContentTypeGroupGroupResolver.php | 4 +-- .../Aggregation/PriorityRangeAggregation.php | 4 +-- .../CameraManufacturerVisitor.php | 2 +- .../Solr/CameraManufacturerVisitor.php | 2 +- .../WebinarEventParentNameFieldMapper.php | 5 ++- .../location/isbookmarked_criterion.php | 3 +- .../src/Controller/ProductViewController.php | 4 +-- .../CartShoppingListTransferController.php | 3 +- .../shopping_list/search/criteria.php | 3 +- .../shopping_list/search/sort_clauses.php | 3 +- .../MyCustomAiProvider.php | 3 +- .../MyCustomProvider.php | 3 +- .../src/Event/RandomBlockListener.php | 6 ++-- .../AuthenticationTokenCreatedSubscriber.php | 3 +- .../src/OAuth/GoogleResourceOwnerMapper.php | 4 +-- .../ApprovedTransitionListener.php | 4 +-- .../EventListener/LegalTransitionListener.php | 3 +- .../back_office_menus/back_office_menus.md | 8 +++-- .../back_office/notifications.md | 4 ++- .../configuration/configuration.md | 4 ++- .../configuration/repository_configuration.md | 4 ++- docs/ai/ai_actions/configure_ai_actions.md | 4 ++- .../shopping_list/install_shopping_list.md | 4 ++- .../configure_collaborative_editing.md | 6 ++-- .../content_api/browsing_content.md | 25 ++++++++++---- .../content_api/creating_content.md | 7 ++-- .../content_api/managing_content.md | 10 ++++-- .../field_type_reference/authorfield.md | 20 +++++------ .../field_type_reference/binaryfilefield.md | 7 ++-- .../field_type_reference/countryfield.md | 8 +++-- .../field_type_reference/floatfield.md | 3 +- .../field_type_reference/imageassetfield.md | 7 ++-- .../field_type_reference/imagefield.md | 34 +++++++++++++------ .../field_type_reference/integerfield.md | 4 ++- .../field_type_reference/relationfield.md | 7 ++-- .../field_type_reference/relationlistfield.md | 9 +++-- .../field_type_reference/richtextfield.md | 7 ++-- .../field_type_reference/selectionfield.md | 4 ++- .../field_type_reference/urlfield.md | 4 ++- .../file_management/file_management.md | 7 ++-- .../taxonomy/taxonomy_api.md | 7 ++-- .../url_management/url_management.md | 4 ++- .../workflow/add_custom_workflow_action.md | 4 ++- .../cache/http_cache/content_aware_cache.md | 14 +++++--- .../criteria_reference/ancestor_criterion.md | 7 ++-- .../parentlocationid_criterion.md | 6 ++-- .../beginner_tutorial/7_embed_content.md | 3 +- .../from_4.6/update_from_4.6.md | 2 +- docs/users/oauth_server.md | 6 ++-- tests/ValidationBaseline.php | 3 +- tests/bootstrap.php | 2 +- 145 files changed, 354 insertions(+), 330 deletions(-) diff --git a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php index 6ab3027e0f..3e27de2c4b 100644 --- a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php @@ -9,9 +9,7 @@ final class TranscribeAudioAction extends Action { - public function __construct(private readonly Audio $audio) - { - } + public function __construct(private readonly Audio $audio) {} public function getParameters(): array { diff --git a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php index 918736e2e3..4c132398ce 100644 --- a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php +++ b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php @@ -18,9 +18,7 @@ public const string IDENTIFIER = 'transcribe_audio'; /** @param iterable $actionHandlers*/ - public function __construct(private iterable $actionHandlers) - { - } + public function __construct(private iterable $actionHandlers) {} public function getIdentifier(): string { diff --git a/code_samples/ai_actions/src/AI/DataType/Audio.php b/code_samples/ai_actions/src/AI/DataType/Audio.php index bea562a1c9..5ec4ba854b 100644 --- a/code_samples/ai_actions/src/AI/DataType/Audio.php +++ b/code_samples/ai_actions/src/AI/DataType/Audio.php @@ -14,9 +14,7 @@ final class Audio implements DataType /** * @param non-empty-array $base64 */ - public function __construct(private array $base64) - { - } + public function __construct(private array $base64) {} public function getBase64(): string { diff --git a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php index b1bd6c17d8..05d8bb3532 100644 --- a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php @@ -19,8 +19,7 @@ public function __construct( private HttpClientInterface $client, private string $host = 'http://localhost:8080' - ) { - } + ) {} public function supports(ActionInterface $action): bool { @@ -31,7 +30,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var \Ibexa\Contracts\ConnectorAi\Action\DataType\Text */ + /** @var Text */ $input = $action->getInput(); $text = $this->sanitizeInput($input->getText()); diff --git a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php index 6623f6f3bf..1d73bcdbae 100644 --- a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php @@ -5,6 +5,7 @@ namespace App\AI\Handler; use App\AI\ActionType\TranscribeAudioActionType; +use App\AI\DataType\Audio; use Ibexa\Contracts\ConnectorAi\Action\ActionHandlerInterface; use Ibexa\Contracts\ConnectorAi\Action\DataType\Text; use Ibexa\Contracts\ConnectorAi\Action\Response\TextResponse; @@ -26,7 +27,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var \App\AI\DataType\Audio $input */ + /** @var Audio $input */ $input = $action->getInput(); $path = $this->saveInputToFile($input->getBase64()); diff --git a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php index d9f2cbc417..99c01975b4 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php +++ b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php @@ -6,6 +6,4 @@ use Ibexa\ConnectorAi\REST\Value\RestActionResponse; -final class AudioText extends RestActionResponse -{ -} +final class AudioText extends RestActionResponse {} diff --git a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php index 6e33f288a0..ef19ccbb0d 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php @@ -12,8 +12,7 @@ public function __construct( private Audio $input, private RuntimeContext $runtimeContext - ) { - } + ) {} public function getInput(): Audio { diff --git a/code_samples/ai_actions/src/Query/Search.php b/code_samples/ai_actions/src/Query/Search.php index 2069f83899..108968d3b7 100644 --- a/code_samples/ai_actions/src/Query/Search.php +++ b/code_samples/ai_actions/src/Query/Search.php @@ -5,6 +5,7 @@ use Ibexa\Contracts\ConnectorAi\ActionConfiguration\ActionConfigurationQuery; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\Criterion; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\SortClause; +use Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\AbstractSortClause; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; @@ -21,5 +22,5 @@ new SortClause\Identifier(AbstractSortClause::SORT_ASC), ] ); -/** @var \Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface $actionConfigurationService */ +/** @var ActionConfigurationServiceInterface $actionConfigurationService */ $results = $actionConfigurationService->findActionConfigurations($query); diff --git a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php index 6dead11eb5..4101afa7c6 100644 --- a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php +++ b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php @@ -14,8 +14,7 @@ class CustomCheckoutController extends Controller public function __construct( private readonly CartServiceInterface $cartService, private readonly CheckoutServiceInterface $checkoutService - ) { - } + ) {} public function showContentAction(): Response { diff --git a/code_samples/api/notifications/notification_send.php b/code_samples/api/notifications/notification_send.php index ce542c33a3..3a584bebbd 100644 --- a/code_samples/api/notifications/notification_send.php +++ b/code_samples/api/notifications/notification_send.php @@ -1,6 +1,9 @@ send( new SymfonyNotificationAdapter(new MyNotification($subject)), diff --git a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php index 0c82a0be11..7effa66575 100644 --- a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php +++ b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php @@ -4,6 +4,4 @@ use Symfony\Component\Notifier\Notification\Notification; -class ControllerFeedback extends Notification -{ -} +class ControllerFeedback extends Notification {} diff --git a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php index 4d0af39535..34a93889ec 100644 --- a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php @@ -5,6 +5,7 @@ namespace App\Command; use Ibexa\Contracts\Core\Repository\SearchService; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\EmbeddingQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; @@ -53,7 +54,7 @@ protected function execute( foreach ($result->searchHits as $searchHit) { assert($searchHit instanceof SearchHit); - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ + /** @var Content $content */ $content = $searchHit->valueObject; $contentInfo = $content->versionInfo->contentInfo; diff --git a/code_samples/api/public_php_api/src/Controller/CustomController.php b/code_samples/api/public_php_api/src/Controller/CustomController.php index 1f00f31571..0b539852b0 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomController.php @@ -10,9 +10,7 @@ class CustomController extends Controller { - public function __construct(private readonly SearchService $searchService) - { - } + public function __construct(private readonly SearchService $searchService) {} public function showContentAction(int $locationId): Response { diff --git a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php index 07c057262d..cbbc14c6be 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php @@ -10,9 +10,7 @@ class CustomFilterController extends Controller { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} public function showChildrenAction(ContentView $view): ContentView { diff --git a/code_samples/api/public_php_api/src/Controller/PaginationController.php b/code_samples/api/public_php_api/src/Controller/PaginationController.php index 3d72169833..339adc98a0 100644 --- a/code_samples/api/public_php_api/src/Controller/PaginationController.php +++ b/code_samples/api/public_php_api/src/Controller/PaginationController.php @@ -13,9 +13,7 @@ class PaginationController extends Controller { - public function __construct(private readonly SearchService $searchService) - { - } + public function __construct(private readonly SearchService $searchService) {} public function showContentAction( Request $request, diff --git a/code_samples/api/public_php_api/src/embedding_fields.php b/code_samples/api/public_php_api/src/embedding_fields.php index 269bc7b4b0..61570a881e 100644 --- a/code_samples/api/public_php_api/src/embedding_fields.php +++ b/code_samples/api/public_php_api/src/embedding_fields.php @@ -1,8 +1,9 @@ create(); echo $embeddingField->getType(); // for example, "ibexa_dense_vector_model_123" diff --git a/code_samples/api/public_php_api/src/perform_count.php b/code_samples/api/public_php_api/src/perform_count.php index db61e36d73..0db9aae9ec 100644 --- a/code_samples/api/public_php_api/src/perform_count.php +++ b/code_samples/api/public_php_api/src/perform_count.php @@ -1,9 +1,10 @@ getExtension('ibexa'); // Add the policy provider, you can register multiple providers by calling the method repeatedly diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php index d8a445b449..1b9efd5c75 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php @@ -20,8 +20,7 @@ public function __construct( private readonly PermissionResolver $permissionResolver, private readonly ContentService $contentService, private readonly FormSubmissionGateway $gateway, - ) { - } + ) {} public function create( ContentInfo $content, diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index 493df39e9b..1145ce3e01 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -8,6 +8,7 @@ use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\LanguageService; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Contracts\FormBuilder\FormSubmission\FormSubmissionServiceInterface; use Ibexa\FormBuilder\FieldType\FormFactory; @@ -64,7 +65,7 @@ public function renderView(array $parameters): string #[\Override] public function evaluate(array $parameters): bool { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ + /** @var Content $content */ $content = $parameters['content']; return $this->innerTab->evaluate($parameters) && diff --git a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php index 855a359d41..c2b013d1de 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference; +use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\ValidationError; @@ -52,7 +53,7 @@ public function buildValue(array $limitationValues): CustomLimitationValue } /** - * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject[]|null $targets + * @param ValueObject[]|null $targets * * @return bool|null */ diff --git a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php index 3d879f9ff1..30e01f6317 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php @@ -29,7 +29,5 @@ public function getFormTemplate(): string return '@ibexadesign/limitation/custom_limitation_form.html.twig'; } - public function filterLimitationValues(Limitation $limitation): void - { - } + public function filterLimitationValues(Limitation $limitation): void {} } diff --git a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php index dd07d01498..0fc3d7ca49 100644 --- a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php +++ b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php @@ -16,8 +16,7 @@ class AllContentListController extends Controller public function __construct( private readonly SearchService $searchService, private readonly FormFactory $formFactory - ) { - } + ) {} public function listAction(int $page = 1): Response { diff --git a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php index 7a97326ba6..01e374efef 100644 --- a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php +++ b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php @@ -11,8 +11,7 @@ { public function __construct( private bool $kernelDebug - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php index c1447f80ba..8a153f58f5 100644 --- a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php +++ b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php @@ -9,9 +9,7 @@ final readonly class ContentPublishEventListener implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) - { - } + public function __construct(private NotificationService $notificationService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/Notification/ListRenderer.php b/code_samples/back_office/notifications/src/Notification/ListRenderer.php index 5156265cee..dfd097be61 100644 --- a/code_samples/back_office/notifications/src/Notification/ListRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/ListRenderer.php @@ -17,8 +17,7 @@ public function __construct( protected Environment $twig, protected RouterInterface $router, protected RequestStack $requestStack - ) { - } + ) {} public function render(Notification $notification): string { diff --git a/code_samples/back_office/notifications/src/Notification/MyRenderer.php b/code_samples/back_office/notifications/src/Notification/MyRenderer.php index 0c2d38ccd4..5abe1a38e8 100644 --- a/code_samples/back_office/notifications/src/Notification/MyRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/MyRenderer.php @@ -15,8 +15,7 @@ class MyRenderer implements NotificationRenderer, TypedNotificationRendererInter public function __construct( protected Environment $twig, protected RouterInterface $router - ) { - } + ) {} public function render(Notification $notification): string { diff --git a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php index 924e92ea45..6f052c3a60 100644 --- a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php +++ b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php @@ -13,11 +13,9 @@ class RichTextBlockSubscriber implements EventSubscriberInterface { /** - * @param \Ibexa\FieldTypeRichText\RichText\DOMDocumentFactory $domDocumentFactory + * @param DOMDocumentFactory $domDocumentFactory */ - public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) - { - } + public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) {} /** * {@inheritdoc} @@ -30,7 +28,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent $event + * @param PreRenderEvent $event */ public function onBlockPreRender(PreRenderEvent $event): void { diff --git a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php index 78ae51c261..edeb298b81 100644 --- a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php +++ b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php @@ -13,9 +13,7 @@ final readonly class NotificationScenarioSubscriber implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) - { - } + public function __construct(private NotificationService $notificationService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php index 05fe585da8..22c68d56cc 100644 --- a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php +++ b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php @@ -7,6 +7,8 @@ use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; use Ibexa\Contracts\Search\Event\BuildSuggestionCollectionEvent; +use Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion; +use Ibexa\ProductCatalog\Local\Repository\Values\Product; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -15,9 +17,7 @@ class MySuggestionEventSubscriber implements EventSubscriberInterface, LoggerAwa { use LoggerAwareTrait; - public function __construct(private ProductServiceInterface $productService) - { - } + public function __construct(private ProductServiceInterface $productService) {} public static function getSubscribedEvents(): array { @@ -46,13 +46,13 @@ public function onBuildSuggestionCollectionEvent(BuildSuggestionCollectionEvent if ($searchResult->getTotalCount()) { $maxScore = 0.0; $suggestionsByContentIds = []; - /** @var \Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion $suggestion */ + /** @var ContentSuggestion $suggestion */ foreach ($suggestionCollection as $suggestion) { $maxScore = max($suggestion->getScore(), $maxScore); $suggestionsByContentIds[$suggestion->getContent()->id] = $suggestion; } - /** @var \Ibexa\ProductCatalog\Local\Repository\Values\Product $product */ + /** @var Product $product */ foreach ($searchResult as $product) { $contentId = $product->getContent()->id; if (array_key_exists($contentId, $suggestionsByContentIds)) { diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php index adde49a43e..89ffb7d420 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php @@ -2,6 +2,7 @@ use DateTimeImmutable; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; +use Ibexa\Contracts\ProductCatalog\ProductServiceInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalogDateTimeAttribute\Search\Criterion\DateTimeAttribute; @@ -9,5 +10,5 @@ $filter = new DateTimeAttribute('event_date', new DateTimeImmutable('2025-07-06')); $filter->setOperator(FieldValueCriterion::COMPARISON_EQ); $query->setFilter($filter); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php index f8016aa377..c91b9863b6 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php @@ -1,10 +1,11 @@ setFilter(new DateTimeAttributeRange('event_date', new DateTimeImmutable('2025-01-01'))); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php index d050f96bed..a4dad8ae90 100644 --- a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php +++ b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php @@ -1,12 +1,13 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php index 2c449d97b8..046d20f568 100644 --- a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php +++ b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php @@ -1,9 +1,10 @@ setFilter(new SymbolAttribute('ean', ['5023920187205'])); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php index e30aeecc40..fdf241ebf1 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php @@ -1,6 +1,7 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php index 49c5461ecb..dc8435f80b 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php @@ -1,6 +1,7 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php index 4653b75476..7dd644361e 100644 --- a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php +++ b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php @@ -21,7 +21,7 @@ public function normalize( ?string $format = null, array $context = [] ): array { - /** @var \App\Search\Model\Suggestion\ProductSuggestion $object */ + /** @var ProductSuggestion $object */ return [ 'type' => 'product', 'name' => $object->getName(), diff --git a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php index d129da2432..70beaca623 100644 --- a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php +++ b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php @@ -11,9 +11,7 @@ final readonly class StaticThumbnailStrategy implements ThumbnailStrategy { - public function __construct(private string $staticThumbnail) - { - } + public function __construct(private string $staticThumbnail) {} public function getThumbnail( ContentType $contentType, diff --git a/code_samples/cache/http_cache/src/response_tagging.php b/code_samples/cache/http_cache/src/response_tagging.php index c25931aefd..b4c8ae877c 100644 --- a/code_samples/cache/http_cache/src/response_tagging.php +++ b/code_samples/cache/http_cache/src/response_tagging.php @@ -1,13 +1,16 @@ tag($view); // When working with a view -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ +/** @var Content $content */ $responseTagger->tag($content->getContentInfo()); // When working with a content item -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ +/** @var Location $location */ $responseTagger->tag($location); // When working with a location diff --git a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php index 21c36d85b0..51d10d4b0e 100644 --- a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php +++ b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php @@ -11,9 +11,7 @@ final class ProductNameFilterFormMapper implements FilterFormMapperInterface { - public function __construct() - { - } + public function __construct() {} public function createFilterForm( FilterDefinitionInterface $filterDefinition, diff --git a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php index 39d377f04c..e5edf08092 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php @@ -16,8 +16,7 @@ public function __construct( private CartResolverInterface $innerCartResolver, private SessionServiceInterface $sessionService, private RequestStack $requestStack - ) { - } + ) {} public function resolveCart(?User $user = null): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php index 8e719eba26..dd8e7000c8 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php @@ -14,8 +14,7 @@ public function __construct( private Repository $repository, private CartServiceInterface $cartService, private ProxyGeneratorInterface $proxyGenerator - ) { - } + ) {} public function createCartProxy(string $identifier): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php index 8f8a51ddb1..ab1dea1603 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php @@ -20,8 +20,7 @@ public function __construct( private CartProxyMapperInterface $cartProxyMapper, private UserProxyDomainMapperInterface $userDomainMapper, private ParticipantCollectionDomainMapperInterface $participantCollectionDomainMapper - ) { - } + ) {} /** * @param \App\Collaboration\Cart\Persistence\Values\CartSession $data diff --git a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php index 575bfc840b..37528daa7f 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php @@ -22,8 +22,7 @@ public function __construct( private readonly PermissionResolverInterface $innerPermissionResolver, private readonly SessionServiceInterface $sessionService, private readonly RequestStack $requestStack, - ) { - } + ) {} public function canUser(PolicyInterface $policy): bool { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php index 98a6c8ff23..e9019391d8 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php @@ -2,6 +2,7 @@ namespace App\Collaboration\Cart\Persistence\Gateway; +use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct as CreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionUpdateStruct as UpdateStruct; use Doctrine\DBAL\Types\Types; @@ -51,7 +52,7 @@ public function getDiscriminator(): string } /** - * @param \App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct $createStruct + * @param CartSessionCreateStruct $createStruct */ public function create( int $sessionId, @@ -64,7 +65,7 @@ public function create( } /** - * @param \Ibexa\Collaboration\Persistence\Values\AbstractSessionUpdateStruct $updateStruct + * @param AbstractSessionUpdateStruct $updateStruct */ public function update(AbstractSessionUpdateStruct $updateStruct): void { diff --git a/code_samples/collaboration/src/Controller/ShareCartCreateController.php b/code_samples/collaboration/src/Controller/ShareCartCreateController.php index b0b612eba4..85f4939e49 100644 --- a/code_samples/collaboration/src/Controller/ShareCartCreateController.php +++ b/code_samples/collaboration/src/Controller/ShareCartCreateController.php @@ -4,6 +4,7 @@ use App\Collaboration\Cart\CartSessionCreateStruct; use App\Collaboration\Cart\CartSessionType; +use App\Form\Data\ShareCartData; use App\Form\Type\ShareCartType; use Ibexa\Contracts\Cart\CartResolverInterface; use Ibexa\Contracts\Collaboration\Participant\ExternalParticipantCreateStruct; @@ -22,8 +23,7 @@ final class ShareCartCreateController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, private readonly CartResolverInterface $cartResolver - ) { - } + ) {} public function __invoke(Request $request): Response { @@ -37,7 +37,7 @@ public function __invoke(Request $request): Response $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - /** @var \App\Form\Data\ShareCartData $data */ + /** @var ShareCartData $data */ $data = $form->getData(); // Handle the form submission diff --git a/code_samples/collaboration/src/Controller/ShareCartJoinController.php b/code_samples/collaboration/src/Controller/ShareCartJoinController.php index 79601e9f05..1580b27deb 100644 --- a/code_samples/collaboration/src/Controller/ShareCartJoinController.php +++ b/code_samples/collaboration/src/Controller/ShareCartJoinController.php @@ -18,8 +18,7 @@ final class ShareCartJoinController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, - ) { - } + ) {} public function __invoke( Request $request, diff --git a/code_samples/collaboration/src/Form/Data/ShareCartData.php b/code_samples/collaboration/src/Form/Data/ShareCartData.php index 37c2e0cc2c..38391c76e4 100644 --- a/code_samples/collaboration/src/Form/Data/ShareCartData.php +++ b/code_samples/collaboration/src/Form/Data/ShareCartData.php @@ -6,8 +6,7 @@ final class ShareCartData { public function __construct( private ?string $email = null - ) { - } + ) {} public function getEmail(): ?string { diff --git a/code_samples/collaboration/src/Query/Search.php b/code_samples/collaboration/src/Query/Search.php index b4f7dfbabc..8592b7430b 100644 --- a/code_samples/collaboration/src/Query/Search.php +++ b/code_samples/collaboration/src/Query/Search.php @@ -3,6 +3,7 @@ use Ibexa\Contracts\Collaboration\Session\Query\Criterion; use Ibexa\Contracts\Collaboration\Session\Query\SortClause; use Ibexa\Contracts\Collaboration\Session\SessionQuery; +use Ibexa\Contracts\Collaboration\SessionServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; use Ibexa\Contracts\CoreSearch\Values\Query\SortClause\FieldValueSortClause; @@ -17,5 +18,5 @@ new SortClause\CreatedAt(FieldValueSortClause::SORT_DESC), ] ); -/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */ +/** @var SessionServiceInterface $sessionService */ $sessionList = $sessionService->findSessions($query); diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php index a3aa625019..9412f88b68 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php @@ -21,7 +21,7 @@ public function __construct( } /** - * @param \Ibexa\CorporateAccount\View\ApplicationDetailsView $view + * @param ApplicationDetailsView $view */ protected function configureView(View $view): void { diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php index 54a85470e1..ff4a2d7243 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php @@ -23,8 +23,7 @@ public function __construct( private FormFactoryInterface $formFactory, private HandlerInterface $applicationStateHandler, private TranslatableNotificationHandlerInterface $notificationHandler - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSection.php b/code_samples/data_migration/src/Migrations/Action/AssignSection.php index 876c51491a..d809fced4e 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSection.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSection.php @@ -10,9 +10,7 @@ { public const string TYPE = 'assign_section'; - public function __construct(private string $sectionIdentifier) - { - } + public function __construct(private string $sectionIdentifier) {} /** * @return string diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php index 85f5ca40f3..1dcb4e7a1e 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php @@ -4,6 +4,7 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\SectionService; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\ValueObject as APIValueObject; use Ibexa\Migration\StepExecutor\ActionExecutor\ExecutorInterface; use Ibexa\Migration\ValueObject; @@ -13,12 +14,11 @@ public function __construct( private ContentService $contentService, private SectionService $sectionService - ) { - } + ) {} /** * @param AssignSection $action - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content + * @param Content $content */ public function handle( ValueObject\Step\Action $action, diff --git a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php index 394e3dfd01..6d42605ca4 100644 --- a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php +++ b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php @@ -12,9 +12,7 @@ final class ReplaceNameStepExecutor extends AbstractStepExecutor { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} protected function doHandle(StepInterface $step) { diff --git a/code_samples/discounts/src/Command/OrderPriceCommand.php b/code_samples/discounts/src/Command/OrderPriceCommand.php index a5cd9d544f..56c96a64df 100644 --- a/code_samples/discounts/src/Command/OrderPriceCommand.php +++ b/code_samples/discounts/src/Command/OrderPriceCommand.php @@ -62,7 +62,7 @@ public function execute( $output->writeln(sprintf('Discounted price: %s', $this->formatPrice($resolvedPrice->getMoney()))); if ($resolvedPrice instanceof PriceEnvelopeInterface) { - /** @var \Ibexa\Discounts\Value\Price\Stamp\DiscountStamp $discountStamp */ + /** @var DiscountStamp $discountStamp */ foreach ($resolvedPrice->all(DiscountStamp::class) as $discountStamp) { $output->writeln( sprintf( diff --git a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php index a232085345..cddfb2767e 100644 --- a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php +++ b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php @@ -12,8 +12,7 @@ public function __construct( private PermissionResolver $permissionResolver, private UserService $userService - ) { - } + ) {} /** * @return array{current_user_registration_date: \DateTimeInterface} diff --git a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php index 7805cfab00..392f75d6f6 100644 --- a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php +++ b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php @@ -7,9 +7,7 @@ final readonly class RecentDiscountPrioritizationStrategy implements DiscountPrioritizationStrategyInterface { - public function __construct(private DiscountPrioritizationStrategyInterface $inner) - { - } + public function __construct(private DiscountPrioritizationStrategyInterface $inner) {} public function getOrder(): array { diff --git a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php index 3c40c44fdf..558f14bf90 100644 --- a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php +++ b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php @@ -11,6 +11,5 @@ final class AnniversaryConditionStep extends AbstractDiscountStep public function __construct( public bool $enabled = false, public int $tolerance = 0 - ) { - } + ) {} } diff --git a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php index 8765383d45..9a4913093f 100644 --- a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event + * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -30,7 +30,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ + /** @var IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php index 8f60118ad1..0b71977079 100644 --- a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event + * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -35,7 +35,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ + /** @var IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php index e25d813e2d..d2c460bc1b 100644 --- a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php +++ b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php @@ -50,7 +50,7 @@ public function mapUpdateDataToStruct( } /** - * @param \Ibexa\Contracts\Discounts\Value\Struct\DiscountCreateStruct|\Ibexa\Contracts\Discounts\Value\Struct\DiscountUpdateStruct $struct + * @param DiscountCreateStruct|DiscountUpdateStruct $struct */ private function addRuleToStruct( DiscountValueInterface $data, diff --git a/code_samples/discounts/src/Query/Search.php b/code_samples/discounts/src/Query/Search.php index 9a6af40415..2f0a0f4d49 100644 --- a/code_samples/discounts/src/Query/Search.php +++ b/code_samples/discounts/src/Query/Search.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; +use Ibexa\Contracts\Discounts\DiscountServiceInterface; use Ibexa\Contracts\Discounts\Value\Query\Criterion; use Ibexa\Contracts\Discounts\Value\Query\DiscountQuery; use Ibexa\Contracts\Discounts\Value\Query\SortClause; @@ -25,5 +26,5 @@ ] ); -/** @var \Ibexa\Contracts\Discounts\DiscountServiceInterface $discountService */ +/** @var DiscountServiceInterface $discountService */ $results = $discountService->findDiscounts($query); diff --git a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php index 894181613d..985549c9d2 100644 --- a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php +++ b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php @@ -13,8 +13,7 @@ public function __construct( private ?float $x = null, #[Assert\NotBlank] private ?float $y = null - ) { - } + ) {} public function getX(): ?float { diff --git a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php index 7b5b193696..cbe2011bd9 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php @@ -10,8 +10,7 @@ final class Value implements ValueInterface public function __construct( private ?float $x = null, private ?float $y = null - ) { - } + ) {} public function getX(): ?float { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php index 4cdb90f8fa..9569b98b2e 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php @@ -11,9 +11,7 @@ final readonly class HelloWorldComparisonEngine implements FieldTypeComparisonEngine { - public function __construct(private StringComparisonEngine $stringValueComparisonEngine) - { - } + public function __construct(private StringComparisonEngine $stringValueComparisonEngine) {} /** * @param Value $comparisonDataA diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php index 4e6548d4d2..a97569385a 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php @@ -9,9 +9,7 @@ final readonly class HelloWorldComparisonResult implements ComparisonResult { - public function __construct(private StringComparisonResult $stringDiff) - { - } + public function __construct(private StringComparisonResult $stringDiff) {} public function getHelloWorldDiff(): StringComparisonResult { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php index 54df3906f9..85b5b85c6b 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php @@ -9,6 +9,6 @@ class Value extends FieldTypeComparisonValue { - /** @var \Ibexa\VersionComparison\ComparisonValue\StringComparisonValue */ + /** @var StringComparisonValue */ public StringComparisonValue $name; } diff --git a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php index 30981233db..afd3c1ce24 100644 --- a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php +++ b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php @@ -4,6 +4,4 @@ use Ibexa\FormBuilder\FormSubmission\Converter\BooleanFieldSubmissionConverter; -class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter -{ -} +class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter {} diff --git a/code_samples/front/embed_content/src/Controller/RelationController.php b/code_samples/front/embed_content/src/Controller/RelationController.php index 5af6bf03b6..e30e63e33d 100644 --- a/code_samples/front/embed_content/src/Controller/RelationController.php +++ b/code_samples/front/embed_content/src/Controller/RelationController.php @@ -13,8 +13,7 @@ class RelationController public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService - ) { - } + ) {} public function showContentAction( View $view, diff --git a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php index b82a4feeed..cdc28a5ba2 100644 --- a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php +++ b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php @@ -14,8 +14,7 @@ class BreadcrumbController extends Controller public function __construct( private readonly LocationService $locationService, private readonly SearchService $searchService - ) { - } + ) {} public function showBreadcrumbsAction($locationId): Response { diff --git a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php index 9266372cf2..f320e4cb22 100644 --- a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php +++ b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php @@ -7,9 +7,7 @@ class MenuBuilder { - public function __construct(private readonly FactoryInterface $factory) - { - } + public function __construct(private readonly FactoryInterface $factory) {} public function buildMenu(): ItemInterface { diff --git a/code_samples/front/view_matcher/src/View/Matcher/Owner.php b/code_samples/front/view_matcher/src/View/Matcher/Owner.php index 9c21e12141..d441783063 100644 --- a/code_samples/front/view_matcher/src/View/Matcher/Owner.php +++ b/code_samples/front/view_matcher/src/View/Matcher/Owner.php @@ -2,6 +2,7 @@ namespace App\View\Matcher; +use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -16,12 +17,10 @@ class Owner implements MatcherInterface /** @var string[] */ private array $matchingUserLogins; - public function __construct(private readonly UserService $userService) - { - } + public function __construct(private readonly UserService $userService) {} /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function matchLocation(Location $location): bool { @@ -29,7 +28,7 @@ public function matchLocation(Location $location): bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function matchContentInfo(ContentInfo $contentInfo): bool { @@ -37,7 +36,7 @@ public function matchContentInfo(ContentInfo $contentInfo): bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function match(View $view): ?bool { @@ -53,7 +52,7 @@ public function match(View $view): ?bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ private function hasOwner(ContentInfo $contentInfo): bool { diff --git a/code_samples/mcp/src/Command/McpServerListCommand.php b/code_samples/mcp/src/Command/McpServerListCommand.php index ad21b3f104..12ccbb909e 100644 --- a/code_samples/mcp/src/Command/McpServerListCommand.php +++ b/code_samples/mcp/src/Command/McpServerListCommand.php @@ -10,9 +10,7 @@ #[AsCommand(name: 'app:mcp:server_list', description: 'List MCP servers')] class McpServerListCommand { - public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) - { - } + public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) {} public function __invoke(SymfonyStyle $io): int { diff --git a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php index f5158b7d1c..f3641d6a65 100644 --- a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php +++ b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php @@ -10,12 +10,12 @@ class MyStringAttributeMapper implements AttributeFormTypeMapperInterface { /** - * @param \Symfony\Component\Form\FormBuilderInterface $formBuilder - * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockDefinition $blockDefinition - * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockAttributeDefinition $blockAttributeDefinition + * @param FormBuilderInterface $formBuilder + * @param BlockDefinition $blockDefinition + * @param BlockAttributeDefinition $blockAttributeDefinition * @param array $constraints * - * @return \Symfony\Component\Form\FormBuilderInterface + * @return FormBuilderInterface * * @throws \Exception */ diff --git a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php index 33c2e4e853..779bcc8a74 100644 --- a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php +++ b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php @@ -1,5 +1,6 @@ getConstraints()['custom_not_blank'])) { diff --git a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php index 408be0db42..6b06810792 100644 --- a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php +++ b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php @@ -5,13 +5,12 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class BlockEmbedEventEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} public static function getSubscribedEvents(): array { @@ -22,7 +21,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); $parameters['event_content'] = $this->contentService->loadContent($parameters['event']); diff --git a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php index 00f0884efb..914b498f0f 100644 --- a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php +++ b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php @@ -4,6 +4,7 @@ use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyBlockListener implements EventSubscriberInterface @@ -17,7 +18,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); diff --git a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php index 0c28ad889d..c28aa7ddc7 100644 --- a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php +++ b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php @@ -11,9 +11,7 @@ final readonly class ProductAvailabilityPurchasableWithoutStockStrategy implements ProductAvailabilityStrategyInterface { - public function __construct(private HandlerInterface $handler) - { - } + public function __construct(private HandlerInterface $handler) {} public function accept(AvailabilityContextInterface $context): bool { diff --git a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php index e8e8e547f6..0e4c6f1101 100644 --- a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php +++ b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php @@ -4,6 +4,4 @@ use Ibexa\Contracts\ProductCatalog\Values\Availability\AvailabilityContextInterface; -final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface -{ -} +final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface {} diff --git a/code_samples/recent_activity/src/Event/MyFeatureEvent.php b/code_samples/recent_activity/src/Event/MyFeatureEvent.php index 84b46ba6c1..51b7ba50e1 100644 --- a/code_samples/recent_activity/src/Event/MyFeatureEvent.php +++ b/code_samples/recent_activity/src/Event/MyFeatureEvent.php @@ -9,8 +9,7 @@ class MyFeatureEvent extends Event public function __construct( private readonly object $object, private readonly string $action - ) { - } + ) {} public function getObject(): object { diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php index 812875614c..4ba4a98456 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php @@ -3,14 +3,13 @@ namespace App\EventSubscriber; use App\Event\MyFeatureEvent; +use App\MyFeature\MyFeature; use Ibexa\Contracts\ActivityLog\ActivityLogServiceInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyFeatureEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ActivityLogServiceInterface $activityLogService) - { - } + public function __construct(private readonly ActivityLogServiceInterface $activityLogService) {} public static function getSubscribedEvents(): array { @@ -21,7 +20,7 @@ public static function getSubscribedEvents(): array public function onMyFeatureEvent(MyFeatureEvent $event): void { - /** @var \App\MyFeature\MyFeature $object */ + /** @var MyFeature $object */ $object = $event->getObject(); $className = $object::class; $id = (string)$object->id; diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php index 2133b67029..354928100c 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php @@ -11,9 +11,7 @@ class MyFeaturePostActivityListLoadEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly MyFeatureService $myFeatureService) - { - } + public function __construct(private readonly MyFeatureService $myFeatureService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/recent_activity/src/recent_activity_disable.php b/code_samples/recent_activity/src/recent_activity_disable.php index ba153acadf..0482bb0160 100644 --- a/code_samples/recent_activity/src/recent_activity_disable.php +++ b/code_samples/recent_activity/src/recent_activity_disable.php @@ -1,6 +1,7 @@ disable(); // Perform operations that should not be logged to the activity log diff --git a/code_samples/recommendations/EventData.php b/code_samples/recommendations/EventData.php index 4825ed6114..78a20b405a 100644 --- a/code_samples/recommendations/EventData.php +++ b/code_samples/recommendations/EventData.php @@ -10,8 +10,7 @@ class EventData { public function __construct( private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public function dispatchVisitEvent(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventMapper.php b/code_samples/recommendations/EventMapper.php index cf0bd3bd8e..f8b924a91f 100644 --- a/code_samples/recommendations/EventMapper.php +++ b/code_samples/recommendations/EventMapper.php @@ -13,8 +13,7 @@ class EventMapper public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public function trackProductView(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventSubscriber.php b/code_samples/recommendations/EventSubscriber.php index 175784efc4..1be6a3fa84 100644 --- a/code_samples/recommendations/EventSubscriber.php +++ b/code_samples/recommendations/EventSubscriber.php @@ -14,8 +14,7 @@ class EventSubscriber implements EventSubscriberInterface public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/search/content/customfield_criterion.php b/code_samples/search/content/customfield_criterion.php index a9a52400de..f675f94e42 100644 --- a/code_samples/search/content/customfield_criterion.php +++ b/code_samples/search/content/customfield_criterion.php @@ -1,5 +1,6 @@ query = new Query\Criterion\CustomField('content_name_s', Operator::EQ, '/Ibexa.*/'); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_no_entries_criterion.php b/code_samples/search/content/taxonomy_no_entries_criterion.php index 048006d41c..2055b506ec 100644 --- a/code_samples/search/content/taxonomy_no_entries_criterion.php +++ b/code_samples/search/content/taxonomy_no_entries_criterion.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -15,5 +16,5 @@ ] ); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_subtree_criterion.php b/code_samples/search/content/taxonomy_subtree_criterion.php index c13f94ed70..fc4e59ff9d 100644 --- a/code_samples/search/content/taxonomy_subtree_criterion.php +++ b/code_samples/search/content/taxonomy_subtree_criterion.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -15,5 +16,5 @@ ] ); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php index a707b331c5..31f0257cef 100644 --- a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php +++ b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php @@ -10,9 +10,7 @@ final readonly class ContentTypeGroupGroupResolver implements GroupResolverInterface { - public function __construct(private Handler $contentTypeHandler) - { - } + public function __construct(private Handler $contentTypeHandler) {} public function resolveDocumentGroup(BaseDocument $document): string { diff --git a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php index 2952020fcd..7089067cb1 100644 --- a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php +++ b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php @@ -12,6 +12,4 @@ * * @phpstan-extends \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\AbstractRangeAggregation */ -final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation -{ -} +final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation {} diff --git a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php index d74655dd23..58f2c79eca 100644 --- a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php @@ -19,7 +19,7 @@ public function supports( } /** - * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion + * @param CameraManufacturerCriterion $criterion */ public function visit( CriterionVisitor $dispatcher, diff --git a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php index 434b6ee313..1a4622ebd4 100644 --- a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php @@ -16,7 +16,7 @@ public function canVisit(CriterionInterface $criterion): bool } /** - * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion + * @param CameraManufacturerCriterion $criterion */ public function visit( CriterionInterface $criterion, diff --git a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php index f2fe9173bf..6c894f539b 100644 --- a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php +++ b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php @@ -14,8 +14,7 @@ class WebinarEventParentNameFieldMapper extends ContentFieldMapper public function __construct( protected ContentHandler $contentHandler, protected LocationHandler $locationHandler - ) { - } + ) {} public function accept(Content $content): bool { @@ -24,7 +23,7 @@ public function accept(Content $content): bool } /** - * @return \Ibexa\Contracts\Core\Search\Field[] + * @return Field[] */ public function mapFields(Content $content): array { diff --git a/code_samples/search/location/isbookmarked_criterion.php b/code_samples/search/location/isbookmarked_criterion.php index c61bf951b1..c7a67f7316 100644 --- a/code_samples/search/location/isbookmarked_criterion.php +++ b/code_samples/search/location/isbookmarked_criterion.php @@ -1,9 +1,10 @@ filter = new IsBookmarked(); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findLocations($query); diff --git a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php index a0988ff216..0e5fdfb877 100644 --- a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php +++ b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php @@ -13,9 +13,7 @@ class ProductViewController extends AbstractController { - public function __construct(private readonly LocalProductServiceInterface $productService) - { - } + public function __construct(private readonly LocalProductServiceInterface $productService) {} public function viewAction( Request $request, diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index c6a9721824..01758aa43d 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -31,8 +31,7 @@ public function __construct( private readonly ShoppingListServiceInterface $shoppingListService, private readonly CartShoppingListTransferServiceInterface $cartShoppingListTransferService, private readonly LocalProductServiceInterface $productService - ) { - } + ) {} #[Route( path: '/app-shopping-list-cart', diff --git a/code_samples/shopping_list/search/criteria.php b/code_samples/shopping_list/search/criteria.php index 18c0ae2429..054c916e00 100644 --- a/code_samples/shopping_list/search/criteria.php +++ b/code_samples/shopping_list/search/criteria.php @@ -1,9 +1,10 @@ getCurrentUserReference()), diff --git a/code_samples/shopping_list/search/sort_clauses.php b/code_samples/shopping_list/search/sort_clauses.php index 4927957c09..8530a64aa4 100644 --- a/code_samples/shopping_list/search/sort_clauses.php +++ b/code_samples/shopping_list/search/sort_clauses.php @@ -1,10 +1,11 @@ findShoppingLists( new ShoppingListQuery( null, diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php index b1a2c4bf12..33353fa67b 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php @@ -16,8 +16,7 @@ public function __construct( private MyApiClient $apiClient, private string $actionConfigurationIdentifier, - ) { - } + ) {} public function getIdentifier(): string { diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php index e726d3435f..204b93e79b 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php @@ -15,8 +15,7 @@ */ public function __construct( private MyApiClient $apiClient, - ) { - } + ) {} public function getIdentifier(): string { diff --git a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php index 04d20d6b93..580273da51 100644 --- a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php +++ b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class RandomBlockListener implements EventSubscriberInterface @@ -20,8 +21,7 @@ public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService, private readonly SearchService $searchService - ) { - } + ) {} public static function getSubscribedEvents(): array { @@ -33,7 +33,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { $blockValue = $event->getBlockValue(); - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $renderRequest->getParameters(); diff --git a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php index 4f351028c5..9a24a9f89e 100644 --- a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php +++ b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php @@ -16,8 +16,7 @@ public function __construct( private readonly ConfigResolverInterface $configResolver, private readonly UserService $userService, private readonly array $userMap = [], - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php index cbd1d14a74..b82f2c29ce 100644 --- a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php +++ b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php @@ -31,7 +31,7 @@ public function __construct( } /** - * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner + * @param GoogleUser $resourceOwner */ protected function loadUser( ResourceOwnerInterface $resourceOwner, @@ -41,7 +41,7 @@ protected function loadUser( } /** - * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner + * @param GoogleUser $resourceOwner */ protected function createUser( ResourceOwnerInterface $resourceOwner, diff --git a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php index 1e6d72e701..d113b372c2 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php @@ -10,9 +10,7 @@ class ApprovedTransitionListener extends AbstractTransitionWorkflowActionListener { - public function __construct(private readonly NotificationInterface $notificationHandler) - { - } + public function __construct(private readonly NotificationInterface $notificationHandler) {} public function getIdentifier(): string { diff --git a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php index 9534a666a9..8bf9453e9d 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php @@ -14,8 +14,7 @@ class LegalTransitionListener extends AbstractTransitionWorkflowActionListener public function __construct( private readonly NotificationInterface $notificationHandler, protected WorkflowRegistryInterface $workflowRegistry - ) { - } + ) {} public function getIdentifier(): string { diff --git a/docs/administration/back_office/back_office_menus/back_office_menus.md b/docs/administration/back_office/back_office_menus/back_office_menus.md index 0290c90c87..b3d7e6c999 100644 --- a/docs/administration/back_office/back_office_menus/back_office_menus.md +++ b/docs/administration/back_office/back_office_menus/back_office_menus.md @@ -86,7 +86,9 @@ The following method adds a new menu section under **Content**, and under it, a You can also pass parameters to templates used to render menu items with `template_parameters`: ``` php -/** @var \Knp\Menu\ItemInterface $menu */ +use Knp\Menu\ItemInterface; + +/** @var ItemInterface $menu */ $menu->addChild( 'all_content_list', [ @@ -107,7 +109,9 @@ You can then use the variable `custom_parameter` in `templates/themes/admin/list To have translatable labels, use `translation.key` from the `messages` domain: ``` php -/** @var \Knp\Menu\ItemInterface $menu */ +use Knp\Menu\ItemInterface; + +/** @var ItemInterface $menu */ $menu->addChild( 'all_content_list', [ diff --git a/docs/administration/back_office/notifications.md b/docs/administration/back_office/notifications.md index 352934598a..ca2b795265 100644 --- a/docs/administration/back_office/notifications.md +++ b/docs/administration/back_office/notifications.md @@ -26,7 +26,9 @@ There are four types of notifications: `info`, `success`, `warning` and `error`. To send a notification from PHP, inject the `TranslatableNotificationHandlerInterface` into your class. ``` php -/** @var \Ibexa\Contracts\AdminUi\Notification\TranslatableNotificationHandlerInterface $notificationHandler */ +use Ibexa\Contracts\AdminUi\Notification\TranslatableNotificationHandlerInterface; + +/** @var TranslatableNotificationHandlerInterface $notificationHandler */ $notificationHandler->info( /** @Desc("Notification text") */ 'example.notification.text', diff --git a/docs/administration/configuration/configuration.md b/docs/administration/configuration/configuration.md index 064d8ac3e4..3247edde16 100644 --- a/docs/administration/configuration/configuration.md +++ b/docs/administration/configuration/configuration.md @@ -73,8 +73,10 @@ parameters: ``` ``` php +use Symfony\Component\DependencyInjection\ContainerInterface; + // Usage inside a controller -/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */ +/** @var ContainerInterface $container */ $myParameter = $container->getParameter('myapp.parameter.name'); ``` diff --git a/docs/administration/configuration/repository_configuration.md b/docs/administration/configuration/repository_configuration.md index 30e0815b6b..1e5be86e36 100644 --- a/docs/administration/configuration/repository_configuration.md +++ b/docs/administration/configuration/repository_configuration.md @@ -347,6 +347,8 @@ final class AcmeFeatureBundle extends Bundle To access the configuration settings, use the `Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider::getRepositoryConfig` method: ``` php -/** @var \Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface $repositoryConfigProvider */ +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; + +/** @var RepositoryConfigurationProviderInterface $repositoryConfigProvider */ $acmeConfig = $repositoryConfigProvider->getRepositoryConfig()['acme']; ``` diff --git a/docs/ai/ai_actions/configure_ai_actions.md b/docs/ai/ai_actions/configure_ai_actions.md index 5e1eccbf1b..716965b28a 100644 --- a/docs/ai/ai_actions/configure_ai_actions.md +++ b/docs/ai/ai_actions/configure_ai_actions.md @@ -106,9 +106,11 @@ composer require ibexa/connector-gemini Then, if not using Symfony Flex, enable the bundle in `config/bundles.php`: ``` php +use Ibexa\Bundle\ConnectorGemini\IbexaConnectorGeminiBundle; + return [ // ... - Ibexa\Bundle\ConnectorGemini\IbexaConnectorGeminiBundle::class => ['all' => true], + IbexaConnectorGeminiBundle::class => ['all' => true], ]; ``` diff --git a/docs/commerce/shopping_list/install_shopping_list.md b/docs/commerce/shopping_list/install_shopping_list.md index 3238f3982e..a66d9f718e 100644 --- a/docs/commerce/shopping_list/install_shopping_list.md +++ b/docs/commerce/shopping_list/install_shopping_list.md @@ -19,9 +19,11 @@ The associated Symfony Flex recipe configures the bundle and its routes. Check that the following line has been added by the recipe to `config/bundles.php` file's array: ``` php +use Ibexa\Bundle\ShoppingList\IbexaShoppingListBundle; + return [ // ... - Ibexa\Bundle\ShoppingList\IbexaShoppingListBundle::class => ['all' => true], + IbexaShoppingListBundle::class => ['all' => true], ]; ``` diff --git a/docs/content_management/collaborative_editing/configure_collaborative_editing.md b/docs/content_management/collaborative_editing/configure_collaborative_editing.md index b96b50a217..003029fd3b 100644 --- a/docs/content_management/collaborative_editing/configure_collaborative_editing.md +++ b/docs/content_management/collaborative_editing/configure_collaborative_editing.md @@ -26,11 +26,13 @@ Then, if not using Symfony Flex, add the following code to the `config/bundles.p ``` php ['all' => true], - Ibexa\Bundle\CkeditorPremium\IbexaCkeditorPremiumBundle::class => ['all' => true], + IbexaFieldTypeRichTextRTEBundle::class => ['all' => true], + IbexaCkeditorPremiumBundle::class => ['all' => true], ]; ``` diff --git a/docs/content_management/content_api/browsing_content.md b/docs/content_management/content_api/browsing_content.md index 96d889ff60..c67db68ff9 100644 --- a/docs/content_management/content_api/browsing_content.md +++ b/docs/content_management/content_api/browsing_content.md @@ -114,9 +114,12 @@ You can get the current version's `VersionInfo` using [`ContentService::loadVers You can also specify the version number as the second argument to get Relations for a specific version: ``` php +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; + /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var ContentInfo $contentInfo + * @var ContentService $contentService */ $versionInfo = $contentService->loadVersionInfo($contentInfo, 2); ``` @@ -185,9 +188,11 @@ The repository is SiteAccess-aware, so languages defined by the SiteAccess are a To load a specific language, provide its language code when loading the content item: ``` php +use Ibexa\Contracts\Core\Repository\ContentService; + /** * @var int $contentId - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService + * @var ContentService $contentService */ $content = $contentService->loadContent($contentId, ['ger-DE']); ``` @@ -230,7 +235,9 @@ You can do it through the `getMainLocation` method of the ContentInfo object. Next, use the `getParentLocation` method of the location object to access the parent location: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; + +/** @var ContentInfo $contentInfo */ $mainLocation = $contentInfo->getMainLocation(); $parentLocation = $mainLocation?->getParentLocation(); if ($parentLocation !== null) { @@ -254,12 +261,16 @@ The versions must have the same language. For example, to get the comparison between the `name` field of two versions: ``` php +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; +use Ibexa\Contracts\VersionComparison\Service\VersionComparisonServiceInterface; + /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo + * @var ContentInfo $contentInfo * @var int $versionFromId * @var int $versionToId - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\VersionComparison\Service\VersionComparisonServiceInterface $comparisonService + * @var ContentService $contentService + * @var VersionComparisonServiceInterface $comparisonService */ $versionFrom = $contentService->loadVersionInfo($contentInfo, $versionFromId); $versionTo = $contentService->loadVersionInfo($contentInfo, $versionToId); diff --git a/docs/content_management/content_api/creating_content.md b/docs/content_management/content_api/creating_content.md index 55c3ee89c1..829075766d 100644 --- a/docs/content_management/content_api/creating_content.md +++ b/docs/content_management/content_api/creating_content.md @@ -104,8 +104,11 @@ You can delete a single translation from a content item's version using [`Conten The method must be provided with a `VersionInfo` object and the code of the language to delete: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo */ +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; + +/** @var VersionInfo $versionInfo */ $languageCode = 'ger-DE'; -/** @var \Ibexa\Contracts\Core\Repository\ContentService $contentService */ +/** @var ContentService $contentService */ $contentService->deleteTranslationFromDraft($versionInfo, $languageCode); ``` diff --git a/docs/content_management/content_api/managing_content.md b/docs/content_management/content_api/managing_content.md index 2a05e068d3..b2685f719d 100644 --- a/docs/content_management/content_api/managing_content.md +++ b/docs/content_management/content_api/managing_content.md @@ -117,10 +117,14 @@ The content item is restored under its previous location. You can also provide a different location to restore in as a second argument: ``` php +use Ibexa\Contracts\Core\Repository\LocationService; +use Ibexa\Contracts\Core\Repository\TrashService; +use Ibexa\Contracts\Core\Repository\Values\Content\TrashItem; + /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem $trashItem - * @var \Ibexa\Contracts\Core\Repository\LocationService $locationService - * @var \Ibexa\Contracts\Core\Repository\TrashService $trashService + * @var TrashItem $trashItem + * @var LocationService $locationService + * @var TrashService $trashService */ $locationId = 12345; $newParent = $locationService->loadLocation($locationId); diff --git a/docs/content_management/field_types/field_type_reference/authorfield.md b/docs/content_management/field_types/field_type_reference/authorfield.md index aa343cf4c7..7ab382a507 100644 --- a/docs/content_management/field_types/field_type_reference/authorfield.md +++ b/docs/content_management/field_types/field_type_reference/authorfield.md @@ -45,16 +45,16 @@ Example use Ibexa\Core\FieldType\Author; $authorList = new Author\Value([ - new Author\Author([ - 'id' => 1, - 'name' => 'Boba Fett', - 'email' => 'boba.fett@example.com', - ]), - new Author\Author([ - 'id' => 2, - 'name' => 'Darth Vader', - 'email' => 'darth.vader@example.com', - ]), + new Author\Author([ + 'id' => 1, + 'name' => 'Boba Fett', + 'email' => 'boba.fett@example.com', + ]), + new Author\Author([ + 'id' => 2, + 'name' => 'Darth Vader', + 'email' => 'darth.vader@example.com', + ]), ]); ``` diff --git a/docs/content_management/field_types/field_type_reference/binaryfilefield.md b/docs/content_management/field_types/field_type_reference/binaryfilefield.md index 0d3d48903a..dc417f0b37 100644 --- a/docs/content_management/field_types/field_type_reference/binaryfilefield.md +++ b/docs/content_management/field_types/field_type_reference/binaryfilefield.md @@ -47,8 +47,11 @@ The hash format mostly matches the value object. It has the following keys: Example: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct $fileContentCreateStruct */ -$fileContentCreateStruct->setField('file', new Ibexa\Core\FieldType\BinaryFile\Value([ +use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\FieldType\BinaryFile\Value; + +/** @var ContentCreateStruct $fileContentCreateStruct */ +$fileContentCreateStruct->setField('file', new Value([ 'fileName' => 'example.pdf', 'inputUri' => '/tmp/example_for_website.pdf', ])); diff --git a/docs/content_management/field_types/field_type_reference/countryfield.md b/docs/content_management/field_types/field_type_reference/countryfield.md index 7acea36ab3..171c431774 100644 --- a/docs/content_management/field_types/field_type_reference/countryfield.md +++ b/docs/content_management/field_types/field_type_reference/countryfield.md @@ -50,8 +50,10 @@ The format used for serialization is simpler than the full format. It's also available when setting value on the content field, by setting the value to an array instead of the value object. Example of that shown below: ``` php +use Ibexa\Contracts\Core\Repository\Values\Content\Content; + // Value object content example -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ +/** @var Content $content */ $content->fields['countries'] = ['JP', 'NO']; ``` @@ -69,7 +71,9 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var \Ibexa\Core\FieldType\Country\Value $value */ +use Ibexa\Core\FieldType\Country\Value; + +/** @var Value $value */ $value->countries = [ 'JP' => [ 'Name' => 'Japan', diff --git a/docs/content_management/field_types/field_type_reference/floatfield.md b/docs/content_management/field_types/field_type_reference/floatfield.md index b8f36d8faa..ad31067e32 100644 --- a/docs/content_management/field_types/field_type_reference/floatfield.md +++ b/docs/content_management/field_types/field_type_reference/floatfield.md @@ -63,8 +63,9 @@ This field type supports `FloatValueValidator`, defining maximum and minimum flo ``` php // Validator configuration example in PHP +use Ibexa\Contracts\Core\Repository\Repository; -/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ +/** @var Repository $repository */ $contentTypeService = $repository->getContentTypeService(); $floatFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('float', 'ibexa_float'); diff --git a/docs/content_management/field_types/field_type_reference/imageassetfield.md b/docs/content_management/field_types/field_type_reference/imageassetfield.md index 6c0d80ec96..ff13ddccec 100644 --- a/docs/content_management/field_types/field_type_reference/imageassetfield.md +++ b/docs/content_management/field_types/field_type_reference/imageassetfield.md @@ -30,11 +30,14 @@ Value object of `ibexa_image_asset` contains the following properties: | `alternativeText` | `string` | The alternative image text (for example "Picture of an apple."). | ``` php +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; +use Ibexa\Core\FieldType\ImageAsset\Value; + /** * Value object content example. * - * @var \Ibexa\Core\FieldType\ImageAsset\Value $imageAssetValue - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo + * @var Value $imageAssetValue + * @var ContentInfo $contentInfo */ $imageAssetValue->destinationContentId = $contentInfo->id; $imageAssetValue->alternativeText = 'Picture of an apple.'; diff --git a/docs/content_management/field_types/field_type_reference/imagefield.md b/docs/content_management/field_types/field_type_reference/imagefield.md index ad9ea71866..0d28a8c4be 100644 --- a/docs/content_management/field_types/field_type_reference/imagefield.md +++ b/docs/content_management/field_types/field_type_reference/imagefield.md @@ -150,10 +150,14 @@ The variation service, `ibexa.field_type.ibexa_image.variation_service`, can be It expects a VersionInfo, the Image field, and the variation name as a string (`large`, `medium`, and more.): ``` php +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; +use Ibexa\Contracts\Core\Variation\VariationHandler; + /** - * @var \Ibexa\Contracts\Core\Variation\VariationHandler $imageVariationHandler - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Field $imageField - * @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo + * @var VariationHandler $imageVariationHandler + * @var Field $imageField + * @var VersionInfo $versionInfo */ $variation = $imageVariationHandler->getVariation( $imageField, @@ -172,9 +176,12 @@ As for any field type, there are several ways to input content to a field. For an Image, the quickest is to call `setField()` on the ContentStruct: ``` php +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\ContentTypeService; + /** - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\Core\Repository\ContentTypeService $contentTypeService + * @var ContentService $contentService + * @var ContentTypeService $contentTypeService */ $createStruct = $contentService->newContentCreateStruct( $contentTypeService->loadContentTypeByIdentifier('image'), @@ -188,16 +195,20 @@ To customize the Image's alternative texts, you must first get an `Image\Value` For that, you can use the `Image\Value::fromString()` method that accepts the path to a local file: ``` php +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\ContentTypeService; +use Ibexa\Core\FieldType\Image\Value; + /** - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\Core\Repository\ContentTypeService $contentTypeService + * @var ContentService $contentService + * @var ContentTypeService $contentTypeService */ $createStruct = $contentService->newContentCreateStruct( $contentTypeService->loadContentTypeByIdentifier('image'), 'eng-GB' ); -$imageField = \Ibexa\Core\FieldType\Image\Value::fromString('/tmp/image.png'); +$imageField = Value::fromString('/tmp/image.png'); $imageField->alternativeText = 'My alternative text'; $createStruct->setField('image', $imageField); ``` @@ -205,8 +216,11 @@ $createStruct->setField('image', $imageField); You can also provide a hash of `Image\Value` properties, either to `setField()`, or to the constructor: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct $createStruct */ -$imageValue = new \Ibexa\Core\FieldType\Image\Value( +use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\FieldType\Image\Value; + +/** @var ContentCreateStruct $createStruct */ +$imageValue = new Value( [ 'id' => '/tmp/image.png', 'fileSize' => 37931, diff --git a/docs/content_management/field_types/field_type_reference/integerfield.md b/docs/content_management/field_types/field_type_reference/integerfield.md index 1315514313..123eb9d73e 100644 --- a/docs/content_management/field_types/field_type_reference/integerfield.md +++ b/docs/content_management/field_types/field_type_reference/integerfield.md @@ -26,7 +26,9 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var \Ibexa\Core\FieldType\Integer\Value $integer */ +use Ibexa\Core\FieldType\Integer\Value; + +/** @var Value $integer */ $integer->value = 8; ``` diff --git a/docs/content_management/field_types/field_type_reference/relationfield.md b/docs/content_management/field_types/field_type_reference/relationfield.md index e60971614e..07df670c49 100644 --- a/docs/content_management/field_types/field_type_reference/relationfield.md +++ b/docs/content_management/field_types/field_type_reference/relationfield.md @@ -26,11 +26,14 @@ The Value class of this field type contains the following properties: | `$destinationContentId` | `string`, `int`, or `null` | This property is used to store the value provided, which represents the related content. | ``` php +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; +use Ibexa\Core\FieldType\Relation\Value; + /** * Value object content example. * - * @var \Ibexa\Core\FieldType\Relation\Value $relation - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo + * @var Value $relation + * @var ContentInfo $contentInfo */ $relation->destinationContentId = $contentInfo->id; ``` diff --git a/docs/content_management/field_types/field_type_reference/relationlistfield.md b/docs/content_management/field_types/field_type_reference/relationlistfield.md index 83d40a0935..206eddd3b5 100644 --- a/docs/content_management/field_types/field_type_reference/relationlistfield.md +++ b/docs/content_management/field_types/field_type_reference/relationlistfield.md @@ -28,12 +28,15 @@ This field type makes it possible to store and retrieve values of a relation to |`destinationContentIds`|`array`|An array of related Content IDs|`[ 24, 42 ]`| ``` php +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; +use Ibexa\Core\FieldType\RelationList\Value; + /** * Value object content example. * - * @var \Ibexa\Core\FieldType\RelationList\Value $relationList - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo1 - * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo2 + * @var Value $relationList + * @var ContentInfo $contentInfo1 + * @var ContentInfo $contentInfo2 */ $relationList->destinationContentIds = [ $contentInfo1->id, diff --git a/docs/content_management/field_types/field_type_reference/richtextfield.md b/docs/content_management/field_types/field_type_reference/richtextfield.md index 1c91af55ab..b6ec78bb17 100644 --- a/docs/content_management/field_types/field_type_reference/richtextfield.md +++ b/docs/content_management/field_types/field_type_reference/richtextfield.md @@ -71,9 +71,12 @@ You can use the [[= product_name_base =]] flavor of the DocBook format in PHP AP The following example shows how to pass DocBook content to a [create struct](creating_content.md#creating-content-item-draft): ``` php +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; + /** - * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService - * @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType $contentType + * @var ContentService $contentService + * @var ContentType $contentType */ $contentCreateStruct = $contentService->newContentCreateStruct($contentType, 'eng-GB'); diff --git a/docs/content_management/field_types/field_type_reference/selectionfield.md b/docs/content_management/field_types/field_type_reference/selectionfield.md index 8d76e61b6e..63276da00d 100644 --- a/docs/content_management/field_types/field_type_reference/selectionfield.md +++ b/docs/content_management/field_types/field_type_reference/selectionfield.md @@ -27,7 +27,9 @@ The Value class of this field type contains the following properties: ``` php // Value object content examples -/** @var \Ibexa\Core\FieldType\Selection\Value $value */ +use Ibexa\Core\FieldType\Selection\Value; + +/** @var Value $value */ // Single selection $value->selection = [1]; diff --git a/docs/content_management/field_types/field_type_reference/urlfield.md b/docs/content_management/field_types/field_type_reference/urlfield.md index 9aae6a0c60..fe465092b0 100644 --- a/docs/content_management/field_types/field_type_reference/urlfield.md +++ b/docs/content_management/field_types/field_type_reference/urlfield.md @@ -30,7 +30,9 @@ The Value class of this field type contains the following properties: ``` php // Value object content example -/** @var \Ibexa\Core\FieldType\Url\Value $url */ +use Ibexa\Core\FieldType\Url\Value; + +/** @var Value $url */ $url->link = 'https://www.ibexa.co'; $url->text = 'Ibexa'; ``` diff --git a/docs/content_management/file_management/file_management.md b/docs/content_management/file_management/file_management.md index f2cd924f12..7ee61f6a90 100644 --- a/docs/content_management/file_management/file_management.md +++ b/docs/content_management/file_management/file_management.md @@ -9,9 +9,12 @@ description: Configurations and management of binary files. To access binary files from the PHP API, use the `Ibexa\Core\IO\IOServiceInterface::loadBinaryFile()` method: ``` php +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\IO\IOServiceInterface; + /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Field $field - * @var \Ibexa\Core\IO\IOServiceInterface $ioService + * @var Field $field + * @var IOServiceInterface $ioService */ $file = $ioService->loadBinaryFile($field->value->id); $fileContent = $ioService->getFileContents($file); diff --git a/docs/content_management/taxonomy/taxonomy_api.md b/docs/content_management/taxonomy/taxonomy_api.md index 3956d093ca..9a3514c6ee 100644 --- a/docs/content_management/taxonomy/taxonomy_api.md +++ b/docs/content_management/taxonomy/taxonomy_api.md @@ -21,9 +21,12 @@ and use `TaxonomyServiceInterface::loadEntryByIdentifier()`: A taxonomy entry identifier is unique per taxonomy. If you have [several taxonomies](taxonomy.md#customize-taxonomy-structure), you can increase code readability by always passing the taxonomy identifier even when it's the default one. The default taxonomy is `tags` if it exists, else the first configured taxonomy (see `\Ibexa\Taxonomy\Service\TaxonomyConfiguration::getDefaultTaxonomyName` for details). ``` php + use Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface; + use Ibexa\Contracts\Taxonomy\Value\TaxonomyEntry; + /** - * @var array $springs - * @var \Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface $taxonomyService + * @var array $springs + * @var TaxonomyServiceInterface $taxonomyService */ $springs[] = $taxonomyService->loadEntryByIdentifier('spring', 'tags'); $springs[] = $taxonomyService->loadEntryByIdentifier('spring', 'events'); diff --git a/docs/content_management/url_management/url_management.md b/docs/content_management/url_management/url_management.md index 628535126c..c98760a8fc 100644 --- a/docs/content_management/url_management/url_management.md +++ b/docs/content_management/url_management/url_management.md @@ -213,7 +213,9 @@ The **URL wildcards** tab contains all the information about each URL wildcard. You can create URL wildcards with the public PHP API by using the `URLWildcardService` service: ``` php -/** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ +use Ibexa\Contracts\Core\Repository\Repository; + +/** @var Repository $repository */ $source = 'pictures/*/*'; $destination = 'media/images/{1}/{2}'; $redirect = true; diff --git a/docs/content_management/workflow/add_custom_workflow_action.md b/docs/content_management/workflow/add_custom_workflow_action.md index 4fe26b1534..9985b50bd4 100644 --- a/docs/content_management/workflow/add_custom_workflow_action.md +++ b/docs/content_management/workflow/add_custom_workflow_action.md @@ -81,9 +81,11 @@ You can also modify the context using the `setContext()` method. For example, you can override the message typed by the user: ``` php +use Symfony\Component\Workflow\Event\TransitionEvent; + /** * @var array $context - * @var \Symfony\Component\Workflow\Event\TransitionEvent $event + * @var TransitionEvent $event */ $new_context = $context; $new_context['message'] = 'This article went through proofreading'; diff --git a/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md b/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md index a8d3eede50..eddbda3cf1 100644 --- a/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md +++ b/docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md @@ -172,10 +172,14 @@ Examples for tagging everything needed for content using the autowireable [`Resp Examples for adding specific content tags using the autowireable `ContentTagInterface`: ``` php +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Contracts\HttpCache\Handler\ContentTagInterface; + /** - * @var \Ibexa\Contracts\HttpCache\Handler\ContentTagInterface $tagHandler - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content - * @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location + * @var ContentTagInterface $tagHandler + * @var Content $content + * @var Location $location */ // Example for tagging everything needed for Content: @@ -211,7 +215,9 @@ For custom or built-in controllers (for example, REST) that still use `X-Locatio It supports singular and comma-separated location ID value(s): ``` php -/** @var \Symfony\Component\HttpFoundation\Response $response */ +use Symfony\Component\HttpFoundation\Response; + +/** @var Response $response */ $response->headers->set('X-Location-Id', '123'); // Alternatively using several Location ID values diff --git a/docs/search/criteria_reference/ancestor_criterion.md b/docs/search/criteria_reference/ancestor_criterion.md index 7cf1d72193..e98b23a9c8 100644 --- a/docs/search/criteria_reference/ancestor_criterion.md +++ b/docs/search/criteria_reference/ancestor_criterion.md @@ -68,17 +68,16 @@ class NavigationController extends Controller public function breadcrumbsAction(): Response { $locationId = 12345; - + $query = new LocationQuery(); $query->query = new Criterion\Ancestor([$this->locationService->loadLocation($locationId)->pathString]); - - /** @var SearchService $searchService */ + $results = $this->searchService->findLocations($query); $breadcrumbs = []; foreach ($results->searchHits as $searchHit) { $breadcrumbs[] = $searchHit; } - + return $this->render('parts/breadcrumbs.html.twig', [ 'breadcrumbs' => $breadcrumbs, ]); diff --git a/docs/search/criteria_reference/parentlocationid_criterion.md b/docs/search/criteria_reference/parentlocationid_criterion.md index b19b60b710..0fb4b7756d 100644 --- a/docs/search/criteria_reference/parentlocationid_criterion.md +++ b/docs/search/criteria_reference/parentlocationid_criterion.md @@ -65,19 +65,19 @@ class NavigationController extends Controller public function blogAction(): Response { $locationId = 12345; - + $query = new LocationQuery(); $query->query = new Criterion\LogicalAnd([ new Criterion\Visibility(Criterion\Visibility::VISIBLE), new Criterion\ParentLocationId($locationId), ]); - + $results = $this->searchService->findLocations($query); $posts = []; foreach ($results->searchHits as $searchHit) { $posts[] = $searchHit; } - + return $this->render('full/blog.html.twig', [ 'posts' => $posts, ]); diff --git a/docs/tutorials/beginner_tutorial/7_embed_content.md b/docs/tutorials/beginner_tutorial/7_embed_content.md index aad2775a60..5c96883582 100644 --- a/docs/tutorials/beginner_tutorial/7_embed_content.md +++ b/docs/tutorials/beginner_tutorial/7_embed_content.md @@ -130,6 +130,7 @@ namespace App\Controller; use Ibexa\Bundle\Core\Controller; use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Core\FieldType\RelationList\Value; use Ibexa\Core\MVC\Symfony\View\ContentView; class RideController extends Controller @@ -139,7 +140,7 @@ class RideController extends Controller public function viewRideWithLandmarksAction(ContentView $view): ContentView { $currentContent = $view->getContent(); - /** @var \Ibexa\Core\FieldType\RelationList\Value $landmarksListId */ + /** @var Value $landmarksListId */ $landmarksListId = $currentContent->getFieldValue('landmarks'); $landmarksList = []; diff --git a/docs/update_and_migration/from_4.6/update_from_4.6.md b/docs/update_and_migration/from_4.6/update_from_4.6.md index a42ea652c4..7b774551a5 100644 --- a/docs/update_and_migration/from_4.6/update_from_4.6.md +++ b/docs/update_and_migration/from_4.6/update_from_4.6.md @@ -165,7 +165,7 @@ merge with your custom settings if needed, and commit them to Git. If the new bundle `ibexa/core-search` has not been added by the recipes, enable it by adding the following line in `config/bundles.php`: -``` php +``` php {skip-validation} return [ // ... Ibexa\Bundle\CoreSearch\IbexaCoreSearchBundle::class => ['all' => true], diff --git a/docs/users/oauth_server.md b/docs/users/oauth_server.md index d5f28f9d38..77f9a805f7 100644 --- a/docs/users/oauth_server.md +++ b/docs/users/oauth_server.md @@ -20,13 +20,13 @@ composer require ibexa/oauth2-server --with-all-dependencies Then, in `config/bundles.php`, at the end of an array with a list of bundles, add the following two lines: -``` php +``` php {skip-validation} ['all' => true], - League\Bundle\OAuth2ServerBundle\LeagueOAuth2ServerBundle::class => ['all' => true], + IbexaOAuth2ServerBundle::class => ['all' => true], + LeagueOAuth2ServerBundle::class => ['all' => true], ]; ``` diff --git a/tests/ValidationBaseline.php b/tests/ValidationBaseline.php index 99ce772226..53422e93e0 100644 --- a/tests/ValidationBaseline.php +++ b/tests/ValidationBaseline.php @@ -28,8 +28,7 @@ final class ValidationBaseline public function __construct( private readonly string $baselineFile, private readonly string $repoRoot, - ) { - } + ) {} public function isInBaseline( string $relativePath, diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9374e6f3a2..00cd6610cc 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,7 +8,7 @@ use Composer\Autoload\ClassLoader; -/** @var \Composer\Autoload\ClassLoader $loader */ +/** @var ClassLoader $loader */ $loader = require __DIR__ . '/../vendor/autoload.php'; /** From 928d179eaab4e49753442fdec465ec4f7058ea14 Mon Sep 17 00:00:00 2001 From: adriendupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 21:46:50 +0000 Subject: [PATCH 49/66] PHP & JS CS Fixes --- .../src/AI/Action/TranscribeAudioAction.php | 4 +++- .../src/AI/ActionType/TranscribeAudioActionType.php | 4 +++- code_samples/ai_actions/src/AI/DataType/Audio.php | 4 +++- .../src/AI/Handler/LLaVaTextToTextActionHandler.php | 5 +++-- .../AI/Handler/WhisperAudioToTextActionHandler.php | 3 +-- .../ai_actions/src/AI/REST/Value/AudioText.php | 4 +++- .../src/AI/REST/Value/TranscribeAudioAction.php | 3 ++- code_samples/ai_actions/src/Query/Search.php | 3 +-- .../src/Controller/CustomCheckoutController.php | 3 ++- .../api/notifications/notification_send.php | 9 +++------ .../src/Notifications/ControllerFeedback.php | 4 +++- .../src/Command/FindByTaxonomyEmbeddingCommand.php | 3 +-- .../src/Controller/CustomController.php | 4 +++- .../src/Controller/CustomFilterController.php | 4 +++- .../src/Controller/PaginationController.php | 4 +++- .../api/public_php_api/src/embedding_fields.php | 3 +-- .../api/public_php_api/src/perform_count.php | 3 +-- .../api/rest_api/src/Rest/Values/Greeting.php | 3 ++- .../src/Calendar/Holidays/EventSourceFactory.php | 4 +++- .../back_office/images/src/SvgController.php | 9 ++++----- .../back_office/images/src/SvgExtension.php | 4 +++- .../src/Controller/CustomLimitationController.php | 3 ++- code_samples/back_office/limitation/src/Kernel.php | 3 +-- .../Form/FormSubmissionServiceDecorator.php | 3 ++- .../Security/Form/FormSubmissionsTabDecorator.php | 3 +-- .../Security/Limitation/CustomLimitationType.php | 3 +-- .../Mapper/CustomLimitationFormMapper.php | 4 +++- .../src/Controller/AllContentListController.php | 3 ++- .../src/EventSubscriber/HelpMenuSubscriber.php | 3 ++- .../EventListener/ContentPublishEventListener.php | 4 +++- .../notifications/src/Notification/ListRenderer.php | 3 ++- .../notifications/src/Notification/MyRenderer.php | 3 ++- .../event/subscriber/RichTextBlockSubscriber.php | 8 +++++--- .../NotificationScenarioSubscriber.php | 4 +++- .../EventSubscriber/MySuggestionEventSubscriber.php | 10 +++++----- .../search/src/Query/DateTimeAttributeQuery.php | 3 +-- .../src/Query/DateTimeAttributeRangeQuery.php | 3 +-- .../src/Query/ProductCategorySubtreeQuery.php | 3 +-- .../search/src/Query/SymbolAttributeTypeQuery.php | 3 +-- .../back_office/search/src/Query/UpdatedAtQuery.php | 3 +-- .../search/src/Query/UpdatedAtRangeQuery.php | 3 +-- .../Suggestion/ProductSuggestionNormalizer.php | 2 +- .../src/Strategy/StaticThumbnailStrategy.php | 4 +++- .../cache/http_cache/src/response_tagging.php | 11 ++++------- .../CatalogFilter/ProductNameFilterFormMapper.php | 4 +++- .../Collaboration/Cart/CartResolverDecorator.php | 3 ++- .../Collaboration/Cart/Mapper/CartProxyMapper.php | 3 ++- .../Cart/Mapper/CartSessionDomainMapper.php | 3 ++- .../Cart/PermissionResolverDecorator.php | 3 ++- .../Cart/Persistence/Gateway/DatabaseGateway.php | 5 ++--- .../src/Controller/ShareCartCreateController.php | 6 +++--- .../src/Controller/ShareCartJoinController.php | 3 ++- .../collaboration/src/Form/Data/ShareCartData.php | 3 ++- code_samples/collaboration/src/Query/Search.php | 3 +-- .../ApplicationDetailsViewSubscriber.php | 2 +- .../EventSubscriber/VerifyStateEventSubscriber.php | 3 ++- .../src/Migrations/Action/AssignSection.php | 4 +++- .../src/Migrations/Action/AssignSectionExecutor.php | 6 +++--- .../src/Migrations/Step/ReplaceNameStepExecutor.php | 4 +++- .../discounts/src/Command/OrderPriceCommand.php | 2 +- .../CurrentUserRegistrationDateResolver.php | 3 ++- .../RecentDiscountPrioritizationStrategy.php | 4 +++- .../src/Discounts/Step/AnniversaryConditionStep.php | 3 ++- .../AnniversaryConditionStepEventSubscriber.php | 4 ++-- .../AnniversaryConditionStepEventSubscriber.php | 4 ++-- .../FormMapper/PurchasingPowerParityValueMapper.php | 2 +- code_samples/discounts/src/Query/Search.php | 3 +-- .../2dpoint_ft/src/FieldType/Point2D/Value.php | 3 ++- .../field_types/2dpoint_ft/steps/step_1/Value.php | 3 ++- .../Comparison/HelloWorldComparisonEngine.php | 4 +++- .../Comparison/HelloWorldComparisonResult.php | 4 +++- .../src/FieldType/HelloWorld/Comparison/Value.php | 2 +- .../RichtextDescriptionFieldSubmissionConverter.php | 4 +++- .../src/Controller/RelationController.php | 3 ++- .../src/Controller/BreadcrumbController.php | 3 ++- .../front/layouts/menu/src/Menu/MenuBuilder.php | 4 +++- .../front/view_matcher/src/View/Matcher/Owner.php | 13 +++++++------ .../mcp/src/Command/McpServerListCommand.php | 4 +++- .../src/Block/Attribute/MyStringAttributeMapper.php | 8 ++++---- .../src/Form/Extension/AttributeTypeExtension.php | 3 +-- .../Subscriber/BlockEmbedEventEventSubscriber.php | 7 ++++--- .../src/Block/Listener/MyBlockListener.php | 3 +-- ...tAvailabilityPurchasableWithoutStockStrategy.php | 4 +++- .../PurchasableWithoutStockAvailabilityContext.php | 4 +++- .../recent_activity/src/Event/MyFeatureEvent.php | 3 ++- .../EventSubscriber/MyFeatureEventSubscriber.php | 7 ++++--- ...MyFeaturePostActivityListLoadEventSubscriber.php | 4 +++- .../recent_activity/src/recent_activity_disable.php | 3 +-- code_samples/recommendations/EventData.php | 3 ++- code_samples/recommendations/EventMapper.php | 3 ++- code_samples/recommendations/EventSubscriber.php | 3 ++- .../search/content/customfield_criterion.php | 3 +-- .../content/taxonomy_no_entries_criterion.php | 3 +-- .../search/content/taxonomy_subtree_criterion.php | 3 +-- .../GroupResolver/ContentTypeGroupGroupResolver.php | 4 +++- .../Query/Aggregation/PriorityRangeAggregation.php | 4 +++- .../Elasticsearch/CameraManufacturerVisitor.php | 2 +- .../Criterion/Solr/CameraManufacturerVisitor.php | 2 +- .../WebinarEventParentNameFieldMapper.php | 5 +++-- .../search/location/isbookmarked_criterion.php | 3 +-- .../src/Controller/ProductViewController.php | 4 +++- .../CartShoppingListTransferController.php | 3 ++- code_samples/shopping_list/search/criteria.php | 3 +-- code_samples/shopping_list/search/sort_clauses.php | 3 +-- .../TranslationsManagement/MyCustomAiProvider.php | 3 ++- .../src/TranslationsManagement/MyCustomProvider.php | 3 ++- .../page_tutorial/src/Event/RandomBlockListener.php | 6 +++--- .../AuthenticationTokenCreatedSubscriber.php | 3 ++- .../src/OAuth/GoogleResourceOwnerMapper.php | 4 ++-- .../EventListener/ApprovedTransitionListener.php | 4 +++- .../src/EventListener/LegalTransitionListener.php | 3 ++- tests/ValidationBaseline.php | 3 ++- tests/bootstrap.php | 2 +- 113 files changed, 250 insertions(+), 184 deletions(-) diff --git a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php index 3e27de2c4b..6ab3027e0f 100644 --- a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php @@ -9,7 +9,9 @@ final class TranscribeAudioAction extends Action { - public function __construct(private readonly Audio $audio) {} + public function __construct(private readonly Audio $audio) + { + } public function getParameters(): array { diff --git a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php index 4c132398ce..918736e2e3 100644 --- a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php +++ b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php @@ -18,7 +18,9 @@ public const string IDENTIFIER = 'transcribe_audio'; /** @param iterable $actionHandlers*/ - public function __construct(private iterable $actionHandlers) {} + public function __construct(private iterable $actionHandlers) + { + } public function getIdentifier(): string { diff --git a/code_samples/ai_actions/src/AI/DataType/Audio.php b/code_samples/ai_actions/src/AI/DataType/Audio.php index 5ec4ba854b..bea562a1c9 100644 --- a/code_samples/ai_actions/src/AI/DataType/Audio.php +++ b/code_samples/ai_actions/src/AI/DataType/Audio.php @@ -14,7 +14,9 @@ final class Audio implements DataType /** * @param non-empty-array $base64 */ - public function __construct(private array $base64) {} + public function __construct(private array $base64) + { + } public function getBase64(): string { diff --git a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php index 05d8bb3532..b1bd6c17d8 100644 --- a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php @@ -19,7 +19,8 @@ public function __construct( private HttpClientInterface $client, private string $host = 'http://localhost:8080' - ) {} + ) { + } public function supports(ActionInterface $action): bool { @@ -30,7 +31,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var Text */ + /** @var \Ibexa\Contracts\ConnectorAi\Action\DataType\Text */ $input = $action->getInput(); $text = $this->sanitizeInput($input->getText()); diff --git a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php index 1d73bcdbae..6623f6f3bf 100644 --- a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php @@ -5,7 +5,6 @@ namespace App\AI\Handler; use App\AI\ActionType\TranscribeAudioActionType; -use App\AI\DataType\Audio; use Ibexa\Contracts\ConnectorAi\Action\ActionHandlerInterface; use Ibexa\Contracts\ConnectorAi\Action\DataType\Text; use Ibexa\Contracts\ConnectorAi\Action\Response\TextResponse; @@ -27,7 +26,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var Audio $input */ + /** @var \App\AI\DataType\Audio $input */ $input = $action->getInput(); $path = $this->saveInputToFile($input->getBase64()); diff --git a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php index 99c01975b4..d9f2cbc417 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php +++ b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php @@ -6,4 +6,6 @@ use Ibexa\ConnectorAi\REST\Value\RestActionResponse; -final class AudioText extends RestActionResponse {} +final class AudioText extends RestActionResponse +{ +} diff --git a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php index ef19ccbb0d..6e33f288a0 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php @@ -12,7 +12,8 @@ public function __construct( private Audio $input, private RuntimeContext $runtimeContext - ) {} + ) { + } public function getInput(): Audio { diff --git a/code_samples/ai_actions/src/Query/Search.php b/code_samples/ai_actions/src/Query/Search.php index 108968d3b7..2069f83899 100644 --- a/code_samples/ai_actions/src/Query/Search.php +++ b/code_samples/ai_actions/src/Query/Search.php @@ -5,7 +5,6 @@ use Ibexa\Contracts\ConnectorAi\ActionConfiguration\ActionConfigurationQuery; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\Criterion; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\SortClause; -use Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\AbstractSortClause; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; @@ -22,5 +21,5 @@ new SortClause\Identifier(AbstractSortClause::SORT_ASC), ] ); -/** @var ActionConfigurationServiceInterface $actionConfigurationService */ +/** @var \Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface $actionConfigurationService */ $results = $actionConfigurationService->findActionConfigurations($query); diff --git a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php index 4101afa7c6..6dead11eb5 100644 --- a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php +++ b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php @@ -14,7 +14,8 @@ class CustomCheckoutController extends Controller public function __construct( private readonly CartServiceInterface $cartService, private readonly CheckoutServiceInterface $checkoutService - ) {} + ) { + } public function showContentAction(): Response { diff --git a/code_samples/api/notifications/notification_send.php b/code_samples/api/notifications/notification_send.php index 3a584bebbd..ce542c33a3 100644 --- a/code_samples/api/notifications/notification_send.php +++ b/code_samples/api/notifications/notification_send.php @@ -1,9 +1,6 @@ send( new SymfonyNotificationAdapter(new MyNotification($subject)), diff --git a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php index 7effa66575..0c82a0be11 100644 --- a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php +++ b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php @@ -4,4 +4,6 @@ use Symfony\Component\Notifier\Notification\Notification; -class ControllerFeedback extends Notification {} +class ControllerFeedback extends Notification +{ +} diff --git a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php index 34a93889ec..4d0af39535 100644 --- a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php @@ -5,7 +5,6 @@ namespace App\Command; use Ibexa\Contracts\Core\Repository\SearchService; -use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\EmbeddingQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; @@ -54,7 +53,7 @@ protected function execute( foreach ($result->searchHits as $searchHit) { assert($searchHit instanceof SearchHit); - /** @var Content $content */ + /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $content = $searchHit->valueObject; $contentInfo = $content->versionInfo->contentInfo; diff --git a/code_samples/api/public_php_api/src/Controller/CustomController.php b/code_samples/api/public_php_api/src/Controller/CustomController.php index 0b539852b0..1f00f31571 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomController.php @@ -10,7 +10,9 @@ class CustomController extends Controller { - public function __construct(private readonly SearchService $searchService) {} + public function __construct(private readonly SearchService $searchService) + { + } public function showContentAction(int $locationId): Response { diff --git a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php index cbbc14c6be..07c057262d 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php @@ -10,7 +10,9 @@ class CustomFilterController extends Controller { - public function __construct(private readonly ContentService $contentService) {} + public function __construct(private readonly ContentService $contentService) + { + } public function showChildrenAction(ContentView $view): ContentView { diff --git a/code_samples/api/public_php_api/src/Controller/PaginationController.php b/code_samples/api/public_php_api/src/Controller/PaginationController.php index 339adc98a0..3d72169833 100644 --- a/code_samples/api/public_php_api/src/Controller/PaginationController.php +++ b/code_samples/api/public_php_api/src/Controller/PaginationController.php @@ -13,7 +13,9 @@ class PaginationController extends Controller { - public function __construct(private readonly SearchService $searchService) {} + public function __construct(private readonly SearchService $searchService) + { + } public function showContentAction( Request $request, diff --git a/code_samples/api/public_php_api/src/embedding_fields.php b/code_samples/api/public_php_api/src/embedding_fields.php index 61570a881e..269bc7b4b0 100644 --- a/code_samples/api/public_php_api/src/embedding_fields.php +++ b/code_samples/api/public_php_api/src/embedding_fields.php @@ -1,9 +1,8 @@ create(); echo $embeddingField->getType(); // for example, "ibexa_dense_vector_model_123" diff --git a/code_samples/api/public_php_api/src/perform_count.php b/code_samples/api/public_php_api/src/perform_count.php index 0db9aae9ec..db61e36d73 100644 --- a/code_samples/api/public_php_api/src/perform_count.php +++ b/code_samples/api/public_php_api/src/perform_count.php @@ -1,10 +1,9 @@ getExtension('ibexa'); // Add the policy provider, you can register multiple providers by calling the method repeatedly diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php index 1b9efd5c75..d8a445b449 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php @@ -20,7 +20,8 @@ public function __construct( private readonly PermissionResolver $permissionResolver, private readonly ContentService $contentService, private readonly FormSubmissionGateway $gateway, - ) {} + ) { + } public function create( ContentInfo $content, diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index 1145ce3e01..493df39e9b 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -8,7 +8,6 @@ use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\LanguageService; use Ibexa\Contracts\Core\Repository\PermissionResolver; -use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Contracts\FormBuilder\FormSubmission\FormSubmissionServiceInterface; use Ibexa\FormBuilder\FieldType\FormFactory; @@ -65,7 +64,7 @@ public function renderView(array $parameters): string #[\Override] public function evaluate(array $parameters): bool { - /** @var Content $content */ + /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $content = $parameters['content']; return $this->innerTab->evaluate($parameters) && diff --git a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php index c2b013d1de..855a359d41 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php @@ -9,7 +9,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference; -use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\ValidationError; @@ -53,7 +52,7 @@ public function buildValue(array $limitationValues): CustomLimitationValue } /** - * @param ValueObject[]|null $targets + * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject[]|null $targets * * @return bool|null */ diff --git a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php index 30e01f6317..3d879f9ff1 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php @@ -29,5 +29,7 @@ public function getFormTemplate(): string return '@ibexadesign/limitation/custom_limitation_form.html.twig'; } - public function filterLimitationValues(Limitation $limitation): void {} + public function filterLimitationValues(Limitation $limitation): void + { + } } diff --git a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php index 0fc3d7ca49..dd07d01498 100644 --- a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php +++ b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php @@ -16,7 +16,8 @@ class AllContentListController extends Controller public function __construct( private readonly SearchService $searchService, private readonly FormFactory $formFactory - ) {} + ) { + } public function listAction(int $page = 1): Response { diff --git a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php index 01e374efef..7a97326ba6 100644 --- a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php +++ b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php @@ -11,7 +11,8 @@ { public function __construct( private bool $kernelDebug - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php index 8a153f58f5..c1447f80ba 100644 --- a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php +++ b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php @@ -9,7 +9,9 @@ final readonly class ContentPublishEventListener implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) {} + public function __construct(private NotificationService $notificationService) + { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/Notification/ListRenderer.php b/code_samples/back_office/notifications/src/Notification/ListRenderer.php index dfd097be61..5156265cee 100644 --- a/code_samples/back_office/notifications/src/Notification/ListRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/ListRenderer.php @@ -17,7 +17,8 @@ public function __construct( protected Environment $twig, protected RouterInterface $router, protected RequestStack $requestStack - ) {} + ) { + } public function render(Notification $notification): string { diff --git a/code_samples/back_office/notifications/src/Notification/MyRenderer.php b/code_samples/back_office/notifications/src/Notification/MyRenderer.php index 5abe1a38e8..0c2d38ccd4 100644 --- a/code_samples/back_office/notifications/src/Notification/MyRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/MyRenderer.php @@ -15,7 +15,8 @@ class MyRenderer implements NotificationRenderer, TypedNotificationRendererInter public function __construct( protected Environment $twig, protected RouterInterface $router - ) {} + ) { + } public function render(Notification $notification): string { diff --git a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php index 6f052c3a60..924e92ea45 100644 --- a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php +++ b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php @@ -13,9 +13,11 @@ class RichTextBlockSubscriber implements EventSubscriberInterface { /** - * @param DOMDocumentFactory $domDocumentFactory + * @param \Ibexa\FieldTypeRichText\RichText\DOMDocumentFactory $domDocumentFactory */ - public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) {} + public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) + { + } /** * {@inheritdoc} @@ -28,7 +30,7 @@ public static function getSubscribedEvents(): array } /** - * @param PreRenderEvent $event + * @param \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent $event */ public function onBlockPreRender(PreRenderEvent $event): void { diff --git a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php index edeb298b81..78ae51c261 100644 --- a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php +++ b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php @@ -13,7 +13,9 @@ final readonly class NotificationScenarioSubscriber implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) {} + public function __construct(private NotificationService $notificationService) + { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php index 22c68d56cc..05fe585da8 100644 --- a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php +++ b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php @@ -7,8 +7,6 @@ use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; use Ibexa\Contracts\Search\Event\BuildSuggestionCollectionEvent; -use Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion; -use Ibexa\ProductCatalog\Local\Repository\Values\Product; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -17,7 +15,9 @@ class MySuggestionEventSubscriber implements EventSubscriberInterface, LoggerAwa { use LoggerAwareTrait; - public function __construct(private ProductServiceInterface $productService) {} + public function __construct(private ProductServiceInterface $productService) + { + } public static function getSubscribedEvents(): array { @@ -46,13 +46,13 @@ public function onBuildSuggestionCollectionEvent(BuildSuggestionCollectionEvent if ($searchResult->getTotalCount()) { $maxScore = 0.0; $suggestionsByContentIds = []; - /** @var ContentSuggestion $suggestion */ + /** @var \Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion $suggestion */ foreach ($suggestionCollection as $suggestion) { $maxScore = max($suggestion->getScore(), $maxScore); $suggestionsByContentIds[$suggestion->getContent()->id] = $suggestion; } - /** @var Product $product */ + /** @var \Ibexa\ProductCatalog\Local\Repository\Values\Product $product */ foreach ($searchResult as $product) { $contentId = $product->getContent()->id; if (array_key_exists($contentId, $suggestionsByContentIds)) { diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php index 89ffb7d420..adde49a43e 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php @@ -2,7 +2,6 @@ use DateTimeImmutable; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; -use Ibexa\Contracts\ProductCatalog\ProductServiceInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalogDateTimeAttribute\Search\Criterion\DateTimeAttribute; @@ -10,5 +9,5 @@ $filter = new DateTimeAttribute('event_date', new DateTimeImmutable('2025-07-06')); $filter->setOperator(FieldValueCriterion::COMPARISON_EQ); $query->setFilter($filter); -/** @var ProductServiceInterface $productService */ +/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php index c91b9863b6..f8016aa377 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php @@ -1,11 +1,10 @@ setFilter(new DateTimeAttributeRange('event_date', new DateTimeImmutable('2025-01-01'))); -/** @var ProductServiceInterface $productService */ +/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php index a4dad8ae90..d050f96bed 100644 --- a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php +++ b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php @@ -1,13 +1,12 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php index 046d20f568..2c449d97b8 100644 --- a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php +++ b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php @@ -1,10 +1,9 @@ setFilter(new SymbolAttribute('ean', ['5023920187205'])); -/** @var ProductServiceInterface $productService */ +/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php index fdf241ebf1..e30aeecc40 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php @@ -1,7 +1,6 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php index dc8435f80b..49c5461ecb 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php @@ -1,7 +1,6 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php index 7dd644361e..4653b75476 100644 --- a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php +++ b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php @@ -21,7 +21,7 @@ public function normalize( ?string $format = null, array $context = [] ): array { - /** @var ProductSuggestion $object */ + /** @var \App\Search\Model\Suggestion\ProductSuggestion $object */ return [ 'type' => 'product', 'name' => $object->getName(), diff --git a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php index 70beaca623..d129da2432 100644 --- a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php +++ b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php @@ -11,7 +11,9 @@ final readonly class StaticThumbnailStrategy implements ThumbnailStrategy { - public function __construct(private string $staticThumbnail) {} + public function __construct(private string $staticThumbnail) + { + } public function getThumbnail( ContentType $contentType, diff --git a/code_samples/cache/http_cache/src/response_tagging.php b/code_samples/cache/http_cache/src/response_tagging.php index b4c8ae877c..c25931aefd 100644 --- a/code_samples/cache/http_cache/src/response_tagging.php +++ b/code_samples/cache/http_cache/src/response_tagging.php @@ -1,16 +1,13 @@ tag($view); // When working with a view -/** @var Content $content */ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $responseTagger->tag($content->getContentInfo()); // When working with a content item -/** @var Location $location */ +/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ $responseTagger->tag($location); // When working with a location diff --git a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php index 51d10d4b0e..21c36d85b0 100644 --- a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php +++ b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php @@ -11,7 +11,9 @@ final class ProductNameFilterFormMapper implements FilterFormMapperInterface { - public function __construct() {} + public function __construct() + { + } public function createFilterForm( FilterDefinitionInterface $filterDefinition, diff --git a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php index e5edf08092..39d377f04c 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php @@ -16,7 +16,8 @@ public function __construct( private CartResolverInterface $innerCartResolver, private SessionServiceInterface $sessionService, private RequestStack $requestStack - ) {} + ) { + } public function resolveCart(?User $user = null): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php index dd8e7000c8..8e719eba26 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php @@ -14,7 +14,8 @@ public function __construct( private Repository $repository, private CartServiceInterface $cartService, private ProxyGeneratorInterface $proxyGenerator - ) {} + ) { + } public function createCartProxy(string $identifier): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php index ab1dea1603..8f8a51ddb1 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php @@ -20,7 +20,8 @@ public function __construct( private CartProxyMapperInterface $cartProxyMapper, private UserProxyDomainMapperInterface $userDomainMapper, private ParticipantCollectionDomainMapperInterface $participantCollectionDomainMapper - ) {} + ) { + } /** * @param \App\Collaboration\Cart\Persistence\Values\CartSession $data diff --git a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php index 37528daa7f..575bfc840b 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php @@ -22,7 +22,8 @@ public function __construct( private readonly PermissionResolverInterface $innerPermissionResolver, private readonly SessionServiceInterface $sessionService, private readonly RequestStack $requestStack, - ) {} + ) { + } public function canUser(PolicyInterface $policy): bool { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php index e9019391d8..98a6c8ff23 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php @@ -2,7 +2,6 @@ namespace App\Collaboration\Cart\Persistence\Gateway; -use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct as CreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionUpdateStruct as UpdateStruct; use Doctrine\DBAL\Types\Types; @@ -52,7 +51,7 @@ public function getDiscriminator(): string } /** - * @param CartSessionCreateStruct $createStruct + * @param \App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct $createStruct */ public function create( int $sessionId, @@ -65,7 +64,7 @@ public function create( } /** - * @param AbstractSessionUpdateStruct $updateStruct + * @param \Ibexa\Collaboration\Persistence\Values\AbstractSessionUpdateStruct $updateStruct */ public function update(AbstractSessionUpdateStruct $updateStruct): void { diff --git a/code_samples/collaboration/src/Controller/ShareCartCreateController.php b/code_samples/collaboration/src/Controller/ShareCartCreateController.php index 85f4939e49..b0b612eba4 100644 --- a/code_samples/collaboration/src/Controller/ShareCartCreateController.php +++ b/code_samples/collaboration/src/Controller/ShareCartCreateController.php @@ -4,7 +4,6 @@ use App\Collaboration\Cart\CartSessionCreateStruct; use App\Collaboration\Cart\CartSessionType; -use App\Form\Data\ShareCartData; use App\Form\Type\ShareCartType; use Ibexa\Contracts\Cart\CartResolverInterface; use Ibexa\Contracts\Collaboration\Participant\ExternalParticipantCreateStruct; @@ -23,7 +22,8 @@ final class ShareCartCreateController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, private readonly CartResolverInterface $cartResolver - ) {} + ) { + } public function __invoke(Request $request): Response { @@ -37,7 +37,7 @@ public function __invoke(Request $request): Response $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - /** @var ShareCartData $data */ + /** @var \App\Form\Data\ShareCartData $data */ $data = $form->getData(); // Handle the form submission diff --git a/code_samples/collaboration/src/Controller/ShareCartJoinController.php b/code_samples/collaboration/src/Controller/ShareCartJoinController.php index 1580b27deb..79601e9f05 100644 --- a/code_samples/collaboration/src/Controller/ShareCartJoinController.php +++ b/code_samples/collaboration/src/Controller/ShareCartJoinController.php @@ -18,7 +18,8 @@ final class ShareCartJoinController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, - ) {} + ) { + } public function __invoke( Request $request, diff --git a/code_samples/collaboration/src/Form/Data/ShareCartData.php b/code_samples/collaboration/src/Form/Data/ShareCartData.php index 38391c76e4..37c2e0cc2c 100644 --- a/code_samples/collaboration/src/Form/Data/ShareCartData.php +++ b/code_samples/collaboration/src/Form/Data/ShareCartData.php @@ -6,7 +6,8 @@ final class ShareCartData { public function __construct( private ?string $email = null - ) {} + ) { + } public function getEmail(): ?string { diff --git a/code_samples/collaboration/src/Query/Search.php b/code_samples/collaboration/src/Query/Search.php index 8592b7430b..b4f7dfbabc 100644 --- a/code_samples/collaboration/src/Query/Search.php +++ b/code_samples/collaboration/src/Query/Search.php @@ -3,7 +3,6 @@ use Ibexa\Contracts\Collaboration\Session\Query\Criterion; use Ibexa\Contracts\Collaboration\Session\Query\SortClause; use Ibexa\Contracts\Collaboration\Session\SessionQuery; -use Ibexa\Contracts\Collaboration\SessionServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; use Ibexa\Contracts\CoreSearch\Values\Query\SortClause\FieldValueSortClause; @@ -18,5 +17,5 @@ new SortClause\CreatedAt(FieldValueSortClause::SORT_DESC), ] ); -/** @var SessionServiceInterface $sessionService */ +/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */ $sessionList = $sessionService->findSessions($query); diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php index 9412f88b68..a3aa625019 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php @@ -21,7 +21,7 @@ public function __construct( } /** - * @param ApplicationDetailsView $view + * @param \Ibexa\CorporateAccount\View\ApplicationDetailsView $view */ protected function configureView(View $view): void { diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php index ff4a2d7243..54a85470e1 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php @@ -23,7 +23,8 @@ public function __construct( private FormFactoryInterface $formFactory, private HandlerInterface $applicationStateHandler, private TranslatableNotificationHandlerInterface $notificationHandler - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSection.php b/code_samples/data_migration/src/Migrations/Action/AssignSection.php index d809fced4e..876c51491a 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSection.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSection.php @@ -10,7 +10,9 @@ { public const string TYPE = 'assign_section'; - public function __construct(private string $sectionIdentifier) {} + public function __construct(private string $sectionIdentifier) + { + } /** * @return string diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php index 1dcb4e7a1e..85f5ca40f3 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php @@ -4,7 +4,6 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\SectionService; -use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\ValueObject as APIValueObject; use Ibexa\Migration\StepExecutor\ActionExecutor\ExecutorInterface; use Ibexa\Migration\ValueObject; @@ -14,11 +13,12 @@ public function __construct( private ContentService $contentService, private SectionService $sectionService - ) {} + ) { + } /** * @param AssignSection $action - * @param Content $content + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ public function handle( ValueObject\Step\Action $action, diff --git a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php index 6d42605ca4..394e3dfd01 100644 --- a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php +++ b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php @@ -12,7 +12,9 @@ final class ReplaceNameStepExecutor extends AbstractStepExecutor { - public function __construct(private readonly ContentService $contentService) {} + public function __construct(private readonly ContentService $contentService) + { + } protected function doHandle(StepInterface $step) { diff --git a/code_samples/discounts/src/Command/OrderPriceCommand.php b/code_samples/discounts/src/Command/OrderPriceCommand.php index 56c96a64df..a5cd9d544f 100644 --- a/code_samples/discounts/src/Command/OrderPriceCommand.php +++ b/code_samples/discounts/src/Command/OrderPriceCommand.php @@ -62,7 +62,7 @@ public function execute( $output->writeln(sprintf('Discounted price: %s', $this->formatPrice($resolvedPrice->getMoney()))); if ($resolvedPrice instanceof PriceEnvelopeInterface) { - /** @var DiscountStamp $discountStamp */ + /** @var \Ibexa\Discounts\Value\Price\Stamp\DiscountStamp $discountStamp */ foreach ($resolvedPrice->all(DiscountStamp::class) as $discountStamp) { $output->writeln( sprintf( diff --git a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php index cddfb2767e..a232085345 100644 --- a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php +++ b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php @@ -12,7 +12,8 @@ public function __construct( private PermissionResolver $permissionResolver, private UserService $userService - ) {} + ) { + } /** * @return array{current_user_registration_date: \DateTimeInterface} diff --git a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php index 392f75d6f6..7805cfab00 100644 --- a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php +++ b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php @@ -7,7 +7,9 @@ final readonly class RecentDiscountPrioritizationStrategy implements DiscountPrioritizationStrategyInterface { - public function __construct(private DiscountPrioritizationStrategyInterface $inner) {} + public function __construct(private DiscountPrioritizationStrategyInterface $inner) + { + } public function getOrder(): array { diff --git a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php index 558f14bf90..3c40c44fdf 100644 --- a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php +++ b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php @@ -11,5 +11,6 @@ final class AnniversaryConditionStep extends AbstractDiscountStep public function __construct( public bool $enabled = false, public int $tolerance = 0 - ) {} + ) { + } } diff --git a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php index 9a4913093f..8765383d45 100644 --- a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array } /** - * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event + * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -30,7 +30,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var IsAccountAnniversary $discount */ + /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php index 0b71977079..8f60118ad1 100644 --- a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array } /** - * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event + * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -35,7 +35,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var IsAccountAnniversary $discount */ + /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php index d2c460bc1b..e25d813e2d 100644 --- a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php +++ b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php @@ -50,7 +50,7 @@ public function mapUpdateDataToStruct( } /** - * @param DiscountCreateStruct|DiscountUpdateStruct $struct + * @param \Ibexa\Contracts\Discounts\Value\Struct\DiscountCreateStruct|\Ibexa\Contracts\Discounts\Value\Struct\DiscountUpdateStruct $struct */ private function addRuleToStruct( DiscountValueInterface $data, diff --git a/code_samples/discounts/src/Query/Search.php b/code_samples/discounts/src/Query/Search.php index 2f0a0f4d49..9a6af40415 100644 --- a/code_samples/discounts/src/Query/Search.php +++ b/code_samples/discounts/src/Query/Search.php @@ -3,7 +3,6 @@ declare(strict_types=1); use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; -use Ibexa\Contracts\Discounts\DiscountServiceInterface; use Ibexa\Contracts\Discounts\Value\Query\Criterion; use Ibexa\Contracts\Discounts\Value\Query\DiscountQuery; use Ibexa\Contracts\Discounts\Value\Query\SortClause; @@ -26,5 +25,5 @@ ] ); -/** @var DiscountServiceInterface $discountService */ +/** @var \Ibexa\Contracts\Discounts\DiscountServiceInterface $discountService */ $results = $discountService->findDiscounts($query); diff --git a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php index 985549c9d2..894181613d 100644 --- a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php +++ b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php @@ -13,7 +13,8 @@ public function __construct( private ?float $x = null, #[Assert\NotBlank] private ?float $y = null - ) {} + ) { + } public function getX(): ?float { diff --git a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php index cbe2011bd9..7b5b193696 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php @@ -10,7 +10,8 @@ final class Value implements ValueInterface public function __construct( private ?float $x = null, private ?float $y = null - ) {} + ) { + } public function getX(): ?float { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php index 9569b98b2e..4cdb90f8fa 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php @@ -11,7 +11,9 @@ final readonly class HelloWorldComparisonEngine implements FieldTypeComparisonEngine { - public function __construct(private StringComparisonEngine $stringValueComparisonEngine) {} + public function __construct(private StringComparisonEngine $stringValueComparisonEngine) + { + } /** * @param Value $comparisonDataA diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php index a97569385a..4e6548d4d2 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php @@ -9,7 +9,9 @@ final readonly class HelloWorldComparisonResult implements ComparisonResult { - public function __construct(private StringComparisonResult $stringDiff) {} + public function __construct(private StringComparisonResult $stringDiff) + { + } public function getHelloWorldDiff(): StringComparisonResult { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php index 85b5b85c6b..54df3906f9 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php @@ -9,6 +9,6 @@ class Value extends FieldTypeComparisonValue { - /** @var StringComparisonValue */ + /** @var \Ibexa\VersionComparison\ComparisonValue\StringComparisonValue */ public StringComparisonValue $name; } diff --git a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php index afd3c1ce24..30981233db 100644 --- a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php +++ b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php @@ -4,4 +4,6 @@ use Ibexa\FormBuilder\FormSubmission\Converter\BooleanFieldSubmissionConverter; -class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter {} +class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter +{ +} diff --git a/code_samples/front/embed_content/src/Controller/RelationController.php b/code_samples/front/embed_content/src/Controller/RelationController.php index e30e63e33d..5af6bf03b6 100644 --- a/code_samples/front/embed_content/src/Controller/RelationController.php +++ b/code_samples/front/embed_content/src/Controller/RelationController.php @@ -13,7 +13,8 @@ class RelationController public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService - ) {} + ) { + } public function showContentAction( View $view, diff --git a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php index cdc28a5ba2..b82a4feeed 100644 --- a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php +++ b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php @@ -14,7 +14,8 @@ class BreadcrumbController extends Controller public function __construct( private readonly LocationService $locationService, private readonly SearchService $searchService - ) {} + ) { + } public function showBreadcrumbsAction($locationId): Response { diff --git a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php index f320e4cb22..9266372cf2 100644 --- a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php +++ b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php @@ -7,7 +7,9 @@ class MenuBuilder { - public function __construct(private readonly FactoryInterface $factory) {} + public function __construct(private readonly FactoryInterface $factory) + { + } public function buildMenu(): ItemInterface { diff --git a/code_samples/front/view_matcher/src/View/Matcher/Owner.php b/code_samples/front/view_matcher/src/View/Matcher/Owner.php index d441783063..9c21e12141 100644 --- a/code_samples/front/view_matcher/src/View/Matcher/Owner.php +++ b/code_samples/front/view_matcher/src/View/Matcher/Owner.php @@ -2,7 +2,6 @@ namespace App\View\Matcher; -use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -17,10 +16,12 @@ class Owner implements MatcherInterface /** @var string[] */ private array $matchingUserLogins; - public function __construct(private readonly UserService $userService) {} + public function __construct(private readonly UserService $userService) + { + } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function matchLocation(Location $location): bool { @@ -28,7 +29,7 @@ public function matchLocation(Location $location): bool } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function matchContentInfo(ContentInfo $contentInfo): bool { @@ -36,7 +37,7 @@ public function matchContentInfo(ContentInfo $contentInfo): bool } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function match(View $view): ?bool { @@ -52,7 +53,7 @@ public function match(View $view): ?bool } /** - * @throws NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ private function hasOwner(ContentInfo $contentInfo): bool { diff --git a/code_samples/mcp/src/Command/McpServerListCommand.php b/code_samples/mcp/src/Command/McpServerListCommand.php index 12ccbb909e..ad21b3f104 100644 --- a/code_samples/mcp/src/Command/McpServerListCommand.php +++ b/code_samples/mcp/src/Command/McpServerListCommand.php @@ -10,7 +10,9 @@ #[AsCommand(name: 'app:mcp:server_list', description: 'List MCP servers')] class McpServerListCommand { - public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) {} + public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) + { + } public function __invoke(SymfonyStyle $io): int { diff --git a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php index f3641d6a65..f5158b7d1c 100644 --- a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php +++ b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php @@ -10,12 +10,12 @@ class MyStringAttributeMapper implements AttributeFormTypeMapperInterface { /** - * @param FormBuilderInterface $formBuilder - * @param BlockDefinition $blockDefinition - * @param BlockAttributeDefinition $blockAttributeDefinition + * @param \Symfony\Component\Form\FormBuilderInterface $formBuilder + * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockDefinition $blockDefinition + * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockAttributeDefinition $blockAttributeDefinition * @param array $constraints * - * @return FormBuilderInterface + * @return \Symfony\Component\Form\FormBuilderInterface * * @throws \Exception */ diff --git a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php index 779bcc8a74..33c2e4e853 100644 --- a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php +++ b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php @@ -1,6 +1,5 @@ getConstraints()['custom_not_blank'])) { diff --git a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php index 6b06810792..408be0db42 100644 --- a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php +++ b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php @@ -5,12 +5,13 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; -use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class BlockEmbedEventEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ContentService $contentService) {} + public function __construct(private readonly ContentService $contentService) + { + } public static function getSubscribedEvents(): array { @@ -21,7 +22,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var TwigRenderRequest $renderRequest */ + /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); $parameters['event_content'] = $this->contentService->loadContent($parameters['event']); diff --git a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php index 914b498f0f..00f0884efb 100644 --- a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php +++ b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php @@ -4,7 +4,6 @@ use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; -use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyBlockListener implements EventSubscriberInterface @@ -18,7 +17,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var TwigRenderRequest $renderRequest */ + /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); diff --git a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php index c28aa7ddc7..0c28ad889d 100644 --- a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php +++ b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php @@ -11,7 +11,9 @@ final readonly class ProductAvailabilityPurchasableWithoutStockStrategy implements ProductAvailabilityStrategyInterface { - public function __construct(private HandlerInterface $handler) {} + public function __construct(private HandlerInterface $handler) + { + } public function accept(AvailabilityContextInterface $context): bool { diff --git a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php index 0e4c6f1101..e8e8e547f6 100644 --- a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php +++ b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php @@ -4,4 +4,6 @@ use Ibexa\Contracts\ProductCatalog\Values\Availability\AvailabilityContextInterface; -final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface {} +final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface +{ +} diff --git a/code_samples/recent_activity/src/Event/MyFeatureEvent.php b/code_samples/recent_activity/src/Event/MyFeatureEvent.php index 51b7ba50e1..84b46ba6c1 100644 --- a/code_samples/recent_activity/src/Event/MyFeatureEvent.php +++ b/code_samples/recent_activity/src/Event/MyFeatureEvent.php @@ -9,7 +9,8 @@ class MyFeatureEvent extends Event public function __construct( private readonly object $object, private readonly string $action - ) {} + ) { + } public function getObject(): object { diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php index 4ba4a98456..812875614c 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php @@ -3,13 +3,14 @@ namespace App\EventSubscriber; use App\Event\MyFeatureEvent; -use App\MyFeature\MyFeature; use Ibexa\Contracts\ActivityLog\ActivityLogServiceInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyFeatureEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ActivityLogServiceInterface $activityLogService) {} + public function __construct(private readonly ActivityLogServiceInterface $activityLogService) + { + } public static function getSubscribedEvents(): array { @@ -20,7 +21,7 @@ public static function getSubscribedEvents(): array public function onMyFeatureEvent(MyFeatureEvent $event): void { - /** @var MyFeature $object */ + /** @var \App\MyFeature\MyFeature $object */ $object = $event->getObject(); $className = $object::class; $id = (string)$object->id; diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php index 354928100c..2133b67029 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php @@ -11,7 +11,9 @@ class MyFeaturePostActivityListLoadEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly MyFeatureService $myFeatureService) {} + public function __construct(private readonly MyFeatureService $myFeatureService) + { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/recent_activity/src/recent_activity_disable.php b/code_samples/recent_activity/src/recent_activity_disable.php index 0482bb0160..ba153acadf 100644 --- a/code_samples/recent_activity/src/recent_activity_disable.php +++ b/code_samples/recent_activity/src/recent_activity_disable.php @@ -1,7 +1,6 @@ disable(); // Perform operations that should not be logged to the activity log diff --git a/code_samples/recommendations/EventData.php b/code_samples/recommendations/EventData.php index 78a20b405a..4825ed6114 100644 --- a/code_samples/recommendations/EventData.php +++ b/code_samples/recommendations/EventData.php @@ -10,7 +10,8 @@ class EventData { public function __construct( private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) {} + ) { + } public function dispatchVisitEvent(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventMapper.php b/code_samples/recommendations/EventMapper.php index f8b924a91f..cf0bd3bd8e 100644 --- a/code_samples/recommendations/EventMapper.php +++ b/code_samples/recommendations/EventMapper.php @@ -13,7 +13,8 @@ class EventMapper public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) {} + ) { + } public function trackProductView(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventSubscriber.php b/code_samples/recommendations/EventSubscriber.php index 1be6a3fa84..175784efc4 100644 --- a/code_samples/recommendations/EventSubscriber.php +++ b/code_samples/recommendations/EventSubscriber.php @@ -14,7 +14,8 @@ class EventSubscriber implements EventSubscriberInterface public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/search/content/customfield_criterion.php b/code_samples/search/content/customfield_criterion.php index f675f94e42..a9a52400de 100644 --- a/code_samples/search/content/customfield_criterion.php +++ b/code_samples/search/content/customfield_criterion.php @@ -1,6 +1,5 @@ query = new Query\Criterion\CustomField('content_name_s', Operator::EQ, '/Ibexa.*/'); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_no_entries_criterion.php b/code_samples/search/content/taxonomy_no_entries_criterion.php index 2055b506ec..048006d41c 100644 --- a/code_samples/search/content/taxonomy_no_entries_criterion.php +++ b/code_samples/search/content/taxonomy_no_entries_criterion.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -16,5 +15,5 @@ ] ); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_subtree_criterion.php b/code_samples/search/content/taxonomy_subtree_criterion.php index fc4e59ff9d..c13f94ed70 100644 --- a/code_samples/search/content/taxonomy_subtree_criterion.php +++ b/code_samples/search/content/taxonomy_subtree_criterion.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -16,5 +15,5 @@ ] ); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php index 31f0257cef..a707b331c5 100644 --- a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php +++ b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php @@ -10,7 +10,9 @@ final readonly class ContentTypeGroupGroupResolver implements GroupResolverInterface { - public function __construct(private Handler $contentTypeHandler) {} + public function __construct(private Handler $contentTypeHandler) + { + } public function resolveDocumentGroup(BaseDocument $document): string { diff --git a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php index 7089067cb1..2952020fcd 100644 --- a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php +++ b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php @@ -12,4 +12,6 @@ * * @phpstan-extends \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\AbstractRangeAggregation */ -final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation {} +final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation +{ +} diff --git a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php index 58f2c79eca..d74655dd23 100644 --- a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php @@ -19,7 +19,7 @@ public function supports( } /** - * @param CameraManufacturerCriterion $criterion + * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion */ public function visit( CriterionVisitor $dispatcher, diff --git a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php index 1a4622ebd4..434b6ee313 100644 --- a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php @@ -16,7 +16,7 @@ public function canVisit(CriterionInterface $criterion): bool } /** - * @param CameraManufacturerCriterion $criterion + * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion */ public function visit( CriterionInterface $criterion, diff --git a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php index 6c894f539b..f2fe9173bf 100644 --- a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php +++ b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php @@ -14,7 +14,8 @@ class WebinarEventParentNameFieldMapper extends ContentFieldMapper public function __construct( protected ContentHandler $contentHandler, protected LocationHandler $locationHandler - ) {} + ) { + } public function accept(Content $content): bool { @@ -23,7 +24,7 @@ public function accept(Content $content): bool } /** - * @return Field[] + * @return \Ibexa\Contracts\Core\Search\Field[] */ public function mapFields(Content $content): array { diff --git a/code_samples/search/location/isbookmarked_criterion.php b/code_samples/search/location/isbookmarked_criterion.php index c7a67f7316..c61bf951b1 100644 --- a/code_samples/search/location/isbookmarked_criterion.php +++ b/code_samples/search/location/isbookmarked_criterion.php @@ -1,10 +1,9 @@ filter = new IsBookmarked(); -/** @var SearchService $searchService */ +/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ $results = $searchService->findLocations($query); diff --git a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php index 0e5fdfb877..a0988ff216 100644 --- a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php +++ b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php @@ -13,7 +13,9 @@ class ProductViewController extends AbstractController { - public function __construct(private readonly LocalProductServiceInterface $productService) {} + public function __construct(private readonly LocalProductServiceInterface $productService) + { + } public function viewAction( Request $request, diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index 01758aa43d..c6a9721824 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -31,7 +31,8 @@ public function __construct( private readonly ShoppingListServiceInterface $shoppingListService, private readonly CartShoppingListTransferServiceInterface $cartShoppingListTransferService, private readonly LocalProductServiceInterface $productService - ) {} + ) { + } #[Route( path: '/app-shopping-list-cart', diff --git a/code_samples/shopping_list/search/criteria.php b/code_samples/shopping_list/search/criteria.php index 054c916e00..18c0ae2429 100644 --- a/code_samples/shopping_list/search/criteria.php +++ b/code_samples/shopping_list/search/criteria.php @@ -1,10 +1,9 @@ getCurrentUserReference()), diff --git a/code_samples/shopping_list/search/sort_clauses.php b/code_samples/shopping_list/search/sort_clauses.php index 8530a64aa4..4927957c09 100644 --- a/code_samples/shopping_list/search/sort_clauses.php +++ b/code_samples/shopping_list/search/sort_clauses.php @@ -1,11 +1,10 @@ findShoppingLists( new ShoppingListQuery( null, diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php index 33353fa67b..b1a2c4bf12 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php @@ -16,7 +16,8 @@ public function __construct( private MyApiClient $apiClient, private string $actionConfigurationIdentifier, - ) {} + ) { + } public function getIdentifier(): string { diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php index 204b93e79b..e726d3435f 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php @@ -15,7 +15,8 @@ */ public function __construct( private MyApiClient $apiClient, - ) {} + ) { + } public function getIdentifier(): string { diff --git a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php index 580273da51..04d20d6b93 100644 --- a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php +++ b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php @@ -12,7 +12,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; -use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class RandomBlockListener implements EventSubscriberInterface @@ -21,7 +20,8 @@ public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService, private readonly SearchService $searchService - ) {} + ) { + } public static function getSubscribedEvents(): array { @@ -33,7 +33,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { $blockValue = $event->getBlockValue(); - /** @var TwigRenderRequest $renderRequest */ + /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $renderRequest->getParameters(); diff --git a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php index 9a24a9f89e..4f351028c5 100644 --- a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php +++ b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php @@ -16,7 +16,8 @@ public function __construct( private readonly ConfigResolverInterface $configResolver, private readonly UserService $userService, private readonly array $userMap = [], - ) {} + ) { + } public static function getSubscribedEvents(): array { diff --git a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php index b82f2c29ce..cbd1d14a74 100644 --- a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php +++ b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php @@ -31,7 +31,7 @@ public function __construct( } /** - * @param GoogleUser $resourceOwner + * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner */ protected function loadUser( ResourceOwnerInterface $resourceOwner, @@ -41,7 +41,7 @@ protected function loadUser( } /** - * @param GoogleUser $resourceOwner + * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner */ protected function createUser( ResourceOwnerInterface $resourceOwner, diff --git a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php index d113b372c2..1e6d72e701 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php @@ -10,7 +10,9 @@ class ApprovedTransitionListener extends AbstractTransitionWorkflowActionListener { - public function __construct(private readonly NotificationInterface $notificationHandler) {} + public function __construct(private readonly NotificationInterface $notificationHandler) + { + } public function getIdentifier(): string { diff --git a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php index 8bf9453e9d..9534a666a9 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php @@ -14,7 +14,8 @@ class LegalTransitionListener extends AbstractTransitionWorkflowActionListener public function __construct( private readonly NotificationInterface $notificationHandler, protected WorkflowRegistryInterface $workflowRegistry - ) {} + ) { + } public function getIdentifier(): string { diff --git a/tests/ValidationBaseline.php b/tests/ValidationBaseline.php index 53422e93e0..99ce772226 100644 --- a/tests/ValidationBaseline.php +++ b/tests/ValidationBaseline.php @@ -28,7 +28,8 @@ final class ValidationBaseline public function __construct( private readonly string $baselineFile, private readonly string $repoRoot, - ) {} + ) { + } public function isInBaseline( string $relativePath, diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 00cd6610cc..9374e6f3a2 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,7 +8,7 @@ use Composer\Autoload\ClassLoader; -/** @var ClassLoader $loader */ +/** @var \Composer\Autoload\ClassLoader $loader */ $loader = require __DIR__ . '/../vendor/autoload.php'; /** From 6a37d38a63ddbe5bdfff4bb696111be7339f685e Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:49:28 +0100 Subject: [PATCH 50/66] update deptrac.baseline.yaml --- deptrac.baseline.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deptrac.baseline.yaml b/deptrac.baseline.yaml index 5f75c85563..cef67b4a11 100644 --- a/deptrac.baseline.yaml +++ b/deptrac.baseline.yaml @@ -90,6 +90,7 @@ deptrac: - Ibexa\Core\MVC\Symfony\View\View App\Controller\RideController: - Ibexa\Bundle\Core\Controller + - Ibexa\Core\FieldType\RelationList\Value - Ibexa\Core\MVC\Symfony\View\ContentView App\Controller\SvgController: - Ibexa\Core\Helper\TranslationHelper @@ -270,3 +271,5 @@ deptrac: - Ibexa\AdminUi\UniversalDiscovery\Event\ConfigResolveEvent MyMapper: - Ibexa\ContentForms\Form\Type\FieldType\CheckboxFieldType + NavigationController: + - Ibexa\Bundle\Core\Controller From 2f77be9739ca935ba22dc996fcbd2f34061eb398 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:51:23 +0100 Subject: [PATCH 51/66] update phpstan.baseline.yaml --- phpstan-baseline.neon | 76 +++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 50 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e5d912b591..1a85a01c89 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -4,7 +4,7 @@ parameters: message: '#^Offset ''acme'' does not exist on array\{alias\: string, storage\: array\{engine\: string, connection\: string, config\?\: array\\}, search\: array\{engine\: string, connection\: string\}, fields_groups\: array\{default\: string, list\: array\\}, options\: array\\}\.$#' identifier: offsetAccess.notFound count: 1 - path: code_samples/_inline_php/administration/configuration/repository_configuration/ab545148cd13f7537467f6c43859d757ba15120b5df7d9933e6236336f1bf5e1.php + path: code_samples/_inline_php/administration/configuration/repository_configuration/408f0c553f7ef059d526b404da848746c08ba715b76f9cfeb3135a7680dcf558.php - message: '#^Instantiated class MyValue not found\.$#' @@ -24,17 +24,11 @@ parameters: count: 1 path: code_samples/_inline_php/commerce/transactional_emails/extend_transactional_emails/9512b966ae24a637ff0bba4d63a51f6418567d4c1245ea3d61272890838582a4.php - - - message: '#^Expression "\[\[''id'' \=\> 1, ''name'' \=\> ''Boba Fett'', ''email'' \=\> ''boba\.fett@example\.com''\], \[''id'' \=\> 2, ''name'' \=\> ''Darth Vader'', ''email'' \=\> ''darth\.vader@example\.com''\]\]" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: code_samples/_inline_php/content_management/field_types/field_type_reference/authorfield/41087640467e69b96880fd3bcacebfab85a1983d922fd05e6f2aeffdadb77897.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content\:\:\$fields is not writable\.$#' identifier: assign.propertyReadOnly count: 1 - path: code_samples/_inline_php/content_management/field_types/field_type_reference/countryfield/3cd88088ebfaab6dc8aab79fd8d9e380586a05e9a250f208935020a274d6a77f.php + path: code_samples/_inline_php/content_management/field_types/field_type_reference/countryfield/bacc5c1b898e5a27a6a344cf7175ed5500c6bc700dd298a67ff63d722df9a38b.php - message: '#^Expression "\[''JP'' \=\> \[''Name'' \=\> ''Japan'', ''Alpha2'' \=\> ''JP'', ''Alpha3'' \=\> ''JPN'', ''IDC'' \=\> 81\]\]" on a separate line does not do anything\.$#' @@ -48,12 +42,6 @@ parameters: count: 1 path: code_samples/_inline_php/content_management/field_types/field_type_reference/isbnfield/678db783359b1c65999e5fed725950d32aaab547ab82f6bda18afcafa3392e8b.php - - - message: '#^Expression "\[''StringLengthValidator'' \=\> \[''maxStringLength'' \=\> 60, ''minStringLength'' \=\> 1\]\]" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: code_samples/_inline_php/content_management/field_types/field_type_reference/textlinefield/abeeb0a02156f9dd413b5f54292d97783f49043458623888d904267ffa60acde.php - - message: '#^Expression "\[''stringLength'' \=\> \[''minStringLength'' \=\> \[''type'' \=\> ''int'', ''default'' \=\> 0\], ''maxStringLength'' \=\> \[''type'' \=\> ''int'', ''default'' \=\> \\null\]\]\]" on a separate line does not do anything\.$#' identifier: expr.resultUnused @@ -72,42 +60,6 @@ parameters: count: 1 path: code_samples/_inline_php/infrastructure_and_maintenance/cache/persistence_cache/c27a2fe1c12bba3e9271acc67ae3a2e2d4596bf58f4d9b791aec4e564ae88259.php - - - message: '#^Property App\\MyService\:\:\$contentService is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: code_samples/_inline_php/multisite/siteaccess/injecting_siteaccess/ab06aaada31a753d4da4ac9c30d6588608ca390d67846d676de254308b9981e3.php - - - - message: '#^Property App\\MyService\:\:\$siteAccessService is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: code_samples/_inline_php/multisite/siteaccess/injecting_siteaccess/ab06aaada31a753d4da4ac9c30d6588608ca390d67846d676de254308b9981e3.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: code_samples/_inline_php/search/criteria_reference/ancestor_criterion/4a5427b7ae43106059e9d543fcbf5e7b66602c10052ab6ff67750e041857c6ad.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: code_samples/_inline_php/search/criteria_reference/parentlocationid_criterion/c85766351eda977c61c12ab7d00c11cba956bde544bbdff4cad24e0bbf7717d9.php - - - - message: '#^Method App\\QueryType\\RideQueryType\:\:getSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: code_samples/_inline_php/tutorials/beginner_tutorial/5_display_a_list_of_content_items/ccb9d8424978af9df4ec24d732f91c6f7cab90b6879eecd0ea97fef21b833b3b.php - - - - message: '#^Cannot access property \$destinationContentIds on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: code_samples/_inline_php/tutorials/beginner_tutorial/7_embed_content/d8ad5ae7972b67d11cb172c321b891e268d5a346d166f73c5570d61b9b372a7d.php - - message: '#^Class App\\Form\\Type\\TextToTextOptionsType extends generic class Symfony\\Component\\Form\\AbstractType but does not specify its types\: TData$#' identifier: missingType.generics @@ -696,6 +648,30 @@ parameters: count: 1 path: code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php + - + message: '#^Access to an undefined static property App\\Command\\TestPriorityRangeAggregationCommand\:\:\$defaultName\.$#' + identifier: staticProperty.notFound + count: 1 + path: code_samples/search/custom/TestPriorityRangeAggregationCommand.php + + - + message: '#^PHPDoc tag @var for variable \$aggregationResult contains generic class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResult\\RangeAggregationResult but does not specify its types\: TValue$#' + identifier: missingType.generics + count: 2 + path: code_samples/search/custom/TestPriorityRangeAggregationCommand.php + + - + message: '#^PHPDoc tag @var for variable \$entry contains generic class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResult\\RangeAggregationResultEntry but does not specify its types\: TValue$#' + identifier: missingType.generics + count: 2 + path: code_samples/search/custom/TestPriorityRangeAggregationCommand.php + + - + message: '#^PHPDoc tag @var for variable \$key contains generic class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Aggregation\\Range but does not specify its types\: TValue$#' + identifier: missingType.generics + count: 2 + path: code_samples/search/custom/TestPriorityRangeAggregationCommand.php + - message: '#^Parameter \#1 \$criteria of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LogicalAnd constructor expects array\, array\ given\.$#' identifier: argument.type From 28ee3518284e48055a51883dafc15c971abe999e Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:58:36 +0100 Subject: [PATCH 52/66] Allow ibexa/code-style v2.3.1 (latest) --- tools/php-cs-fixer/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/php-cs-fixer/composer.json b/tools/php-cs-fixer/composer.json index 49fdb98ae6..e563c01f30 100644 --- a/tools/php-cs-fixer/composer.json +++ b/tools/php-cs-fixer/composer.json @@ -1,5 +1,5 @@ { "require-dev": { - "ibexa/code-style": "~2.0.0" + "ibexa/code-style": "~2.0" } } From ff15c6c3cede32ae134aaf880cd258a40e1cee65 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 23:00:05 +0100 Subject: [PATCH 53/66] Revert "PHP & JS CS Fixes" This reverts commit 928d179eaab4e49753442fdec465ec4f7058ea14. --- .../src/AI/Action/TranscribeAudioAction.php | 4 +--- .../src/AI/ActionType/TranscribeAudioActionType.php | 4 +--- code_samples/ai_actions/src/AI/DataType/Audio.php | 4 +--- .../src/AI/Handler/LLaVaTextToTextActionHandler.php | 5 ++--- .../AI/Handler/WhisperAudioToTextActionHandler.php | 3 ++- .../ai_actions/src/AI/REST/Value/AudioText.php | 4 +--- .../src/AI/REST/Value/TranscribeAudioAction.php | 3 +-- code_samples/ai_actions/src/Query/Search.php | 3 ++- .../src/Controller/CustomCheckoutController.php | 3 +-- .../api/notifications/notification_send.php | 9 ++++++--- .../src/Notifications/ControllerFeedback.php | 4 +--- .../src/Command/FindByTaxonomyEmbeddingCommand.php | 3 ++- .../src/Controller/CustomController.php | 4 +--- .../src/Controller/CustomFilterController.php | 4 +--- .../src/Controller/PaginationController.php | 4 +--- .../api/public_php_api/src/embedding_fields.php | 3 ++- .../api/public_php_api/src/perform_count.php | 3 ++- .../api/rest_api/src/Rest/Values/Greeting.php | 3 +-- .../src/Calendar/Holidays/EventSourceFactory.php | 4 +--- .../back_office/images/src/SvgController.php | 9 +++++---- .../back_office/images/src/SvgExtension.php | 4 +--- .../src/Controller/CustomLimitationController.php | 3 +-- code_samples/back_office/limitation/src/Kernel.php | 3 ++- .../Form/FormSubmissionServiceDecorator.php | 3 +-- .../Security/Form/FormSubmissionsTabDecorator.php | 3 ++- .../Security/Limitation/CustomLimitationType.php | 3 ++- .../Mapper/CustomLimitationFormMapper.php | 4 +--- .../src/Controller/AllContentListController.php | 3 +-- .../src/EventSubscriber/HelpMenuSubscriber.php | 3 +-- .../EventListener/ContentPublishEventListener.php | 4 +--- .../notifications/src/Notification/ListRenderer.php | 3 +-- .../notifications/src/Notification/MyRenderer.php | 3 +-- .../event/subscriber/RichTextBlockSubscriber.php | 8 +++----- .../NotificationScenarioSubscriber.php | 4 +--- .../EventSubscriber/MySuggestionEventSubscriber.php | 10 +++++----- .../search/src/Query/DateTimeAttributeQuery.php | 3 ++- .../src/Query/DateTimeAttributeRangeQuery.php | 3 ++- .../src/Query/ProductCategorySubtreeQuery.php | 3 ++- .../search/src/Query/SymbolAttributeTypeQuery.php | 3 ++- .../back_office/search/src/Query/UpdatedAtQuery.php | 3 ++- .../search/src/Query/UpdatedAtRangeQuery.php | 3 ++- .../Suggestion/ProductSuggestionNormalizer.php | 2 +- .../src/Strategy/StaticThumbnailStrategy.php | 4 +--- .../cache/http_cache/src/response_tagging.php | 11 +++++++---- .../CatalogFilter/ProductNameFilterFormMapper.php | 4 +--- .../Collaboration/Cart/CartResolverDecorator.php | 3 +-- .../Collaboration/Cart/Mapper/CartProxyMapper.php | 3 +-- .../Cart/Mapper/CartSessionDomainMapper.php | 3 +-- .../Cart/PermissionResolverDecorator.php | 3 +-- .../Cart/Persistence/Gateway/DatabaseGateway.php | 5 +++-- .../src/Controller/ShareCartCreateController.php | 6 +++--- .../src/Controller/ShareCartJoinController.php | 3 +-- .../collaboration/src/Form/Data/ShareCartData.php | 3 +-- code_samples/collaboration/src/Query/Search.php | 3 ++- .../ApplicationDetailsViewSubscriber.php | 2 +- .../EventSubscriber/VerifyStateEventSubscriber.php | 3 +-- .../src/Migrations/Action/AssignSection.php | 4 +--- .../src/Migrations/Action/AssignSectionExecutor.php | 6 +++--- .../src/Migrations/Step/ReplaceNameStepExecutor.php | 4 +--- .../discounts/src/Command/OrderPriceCommand.php | 2 +- .../CurrentUserRegistrationDateResolver.php | 3 +-- .../RecentDiscountPrioritizationStrategy.php | 4 +--- .../src/Discounts/Step/AnniversaryConditionStep.php | 3 +-- .../AnniversaryConditionStepEventSubscriber.php | 4 ++-- .../AnniversaryConditionStepEventSubscriber.php | 4 ++-- .../FormMapper/PurchasingPowerParityValueMapper.php | 2 +- code_samples/discounts/src/Query/Search.php | 3 ++- .../2dpoint_ft/src/FieldType/Point2D/Value.php | 3 +-- .../field_types/2dpoint_ft/steps/step_1/Value.php | 3 +-- .../Comparison/HelloWorldComparisonEngine.php | 4 +--- .../Comparison/HelloWorldComparisonResult.php | 4 +--- .../src/FieldType/HelloWorld/Comparison/Value.php | 2 +- .../RichtextDescriptionFieldSubmissionConverter.php | 4 +--- .../src/Controller/RelationController.php | 3 +-- .../src/Controller/BreadcrumbController.php | 3 +-- .../front/layouts/menu/src/Menu/MenuBuilder.php | 4 +--- .../front/view_matcher/src/View/Matcher/Owner.php | 13 ++++++------- .../mcp/src/Command/McpServerListCommand.php | 4 +--- .../src/Block/Attribute/MyStringAttributeMapper.php | 8 ++++---- .../src/Form/Extension/AttributeTypeExtension.php | 3 ++- .../Subscriber/BlockEmbedEventEventSubscriber.php | 7 +++---- .../src/Block/Listener/MyBlockListener.php | 3 ++- ...tAvailabilityPurchasableWithoutStockStrategy.php | 4 +--- .../PurchasableWithoutStockAvailabilityContext.php | 4 +--- .../recent_activity/src/Event/MyFeatureEvent.php | 3 +-- .../EventSubscriber/MyFeatureEventSubscriber.php | 7 +++---- ...MyFeaturePostActivityListLoadEventSubscriber.php | 4 +--- .../recent_activity/src/recent_activity_disable.php | 3 ++- code_samples/recommendations/EventData.php | 3 +-- code_samples/recommendations/EventMapper.php | 3 +-- code_samples/recommendations/EventSubscriber.php | 3 +-- .../search/content/customfield_criterion.php | 3 ++- .../content/taxonomy_no_entries_criterion.php | 3 ++- .../search/content/taxonomy_subtree_criterion.php | 3 ++- .../GroupResolver/ContentTypeGroupGroupResolver.php | 4 +--- .../Query/Aggregation/PriorityRangeAggregation.php | 4 +--- .../Elasticsearch/CameraManufacturerVisitor.php | 2 +- .../Criterion/Solr/CameraManufacturerVisitor.php | 2 +- .../WebinarEventParentNameFieldMapper.php | 5 ++--- .../search/location/isbookmarked_criterion.php | 3 ++- .../src/Controller/ProductViewController.php | 4 +--- .../CartShoppingListTransferController.php | 3 +-- code_samples/shopping_list/search/criteria.php | 3 ++- code_samples/shopping_list/search/sort_clauses.php | 3 ++- .../TranslationsManagement/MyCustomAiProvider.php | 3 +-- .../src/TranslationsManagement/MyCustomProvider.php | 3 +-- .../page_tutorial/src/Event/RandomBlockListener.php | 6 +++--- .../AuthenticationTokenCreatedSubscriber.php | 3 +-- .../src/OAuth/GoogleResourceOwnerMapper.php | 4 ++-- .../EventListener/ApprovedTransitionListener.php | 4 +--- .../src/EventListener/LegalTransitionListener.php | 3 +-- tests/ValidationBaseline.php | 3 +-- tests/bootstrap.php | 2 +- 113 files changed, 184 insertions(+), 250 deletions(-) diff --git a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php index 6ab3027e0f..3e27de2c4b 100644 --- a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php @@ -9,9 +9,7 @@ final class TranscribeAudioAction extends Action { - public function __construct(private readonly Audio $audio) - { - } + public function __construct(private readonly Audio $audio) {} public function getParameters(): array { diff --git a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php index 918736e2e3..4c132398ce 100644 --- a/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php +++ b/code_samples/ai_actions/src/AI/ActionType/TranscribeAudioActionType.php @@ -18,9 +18,7 @@ public const string IDENTIFIER = 'transcribe_audio'; /** @param iterable $actionHandlers*/ - public function __construct(private iterable $actionHandlers) - { - } + public function __construct(private iterable $actionHandlers) {} public function getIdentifier(): string { diff --git a/code_samples/ai_actions/src/AI/DataType/Audio.php b/code_samples/ai_actions/src/AI/DataType/Audio.php index bea562a1c9..5ec4ba854b 100644 --- a/code_samples/ai_actions/src/AI/DataType/Audio.php +++ b/code_samples/ai_actions/src/AI/DataType/Audio.php @@ -14,9 +14,7 @@ final class Audio implements DataType /** * @param non-empty-array $base64 */ - public function __construct(private array $base64) - { - } + public function __construct(private array $base64) {} public function getBase64(): string { diff --git a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php index b1bd6c17d8..05d8bb3532 100644 --- a/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php @@ -19,8 +19,7 @@ public function __construct( private HttpClientInterface $client, private string $host = 'http://localhost:8080' - ) { - } + ) {} public function supports(ActionInterface $action): bool { @@ -31,7 +30,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var \Ibexa\Contracts\ConnectorAi\Action\DataType\Text */ + /** @var Text */ $input = $action->getInput(); $text = $this->sanitizeInput($input->getText()); diff --git a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php index 6623f6f3bf..1d73bcdbae 100644 --- a/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php +++ b/code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php @@ -5,6 +5,7 @@ namespace App\AI\Handler; use App\AI\ActionType\TranscribeAudioActionType; +use App\AI\DataType\Audio; use Ibexa\Contracts\ConnectorAi\Action\ActionHandlerInterface; use Ibexa\Contracts\ConnectorAi\Action\DataType\Text; use Ibexa\Contracts\ConnectorAi\Action\Response\TextResponse; @@ -26,7 +27,7 @@ public function handle( ActionInterface $action, array $context = [] ): ActionResponseInterface { - /** @var \App\AI\DataType\Audio $input */ + /** @var Audio $input */ $input = $action->getInput(); $path = $this->saveInputToFile($input->getBase64()); diff --git a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php index d9f2cbc417..99c01975b4 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/AudioText.php +++ b/code_samples/ai_actions/src/AI/REST/Value/AudioText.php @@ -6,6 +6,4 @@ use Ibexa\ConnectorAi\REST\Value\RestActionResponse; -final class AudioText extends RestActionResponse -{ -} +final class AudioText extends RestActionResponse {} diff --git a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php index 6e33f288a0..ef19ccbb0d 100644 --- a/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/REST/Value/TranscribeAudioAction.php @@ -12,8 +12,7 @@ public function __construct( private Audio $input, private RuntimeContext $runtimeContext - ) { - } + ) {} public function getInput(): Audio { diff --git a/code_samples/ai_actions/src/Query/Search.php b/code_samples/ai_actions/src/Query/Search.php index 2069f83899..108968d3b7 100644 --- a/code_samples/ai_actions/src/Query/Search.php +++ b/code_samples/ai_actions/src/Query/Search.php @@ -5,6 +5,7 @@ use Ibexa\Contracts\ConnectorAi\ActionConfiguration\ActionConfigurationQuery; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\Criterion; use Ibexa\Contracts\ConnectorAi\ActionConfiguration\Query\SortClause; +use Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\AbstractSortClause; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; @@ -21,5 +22,5 @@ new SortClause\Identifier(AbstractSortClause::SORT_ASC), ] ); -/** @var \Ibexa\Contracts\ConnectorAi\ActionConfigurationServiceInterface $actionConfigurationService */ +/** @var ActionConfigurationServiceInterface $actionConfigurationService */ $results = $actionConfigurationService->findActionConfigurations($query); diff --git a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php index 6dead11eb5..4101afa7c6 100644 --- a/code_samples/api/commerce/src/Controller/CustomCheckoutController.php +++ b/code_samples/api/commerce/src/Controller/CustomCheckoutController.php @@ -14,8 +14,7 @@ class CustomCheckoutController extends Controller public function __construct( private readonly CartServiceInterface $cartService, private readonly CheckoutServiceInterface $checkoutService - ) { - } + ) {} public function showContentAction(): Response { diff --git a/code_samples/api/notifications/notification_send.php b/code_samples/api/notifications/notification_send.php index ce542c33a3..3a584bebbd 100644 --- a/code_samples/api/notifications/notification_send.php +++ b/code_samples/api/notifications/notification_send.php @@ -1,6 +1,9 @@ send( new SymfonyNotificationAdapter(new MyNotification($subject)), diff --git a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php index 0c82a0be11..7effa66575 100644 --- a/code_samples/api/notifications/src/Notifications/ControllerFeedback.php +++ b/code_samples/api/notifications/src/Notifications/ControllerFeedback.php @@ -4,6 +4,4 @@ use Symfony\Component\Notifier\Notification\Notification; -class ControllerFeedback extends Notification -{ -} +class ControllerFeedback extends Notification {} diff --git a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php index 4d0af39535..34a93889ec 100644 --- a/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php @@ -5,6 +5,7 @@ namespace App\Command; use Ibexa\Contracts\Core\Repository\SearchService; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\EmbeddingQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; @@ -53,7 +54,7 @@ protected function execute( foreach ($result->searchHits as $searchHit) { assert($searchHit instanceof SearchHit); - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ + /** @var Content $content */ $content = $searchHit->valueObject; $contentInfo = $content->versionInfo->contentInfo; diff --git a/code_samples/api/public_php_api/src/Controller/CustomController.php b/code_samples/api/public_php_api/src/Controller/CustomController.php index 1f00f31571..0b539852b0 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomController.php @@ -10,9 +10,7 @@ class CustomController extends Controller { - public function __construct(private readonly SearchService $searchService) - { - } + public function __construct(private readonly SearchService $searchService) {} public function showContentAction(int $locationId): Response { diff --git a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php index 07c057262d..cbbc14c6be 100644 --- a/code_samples/api/public_php_api/src/Controller/CustomFilterController.php +++ b/code_samples/api/public_php_api/src/Controller/CustomFilterController.php @@ -10,9 +10,7 @@ class CustomFilterController extends Controller { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} public function showChildrenAction(ContentView $view): ContentView { diff --git a/code_samples/api/public_php_api/src/Controller/PaginationController.php b/code_samples/api/public_php_api/src/Controller/PaginationController.php index 3d72169833..339adc98a0 100644 --- a/code_samples/api/public_php_api/src/Controller/PaginationController.php +++ b/code_samples/api/public_php_api/src/Controller/PaginationController.php @@ -13,9 +13,7 @@ class PaginationController extends Controller { - public function __construct(private readonly SearchService $searchService) - { - } + public function __construct(private readonly SearchService $searchService) {} public function showContentAction( Request $request, diff --git a/code_samples/api/public_php_api/src/embedding_fields.php b/code_samples/api/public_php_api/src/embedding_fields.php index 269bc7b4b0..61570a881e 100644 --- a/code_samples/api/public_php_api/src/embedding_fields.php +++ b/code_samples/api/public_php_api/src/embedding_fields.php @@ -1,8 +1,9 @@ create(); echo $embeddingField->getType(); // for example, "ibexa_dense_vector_model_123" diff --git a/code_samples/api/public_php_api/src/perform_count.php b/code_samples/api/public_php_api/src/perform_count.php index db61e36d73..0db9aae9ec 100644 --- a/code_samples/api/public_php_api/src/perform_count.php +++ b/code_samples/api/public_php_api/src/perform_count.php @@ -1,9 +1,10 @@ getExtension('ibexa'); // Add the policy provider, you can register multiple providers by calling the method repeatedly diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php index d8a445b449..1b9efd5c75 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionServiceDecorator.php @@ -20,8 +20,7 @@ public function __construct( private readonly PermissionResolver $permissionResolver, private readonly ContentService $contentService, private readonly FormSubmissionGateway $gateway, - ) { - } + ) {} public function create( ContentInfo $content, diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index 493df39e9b..1145ce3e01 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -8,6 +8,7 @@ use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\LanguageService; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Contracts\FormBuilder\FormSubmission\FormSubmissionServiceInterface; use Ibexa\FormBuilder\FieldType\FormFactory; @@ -64,7 +65,7 @@ public function renderView(array $parameters): string #[\Override] public function evaluate(array $parameters): bool { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ + /** @var Content $content */ $content = $parameters['content']; return $this->innerTab->evaluate($parameters) && diff --git a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php index 855a359d41..c2b013d1de 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/CustomLimitationType.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference; +use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\ValidationError; @@ -52,7 +53,7 @@ public function buildValue(array $limitationValues): CustomLimitationValue } /** - * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject[]|null $targets + * @param ValueObject[]|null $targets * * @return bool|null */ diff --git a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php index 3d879f9ff1..30e01f6317 100644 --- a/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php +++ b/code_samples/back_office/limitation/src/Security/Limitation/Mapper/CustomLimitationFormMapper.php @@ -29,7 +29,5 @@ public function getFormTemplate(): string return '@ibexadesign/limitation/custom_limitation_form.html.twig'; } - public function filterLimitationValues(Limitation $limitation): void - { - } + public function filterLimitationValues(Limitation $limitation): void {} } diff --git a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php index dd07d01498..0fc3d7ca49 100644 --- a/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php +++ b/code_samples/back_office/menu/menu_item/src/Controller/AllContentListController.php @@ -16,8 +16,7 @@ class AllContentListController extends Controller public function __construct( private readonly SearchService $searchService, private readonly FormFactory $formFactory - ) { - } + ) {} public function listAction(int $page = 1): Response { diff --git a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php index 7a97326ba6..01e374efef 100644 --- a/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php +++ b/code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php @@ -11,8 +11,7 @@ { public function __construct( private bool $kernelDebug - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php index c1447f80ba..8a153f58f5 100644 --- a/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php +++ b/code_samples/back_office/notifications/src/EventListener/ContentPublishEventListener.php @@ -9,9 +9,7 @@ final readonly class ContentPublishEventListener implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) - { - } + public function __construct(private NotificationService $notificationService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/notifications/src/Notification/ListRenderer.php b/code_samples/back_office/notifications/src/Notification/ListRenderer.php index 5156265cee..dfd097be61 100644 --- a/code_samples/back_office/notifications/src/Notification/ListRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/ListRenderer.php @@ -17,8 +17,7 @@ public function __construct( protected Environment $twig, protected RouterInterface $router, protected RequestStack $requestStack - ) { - } + ) {} public function render(Notification $notification): string { diff --git a/code_samples/back_office/notifications/src/Notification/MyRenderer.php b/code_samples/back_office/notifications/src/Notification/MyRenderer.php index 0c2d38ccd4..5abe1a38e8 100644 --- a/code_samples/back_office/notifications/src/Notification/MyRenderer.php +++ b/code_samples/back_office/notifications/src/Notification/MyRenderer.php @@ -15,8 +15,7 @@ class MyRenderer implements NotificationRenderer, TypedNotificationRendererInter public function __construct( protected Environment $twig, protected RouterInterface $router - ) { - } + ) {} public function render(Notification $notification): string { diff --git a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php index 924e92ea45..6f052c3a60 100644 --- a/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php +++ b/code_samples/back_office/online_editor/src/event/subscriber/RichTextBlockSubscriber.php @@ -13,11 +13,9 @@ class RichTextBlockSubscriber implements EventSubscriberInterface { /** - * @param \Ibexa\FieldTypeRichText\RichText\DOMDocumentFactory $domDocumentFactory + * @param DOMDocumentFactory $domDocumentFactory */ - public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) - { - } + public function __construct(private readonly DOMDocumentFactory $domDocumentFactory) {} /** * {@inheritdoc} @@ -30,7 +28,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent $event + * @param PreRenderEvent $event */ public function onBlockPreRender(PreRenderEvent $event): void { diff --git a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php index 78ae51c261..edeb298b81 100644 --- a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php +++ b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php @@ -13,9 +13,7 @@ final readonly class NotificationScenarioSubscriber implements EventSubscriberInterface { - public function __construct(private NotificationService $notificationService) - { - } + public function __construct(private NotificationService $notificationService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php index 05fe585da8..22c68d56cc 100644 --- a/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php +++ b/code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php @@ -7,6 +7,8 @@ use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion; use Ibexa\Contracts\Search\Event\BuildSuggestionCollectionEvent; +use Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion; +use Ibexa\ProductCatalog\Local\Repository\Values\Product; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -15,9 +17,7 @@ class MySuggestionEventSubscriber implements EventSubscriberInterface, LoggerAwa { use LoggerAwareTrait; - public function __construct(private ProductServiceInterface $productService) - { - } + public function __construct(private ProductServiceInterface $productService) {} public static function getSubscribedEvents(): array { @@ -46,13 +46,13 @@ public function onBuildSuggestionCollectionEvent(BuildSuggestionCollectionEvent if ($searchResult->getTotalCount()) { $maxScore = 0.0; $suggestionsByContentIds = []; - /** @var \Ibexa\Contracts\Search\Model\Suggestion\ContentSuggestion $suggestion */ + /** @var ContentSuggestion $suggestion */ foreach ($suggestionCollection as $suggestion) { $maxScore = max($suggestion->getScore(), $maxScore); $suggestionsByContentIds[$suggestion->getContent()->id] = $suggestion; } - /** @var \Ibexa\ProductCatalog\Local\Repository\Values\Product $product */ + /** @var Product $product */ foreach ($searchResult as $product) { $contentId = $product->getContent()->id; if (array_key_exists($contentId, $suggestionsByContentIds)) { diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php index adde49a43e..89ffb7d420 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeQuery.php @@ -2,6 +2,7 @@ use DateTimeImmutable; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; +use Ibexa\Contracts\ProductCatalog\ProductServiceInterface; use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery; use Ibexa\Contracts\ProductCatalogDateTimeAttribute\Search\Criterion\DateTimeAttribute; @@ -9,5 +10,5 @@ $filter = new DateTimeAttribute('event_date', new DateTimeImmutable('2025-07-06')); $filter->setOperator(FieldValueCriterion::COMPARISON_EQ); $query->setFilter($filter); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php index f8016aa377..c91b9863b6 100644 --- a/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php +++ b/code_samples/back_office/search/src/Query/DateTimeAttributeRangeQuery.php @@ -1,10 +1,11 @@ setFilter(new DateTimeAttributeRange('event_date', new DateTimeImmutable('2025-01-01'))); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php index d050f96bed..a4dad8ae90 100644 --- a/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php +++ b/code_samples/back_office/search/src/Query/ProductCategorySubtreeQuery.php @@ -1,12 +1,13 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php index 2c449d97b8..046d20f568 100644 --- a/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php +++ b/code_samples/back_office/search/src/Query/SymbolAttributeTypeQuery.php @@ -1,9 +1,10 @@ setFilter(new SymbolAttribute('ean', ['5023920187205'])); -/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */ +/** @var ProductServiceInterface $productService */ $results = $productService->findProducts($query); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php index e30aeecc40..fdf241ebf1 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtQuery.php @@ -1,6 +1,7 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php index 49c5461ecb..dc8435f80b 100644 --- a/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php +++ b/code_samples/back_office/search/src/Query/UpdatedAtRangeQuery.php @@ -1,6 +1,7 @@ setQuery($criteria); $results = $productService->findProducts($productQuery); diff --git a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php index 4653b75476..7dd644361e 100644 --- a/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php +++ b/code_samples/back_office/search/src/Search/Serializer/Normalizer/Suggestion/ProductSuggestionNormalizer.php @@ -21,7 +21,7 @@ public function normalize( ?string $format = null, array $context = [] ): array { - /** @var \App\Search\Model\Suggestion\ProductSuggestion $object */ + /** @var ProductSuggestion $object */ return [ 'type' => 'product', 'name' => $object->getName(), diff --git a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php index d129da2432..70beaca623 100644 --- a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php +++ b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php @@ -11,9 +11,7 @@ final readonly class StaticThumbnailStrategy implements ThumbnailStrategy { - public function __construct(private string $staticThumbnail) - { - } + public function __construct(private string $staticThumbnail) {} public function getThumbnail( ContentType $contentType, diff --git a/code_samples/cache/http_cache/src/response_tagging.php b/code_samples/cache/http_cache/src/response_tagging.php index c25931aefd..b4c8ae877c 100644 --- a/code_samples/cache/http_cache/src/response_tagging.php +++ b/code_samples/cache/http_cache/src/response_tagging.php @@ -1,13 +1,16 @@ tag($view); // When working with a view -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ +/** @var Content $content */ $responseTagger->tag($content->getContentInfo()); // When working with a content item -/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ +/** @var Location $location */ $responseTagger->tag($location); // When working with a location diff --git a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php index 21c36d85b0..51d10d4b0e 100644 --- a/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php +++ b/code_samples/catalog/custom_catalog_filter/src/CatalogFilter/ProductNameFilterFormMapper.php @@ -11,9 +11,7 @@ final class ProductNameFilterFormMapper implements FilterFormMapperInterface { - public function __construct() - { - } + public function __construct() {} public function createFilterForm( FilterDefinitionInterface $filterDefinition, diff --git a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php index 39d377f04c..e5edf08092 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/CartResolverDecorator.php @@ -16,8 +16,7 @@ public function __construct( private CartResolverInterface $innerCartResolver, private SessionServiceInterface $sessionService, private RequestStack $requestStack - ) { - } + ) {} public function resolveCart(?User $user = null): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php index 8e719eba26..dd8e7000c8 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartProxyMapper.php @@ -14,8 +14,7 @@ public function __construct( private Repository $repository, private CartServiceInterface $cartService, private ProxyGeneratorInterface $proxyGenerator - ) { - } + ) {} public function createCartProxy(string $identifier): CartInterface { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php index 8f8a51ddb1..ab1dea1603 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Mapper/CartSessionDomainMapper.php @@ -20,8 +20,7 @@ public function __construct( private CartProxyMapperInterface $cartProxyMapper, private UserProxyDomainMapperInterface $userDomainMapper, private ParticipantCollectionDomainMapperInterface $participantCollectionDomainMapper - ) { - } + ) {} /** * @param \App\Collaboration\Cart\Persistence\Values\CartSession $data diff --git a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php index 575bfc840b..37528daa7f 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php +++ b/code_samples/collaboration/src/Collaboration/Cart/PermissionResolverDecorator.php @@ -22,8 +22,7 @@ public function __construct( private readonly PermissionResolverInterface $innerPermissionResolver, private readonly SessionServiceInterface $sessionService, private readonly RequestStack $requestStack, - ) { - } + ) {} public function canUser(PolicyInterface $policy): bool { diff --git a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php index 98a6c8ff23..e9019391d8 100644 --- a/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php +++ b/code_samples/collaboration/src/Collaboration/Cart/Persistence/Gateway/DatabaseGateway.php @@ -2,6 +2,7 @@ namespace App\Collaboration\Cart\Persistence\Gateway; +use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct as CreateStruct; use App\Collaboration\Cart\Persistence\Values\CartSessionUpdateStruct as UpdateStruct; use Doctrine\DBAL\Types\Types; @@ -51,7 +52,7 @@ public function getDiscriminator(): string } /** - * @param \App\Collaboration\Cart\Persistence\Values\CartSessionCreateStruct $createStruct + * @param CartSessionCreateStruct $createStruct */ public function create( int $sessionId, @@ -64,7 +65,7 @@ public function create( } /** - * @param \Ibexa\Collaboration\Persistence\Values\AbstractSessionUpdateStruct $updateStruct + * @param AbstractSessionUpdateStruct $updateStruct */ public function update(AbstractSessionUpdateStruct $updateStruct): void { diff --git a/code_samples/collaboration/src/Controller/ShareCartCreateController.php b/code_samples/collaboration/src/Controller/ShareCartCreateController.php index b0b612eba4..85f4939e49 100644 --- a/code_samples/collaboration/src/Controller/ShareCartCreateController.php +++ b/code_samples/collaboration/src/Controller/ShareCartCreateController.php @@ -4,6 +4,7 @@ use App\Collaboration\Cart\CartSessionCreateStruct; use App\Collaboration\Cart\CartSessionType; +use App\Form\Data\ShareCartData; use App\Form\Type\ShareCartType; use Ibexa\Contracts\Cart\CartResolverInterface; use Ibexa\Contracts\Collaboration\Participant\ExternalParticipantCreateStruct; @@ -22,8 +23,7 @@ final class ShareCartCreateController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, private readonly CartResolverInterface $cartResolver - ) { - } + ) {} public function __invoke(Request $request): Response { @@ -37,7 +37,7 @@ public function __invoke(Request $request): Response $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - /** @var \App\Form\Data\ShareCartData $data */ + /** @var ShareCartData $data */ $data = $form->getData(); // Handle the form submission diff --git a/code_samples/collaboration/src/Controller/ShareCartJoinController.php b/code_samples/collaboration/src/Controller/ShareCartJoinController.php index 79601e9f05..1580b27deb 100644 --- a/code_samples/collaboration/src/Controller/ShareCartJoinController.php +++ b/code_samples/collaboration/src/Controller/ShareCartJoinController.php @@ -18,8 +18,7 @@ final class ShareCartJoinController extends AbstractController public function __construct( private readonly SessionServiceInterface $sessionService, - ) { - } + ) {} public function __invoke( Request $request, diff --git a/code_samples/collaboration/src/Form/Data/ShareCartData.php b/code_samples/collaboration/src/Form/Data/ShareCartData.php index 37c2e0cc2c..38391c76e4 100644 --- a/code_samples/collaboration/src/Form/Data/ShareCartData.php +++ b/code_samples/collaboration/src/Form/Data/ShareCartData.php @@ -6,8 +6,7 @@ final class ShareCartData { public function __construct( private ?string $email = null - ) { - } + ) {} public function getEmail(): ?string { diff --git a/code_samples/collaboration/src/Query/Search.php b/code_samples/collaboration/src/Query/Search.php index b4f7dfbabc..8592b7430b 100644 --- a/code_samples/collaboration/src/Query/Search.php +++ b/code_samples/collaboration/src/Query/Search.php @@ -3,6 +3,7 @@ use Ibexa\Contracts\Collaboration\Session\Query\Criterion; use Ibexa\Contracts\Collaboration\Session\Query\SortClause; use Ibexa\Contracts\Collaboration\Session\SessionQuery; +use Ibexa\Contracts\Collaboration\SessionServiceInterface; use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; use Ibexa\Contracts\CoreSearch\Values\Query\SortClause\FieldValueSortClause; @@ -17,5 +18,5 @@ new SortClause\CreatedAt(FieldValueSortClause::SORT_DESC), ] ); -/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */ +/** @var SessionServiceInterface $sessionService */ $sessionList = $sessionService->findSessions($query); diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php index a3aa625019..9412f88b68 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/ApplicationDetailsViewSubscriber.php @@ -21,7 +21,7 @@ public function __construct( } /** - * @param \Ibexa\CorporateAccount\View\ApplicationDetailsView $view + * @param ApplicationDetailsView $view */ protected function configureView(View $view): void { diff --git a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php index 54a85470e1..ff4a2d7243 100644 --- a/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php +++ b/code_samples/customer_portal/src/Corporate/EventSubscriber/VerifyStateEventSubscriber.php @@ -23,8 +23,7 @@ public function __construct( private FormFactoryInterface $formFactory, private HandlerInterface $applicationStateHandler, private TranslatableNotificationHandlerInterface $notificationHandler - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSection.php b/code_samples/data_migration/src/Migrations/Action/AssignSection.php index 876c51491a..d809fced4e 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSection.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSection.php @@ -10,9 +10,7 @@ { public const string TYPE = 'assign_section'; - public function __construct(private string $sectionIdentifier) - { - } + public function __construct(private string $sectionIdentifier) {} /** * @return string diff --git a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php index 85f5ca40f3..1dcb4e7a1e 100644 --- a/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php +++ b/code_samples/data_migration/src/Migrations/Action/AssignSectionExecutor.php @@ -4,6 +4,7 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\SectionService; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\ValueObject as APIValueObject; use Ibexa\Migration\StepExecutor\ActionExecutor\ExecutorInterface; use Ibexa\Migration\ValueObject; @@ -13,12 +14,11 @@ public function __construct( private ContentService $contentService, private SectionService $sectionService - ) { - } + ) {} /** * @param AssignSection $action - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content + * @param Content $content */ public function handle( ValueObject\Step\Action $action, diff --git a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php index 394e3dfd01..6d42605ca4 100644 --- a/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php +++ b/code_samples/data_migration/src/Migrations/Step/ReplaceNameStepExecutor.php @@ -12,9 +12,7 @@ final class ReplaceNameStepExecutor extends AbstractStepExecutor { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} protected function doHandle(StepInterface $step) { diff --git a/code_samples/discounts/src/Command/OrderPriceCommand.php b/code_samples/discounts/src/Command/OrderPriceCommand.php index a5cd9d544f..56c96a64df 100644 --- a/code_samples/discounts/src/Command/OrderPriceCommand.php +++ b/code_samples/discounts/src/Command/OrderPriceCommand.php @@ -62,7 +62,7 @@ public function execute( $output->writeln(sprintf('Discounted price: %s', $this->formatPrice($resolvedPrice->getMoney()))); if ($resolvedPrice instanceof PriceEnvelopeInterface) { - /** @var \Ibexa\Discounts\Value\Price\Stamp\DiscountStamp $discountStamp */ + /** @var DiscountStamp $discountStamp */ foreach ($resolvedPrice->all(DiscountStamp::class) as $discountStamp) { $output->writeln( sprintf( diff --git a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php index a232085345..cddfb2767e 100644 --- a/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php +++ b/code_samples/discounts/src/Discounts/ExpressionProvider/CurrentUserRegistrationDateResolver.php @@ -12,8 +12,7 @@ public function __construct( private PermissionResolver $permissionResolver, private UserService $userService - ) { - } + ) {} /** * @return array{current_user_registration_date: \DateTimeInterface} diff --git a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php index 7805cfab00..392f75d6f6 100644 --- a/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php +++ b/code_samples/discounts/src/Discounts/RecentDiscountPrioritizationStrategy.php @@ -7,9 +7,7 @@ final readonly class RecentDiscountPrioritizationStrategy implements DiscountPrioritizationStrategyInterface { - public function __construct(private DiscountPrioritizationStrategyInterface $inner) - { - } + public function __construct(private DiscountPrioritizationStrategyInterface $inner) {} public function getOrder(): array { diff --git a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php index 3c40c44fdf..558f14bf90 100644 --- a/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php +++ b/code_samples/discounts/src/Discounts/Step/AnniversaryConditionStep.php @@ -11,6 +11,5 @@ final class AnniversaryConditionStep extends AbstractDiscountStep public function __construct( public bool $enabled = false, public int $tolerance = 0 - ) { - } + ) {} } diff --git a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php index 8765383d45..9a4913093f 100644 --- a/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step1/AnniversaryConditionStepEventSubscriber.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event + * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -30,7 +30,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ + /** @var IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php index 8f60118ad1..0b71977079 100644 --- a/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php +++ b/code_samples/discounts/src/Discounts/Step/Step2/AnniversaryConditionStepEventSubscriber.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array } /** - * @param \Ibexa\Contracts\Discounts\Event\CreateFormDataEvent|\Ibexa\Contracts\Discounts\Event\MapDiscountToFormDataEvent $event + * @param CreateFormDataEvent|MapDiscountToFormDataEvent $event */ public function addAnniversaryConditionStep(Event $event): void { @@ -35,7 +35,7 @@ public function addAnniversaryConditionStep(Event $event): void return; } - /** @var \App\Discounts\Condition\IsAccountAnniversary $discount */ + /** @var IsAccountAnniversary $discount */ $discount = $event instanceof MapDiscountToFormDataEvent ? $event->getDiscount()->getConditionByIdentifier(IsAccountAnniversary::IDENTIFIER) : null; diff --git a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php index e25d813e2d..d2c460bc1b 100644 --- a/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php +++ b/code_samples/discounts/src/Form/FormMapper/PurchasingPowerParityValueMapper.php @@ -50,7 +50,7 @@ public function mapUpdateDataToStruct( } /** - * @param \Ibexa\Contracts\Discounts\Value\Struct\DiscountCreateStruct|\Ibexa\Contracts\Discounts\Value\Struct\DiscountUpdateStruct $struct + * @param DiscountCreateStruct|DiscountUpdateStruct $struct */ private function addRuleToStruct( DiscountValueInterface $data, diff --git a/code_samples/discounts/src/Query/Search.php b/code_samples/discounts/src/Query/Search.php index 9a6af40415..2f0a0f4d49 100644 --- a/code_samples/discounts/src/Query/Search.php +++ b/code_samples/discounts/src/Query/Search.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; +use Ibexa\Contracts\Discounts\DiscountServiceInterface; use Ibexa\Contracts\Discounts\Value\Query\Criterion; use Ibexa\Contracts\Discounts\Value\Query\DiscountQuery; use Ibexa\Contracts\Discounts\Value\Query\SortClause; @@ -25,5 +26,5 @@ ] ); -/** @var \Ibexa\Contracts\Discounts\DiscountServiceInterface $discountService */ +/** @var DiscountServiceInterface $discountService */ $results = $discountService->findDiscounts($query); diff --git a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php index 894181613d..985549c9d2 100644 --- a/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php +++ b/code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php @@ -13,8 +13,7 @@ public function __construct( private ?float $x = null, #[Assert\NotBlank] private ?float $y = null - ) { - } + ) {} public function getX(): ?float { diff --git a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php index 7b5b193696..cbe2011bd9 100644 --- a/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php +++ b/code_samples/field_types/2dpoint_ft/steps/step_1/Value.php @@ -10,8 +10,7 @@ final class Value implements ValueInterface public function __construct( private ?float $x = null, private ?float $y = null - ) { - } + ) {} public function getX(): ?float { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php index 4cdb90f8fa..9569b98b2e 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonEngine.php @@ -11,9 +11,7 @@ final readonly class HelloWorldComparisonEngine implements FieldTypeComparisonEngine { - public function __construct(private StringComparisonEngine $stringValueComparisonEngine) - { - } + public function __construct(private StringComparisonEngine $stringValueComparisonEngine) {} /** * @param Value $comparisonDataA diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php index 4e6548d4d2..a97569385a 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/HelloWorldComparisonResult.php @@ -9,9 +9,7 @@ final readonly class HelloWorldComparisonResult implements ComparisonResult { - public function __construct(private StringComparisonResult $stringDiff) - { - } + public function __construct(private StringComparisonResult $stringDiff) {} public function getHelloWorldDiff(): StringComparisonResult { diff --git a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php index 54df3906f9..85b5b85c6b 100644 --- a/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php +++ b/code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Comparison/Value.php @@ -9,6 +9,6 @@ class Value extends FieldTypeComparisonValue { - /** @var \Ibexa\VersionComparison\ComparisonValue\StringComparisonValue */ + /** @var StringComparisonValue */ public StringComparisonValue $name; } diff --git a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php index 30981233db..afd3c1ce24 100644 --- a/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php +++ b/code_samples/forms/custom_form_attribute/src/FormBuilder/FormSubmission/Converter/RichtextDescriptionFieldSubmissionConverter.php @@ -4,6 +4,4 @@ use Ibexa\FormBuilder\FormSubmission\Converter\BooleanFieldSubmissionConverter; -class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter -{ -} +class RichtextDescriptionFieldSubmissionConverter extends BooleanFieldSubmissionConverter {} diff --git a/code_samples/front/embed_content/src/Controller/RelationController.php b/code_samples/front/embed_content/src/Controller/RelationController.php index 5af6bf03b6..e30e63e33d 100644 --- a/code_samples/front/embed_content/src/Controller/RelationController.php +++ b/code_samples/front/embed_content/src/Controller/RelationController.php @@ -13,8 +13,7 @@ class RelationController public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService - ) { - } + ) {} public function showContentAction( View $view, diff --git a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php index b82a4feeed..cdc28a5ba2 100644 --- a/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php +++ b/code_samples/front/layouts/breadcrumbs/src/Controller/BreadcrumbController.php @@ -14,8 +14,7 @@ class BreadcrumbController extends Controller public function __construct( private readonly LocationService $locationService, private readonly SearchService $searchService - ) { - } + ) {} public function showBreadcrumbsAction($locationId): Response { diff --git a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php index 9266372cf2..f320e4cb22 100644 --- a/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php +++ b/code_samples/front/layouts/menu/src/Menu/MenuBuilder.php @@ -7,9 +7,7 @@ class MenuBuilder { - public function __construct(private readonly FactoryInterface $factory) - { - } + public function __construct(private readonly FactoryInterface $factory) {} public function buildMenu(): ItemInterface { diff --git a/code_samples/front/view_matcher/src/View/Matcher/Owner.php b/code_samples/front/view_matcher/src/View/Matcher/Owner.php index 9c21e12141..d441783063 100644 --- a/code_samples/front/view_matcher/src/View/Matcher/Owner.php +++ b/code_samples/front/view_matcher/src/View/Matcher/Owner.php @@ -2,6 +2,7 @@ namespace App\View\Matcher; +use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -16,12 +17,10 @@ class Owner implements MatcherInterface /** @var string[] */ private array $matchingUserLogins; - public function __construct(private readonly UserService $userService) - { - } + public function __construct(private readonly UserService $userService) {} /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function matchLocation(Location $location): bool { @@ -29,7 +28,7 @@ public function matchLocation(Location $location): bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function matchContentInfo(ContentInfo $contentInfo): bool { @@ -37,7 +36,7 @@ public function matchContentInfo(ContentInfo $contentInfo): bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ public function match(View $view): ?bool { @@ -53,7 +52,7 @@ public function match(View $view): ?bool } /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws NotFoundException */ private function hasOwner(ContentInfo $contentInfo): bool { diff --git a/code_samples/mcp/src/Command/McpServerListCommand.php b/code_samples/mcp/src/Command/McpServerListCommand.php index ad21b3f104..12ccbb909e 100644 --- a/code_samples/mcp/src/Command/McpServerListCommand.php +++ b/code_samples/mcp/src/Command/McpServerListCommand.php @@ -10,9 +10,7 @@ #[AsCommand(name: 'app:mcp:server_list', description: 'List MCP servers')] class McpServerListCommand { - public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) - { - } + public function __construct(private readonly McpServerConfigurationRegistryInterface $configRegistry) {} public function __invoke(SymfonyStyle $io): int { diff --git a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php index f5158b7d1c..f3641d6a65 100644 --- a/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php +++ b/code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeMapper.php @@ -10,12 +10,12 @@ class MyStringAttributeMapper implements AttributeFormTypeMapperInterface { /** - * @param \Symfony\Component\Form\FormBuilderInterface $formBuilder - * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockDefinition $blockDefinition - * @param \Ibexa\Contracts\FieldTypePage\FieldType\Page\Block\Definition\BlockAttributeDefinition $blockAttributeDefinition + * @param FormBuilderInterface $formBuilder + * @param BlockDefinition $blockDefinition + * @param BlockAttributeDefinition $blockAttributeDefinition * @param array $constraints * - * @return \Symfony\Component\Form\FormBuilderInterface + * @return FormBuilderInterface * * @throws \Exception */ diff --git a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php index 33c2e4e853..779bcc8a74 100644 --- a/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php +++ b/code_samples/page/custom_block_validator/src/Form/Extension/AttributeTypeExtension.php @@ -1,5 +1,6 @@ getConstraints()['custom_not_blank'])) { diff --git a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php index 408be0db42..6b06810792 100644 --- a/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php +++ b/code_samples/page/custom_page_block/src/Event/Subscriber/BlockEmbedEventEventSubscriber.php @@ -5,13 +5,12 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class BlockEmbedEventEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ContentService $contentService) - { - } + public function __construct(private readonly ContentService $contentService) {} public static function getSubscribedEvents(): array { @@ -22,7 +21,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); $parameters['event_content'] = $this->contentService->loadContent($parameters['event']); diff --git a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php index 00f0884efb..914b498f0f 100644 --- a/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php +++ b/code_samples/page/page_listener/src/Block/Listener/MyBlockListener.php @@ -4,6 +4,7 @@ use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyBlockListener implements EventSubscriberInterface @@ -17,7 +18,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $event->getRenderRequest()->getParameters(); diff --git a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php index 0c28ad889d..c28aa7ddc7 100644 --- a/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php +++ b/code_samples/pim/availability/src/ProductAvailabilityPurchasableWithoutStockStrategy.php @@ -11,9 +11,7 @@ final readonly class ProductAvailabilityPurchasableWithoutStockStrategy implements ProductAvailabilityStrategyInterface { - public function __construct(private HandlerInterface $handler) - { - } + public function __construct(private HandlerInterface $handler) {} public function accept(AvailabilityContextInterface $context): bool { diff --git a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php index e8e8e547f6..0e4c6f1101 100644 --- a/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php +++ b/code_samples/pim/availability/src/PurchasableWithoutStockAvailabilityContext.php @@ -4,6 +4,4 @@ use Ibexa\Contracts\ProductCatalog\Values\Availability\AvailabilityContextInterface; -final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface -{ -} +final class PurchasableWithoutStockAvailabilityContext implements AvailabilityContextInterface {} diff --git a/code_samples/recent_activity/src/Event/MyFeatureEvent.php b/code_samples/recent_activity/src/Event/MyFeatureEvent.php index 84b46ba6c1..51b7ba50e1 100644 --- a/code_samples/recent_activity/src/Event/MyFeatureEvent.php +++ b/code_samples/recent_activity/src/Event/MyFeatureEvent.php @@ -9,8 +9,7 @@ class MyFeatureEvent extends Event public function __construct( private readonly object $object, private readonly string $action - ) { - } + ) {} public function getObject(): object { diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php index 812875614c..4ba4a98456 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php @@ -3,14 +3,13 @@ namespace App\EventSubscriber; use App\Event\MyFeatureEvent; +use App\MyFeature\MyFeature; use Ibexa\Contracts\ActivityLog\ActivityLogServiceInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyFeatureEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly ActivityLogServiceInterface $activityLogService) - { - } + public function __construct(private readonly ActivityLogServiceInterface $activityLogService) {} public static function getSubscribedEvents(): array { @@ -21,7 +20,7 @@ public static function getSubscribedEvents(): array public function onMyFeatureEvent(MyFeatureEvent $event): void { - /** @var \App\MyFeature\MyFeature $object */ + /** @var MyFeature $object */ $object = $event->getObject(); $className = $object::class; $id = (string)$object->id; diff --git a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php index 2133b67029..354928100c 100644 --- a/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php +++ b/code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php @@ -11,9 +11,7 @@ class MyFeaturePostActivityListLoadEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly MyFeatureService $myFeatureService) - { - } + public function __construct(private readonly MyFeatureService $myFeatureService) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/recent_activity/src/recent_activity_disable.php b/code_samples/recent_activity/src/recent_activity_disable.php index ba153acadf..0482bb0160 100644 --- a/code_samples/recent_activity/src/recent_activity_disable.php +++ b/code_samples/recent_activity/src/recent_activity_disable.php @@ -1,6 +1,7 @@ disable(); // Perform operations that should not be logged to the activity log diff --git a/code_samples/recommendations/EventData.php b/code_samples/recommendations/EventData.php index 4825ed6114..78a20b405a 100644 --- a/code_samples/recommendations/EventData.php +++ b/code_samples/recommendations/EventData.php @@ -10,8 +10,7 @@ class EventData { public function __construct( private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public function dispatchVisitEvent(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventMapper.php b/code_samples/recommendations/EventMapper.php index cf0bd3bd8e..f8b924a91f 100644 --- a/code_samples/recommendations/EventMapper.php +++ b/code_samples/recommendations/EventMapper.php @@ -13,8 +13,7 @@ class EventMapper public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public function trackProductView(ProductInterface $product): void { diff --git a/code_samples/recommendations/EventSubscriber.php b/code_samples/recommendations/EventSubscriber.php index 175784efc4..1be6a3fa84 100644 --- a/code_samples/recommendations/EventSubscriber.php +++ b/code_samples/recommendations/EventSubscriber.php @@ -14,8 +14,7 @@ class EventSubscriber implements EventSubscriberInterface public function __construct( private readonly EventMapperInterface $eventMapper, private readonly ServerSideTrackingDispatcherInterface $trackingDispatcher, - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/search/content/customfield_criterion.php b/code_samples/search/content/customfield_criterion.php index a9a52400de..f675f94e42 100644 --- a/code_samples/search/content/customfield_criterion.php +++ b/code_samples/search/content/customfield_criterion.php @@ -1,5 +1,6 @@ query = new Query\Criterion\CustomField('content_name_s', Operator::EQ, '/Ibexa.*/'); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_no_entries_criterion.php b/code_samples/search/content/taxonomy_no_entries_criterion.php index 048006d41c..2055b506ec 100644 --- a/code_samples/search/content/taxonomy_no_entries_criterion.php +++ b/code_samples/search/content/taxonomy_no_entries_criterion.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -15,5 +16,5 @@ ] ); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/content/taxonomy_subtree_criterion.php b/code_samples/search/content/taxonomy_subtree_criterion.php index c13f94ed70..fc4e59ff9d 100644 --- a/code_samples/search/content/taxonomy_subtree_criterion.php +++ b/code_samples/search/content/taxonomy_subtree_criterion.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -15,5 +16,5 @@ ] ); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findContent($query); diff --git a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php index a707b331c5..31f0257cef 100644 --- a/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php +++ b/code_samples/search/custom/src/GroupResolver/ContentTypeGroupGroupResolver.php @@ -10,9 +10,7 @@ final readonly class ContentTypeGroupGroupResolver implements GroupResolverInterface { - public function __construct(private Handler $contentTypeHandler) - { - } + public function __construct(private Handler $contentTypeHandler) {} public function resolveDocumentGroup(BaseDocument $document): string { diff --git a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php index 2952020fcd..7089067cb1 100644 --- a/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php +++ b/code_samples/search/custom/src/Query/Aggregation/PriorityRangeAggregation.php @@ -12,6 +12,4 @@ * * @phpstan-extends \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\AbstractRangeAggregation */ -final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation -{ -} +final class PriorityRangeAggregation extends AbstractRangeAggregation implements LocationAggregation {} diff --git a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php index d74655dd23..58f2c79eca 100644 --- a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php @@ -19,7 +19,7 @@ public function supports( } /** - * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion + * @param CameraManufacturerCriterion $criterion */ public function visit( CriterionVisitor $dispatcher, diff --git a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php index 434b6ee313..1a4622ebd4 100644 --- a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php @@ -16,7 +16,7 @@ public function canVisit(CriterionInterface $criterion): bool } /** - * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion + * @param CameraManufacturerCriterion $criterion */ public function visit( CriterionInterface $criterion, diff --git a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php index f2fe9173bf..6c894f539b 100644 --- a/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php +++ b/code_samples/search/custom/src/Search/FieldMapper/WebinarEventParentNameFieldMapper.php @@ -14,8 +14,7 @@ class WebinarEventParentNameFieldMapper extends ContentFieldMapper public function __construct( protected ContentHandler $contentHandler, protected LocationHandler $locationHandler - ) { - } + ) {} public function accept(Content $content): bool { @@ -24,7 +23,7 @@ public function accept(Content $content): bool } /** - * @return \Ibexa\Contracts\Core\Search\Field[] + * @return Field[] */ public function mapFields(Content $content): array { diff --git a/code_samples/search/location/isbookmarked_criterion.php b/code_samples/search/location/isbookmarked_criterion.php index c61bf951b1..c7a67f7316 100644 --- a/code_samples/search/location/isbookmarked_criterion.php +++ b/code_samples/search/location/isbookmarked_criterion.php @@ -1,9 +1,10 @@ filter = new IsBookmarked(); -/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */ +/** @var SearchService $searchService */ $results = $searchService->findLocations($query); diff --git a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php index a0988ff216..0e5fdfb877 100644 --- a/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php +++ b/code_samples/shopping_list/add_to_shopping_list/src/Controller/ProductViewController.php @@ -13,9 +13,7 @@ class ProductViewController extends AbstractController { - public function __construct(private readonly LocalProductServiceInterface $productService) - { - } + public function __construct(private readonly LocalProductServiceInterface $productService) {} public function viewAction( Request $request, diff --git a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php index c6a9721824..01758aa43d 100644 --- a/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php +++ b/code_samples/shopping_list/php_api/src/Controller/CartShoppingListTransferController.php @@ -31,8 +31,7 @@ public function __construct( private readonly ShoppingListServiceInterface $shoppingListService, private readonly CartShoppingListTransferServiceInterface $cartShoppingListTransferService, private readonly LocalProductServiceInterface $productService - ) { - } + ) {} #[Route( path: '/app-shopping-list-cart', diff --git a/code_samples/shopping_list/search/criteria.php b/code_samples/shopping_list/search/criteria.php index 18c0ae2429..054c916e00 100644 --- a/code_samples/shopping_list/search/criteria.php +++ b/code_samples/shopping_list/search/criteria.php @@ -1,9 +1,10 @@ getCurrentUserReference()), diff --git a/code_samples/shopping_list/search/sort_clauses.php b/code_samples/shopping_list/search/sort_clauses.php index 4927957c09..8530a64aa4 100644 --- a/code_samples/shopping_list/search/sort_clauses.php +++ b/code_samples/shopping_list/search/sort_clauses.php @@ -1,10 +1,11 @@ findShoppingLists( new ShoppingListQuery( null, diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php index b1a2c4bf12..33353fa67b 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomAiProvider.php @@ -16,8 +16,7 @@ public function __construct( private MyApiClient $apiClient, private string $actionConfigurationIdentifier, - ) { - } + ) {} public function getIdentifier(): string { diff --git a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php index e726d3435f..204b93e79b 100644 --- a/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php +++ b/code_samples/translations_management/src/TranslationsManagement/MyCustomProvider.php @@ -15,8 +15,7 @@ */ public function __construct( private MyApiClient $apiClient, - ) { - } + ) {} public function getIdentifier(): string { diff --git a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php index 04d20d6b93..580273da51 100644 --- a/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php +++ b/code_samples/tutorials/page_tutorial/src/Event/RandomBlockListener.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents; use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent; +use Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class RandomBlockListener implements EventSubscriberInterface @@ -20,8 +21,7 @@ public function __construct( private readonly ContentService $contentService, private readonly LocationService $locationService, private readonly SearchService $searchService - ) { - } + ) {} public static function getSubscribedEvents(): array { @@ -33,7 +33,7 @@ public static function getSubscribedEvents(): array public function onBlockPreRender(PreRenderEvent $event): void { $blockValue = $event->getBlockValue(); - /** @var \Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Twig\TwigRenderRequest $renderRequest */ + /** @var TwigRenderRequest $renderRequest */ $renderRequest = $event->getRenderRequest(); $parameters = $renderRequest->getParameters(); diff --git a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php index 4f351028c5..9a24a9f89e 100644 --- a/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php +++ b/code_samples/user_management/in_memory/src/EventSubscriber/AuthenticationTokenCreatedSubscriber.php @@ -16,8 +16,7 @@ public function __construct( private readonly ConfigResolverInterface $configResolver, private readonly UserService $userService, private readonly array $userMap = [], - ) { - } + ) {} public static function getSubscribedEvents(): array { diff --git a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php index cbd1d14a74..b82f2c29ce 100644 --- a/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php +++ b/code_samples/user_management/oauth_google/src/OAuth/GoogleResourceOwnerMapper.php @@ -31,7 +31,7 @@ public function __construct( } /** - * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner + * @param GoogleUser $resourceOwner */ protected function loadUser( ResourceOwnerInterface $resourceOwner, @@ -41,7 +41,7 @@ protected function loadUser( } /** - * @param \League\OAuth2\Client\Provider\GoogleUser $resourceOwner + * @param GoogleUser $resourceOwner */ protected function createUser( ResourceOwnerInterface $resourceOwner, diff --git a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php index 1e6d72e701..d113b372c2 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/ApprovedTransitionListener.php @@ -10,9 +10,7 @@ class ApprovedTransitionListener extends AbstractTransitionWorkflowActionListener { - public function __construct(private readonly NotificationInterface $notificationHandler) - { - } + public function __construct(private readonly NotificationInterface $notificationHandler) {} public function getIdentifier(): string { diff --git a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php index 9534a666a9..8bf9453e9d 100644 --- a/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php +++ b/code_samples/workflow/custom_workflow/src/EventListener/LegalTransitionListener.php @@ -14,8 +14,7 @@ class LegalTransitionListener extends AbstractTransitionWorkflowActionListener public function __construct( private readonly NotificationInterface $notificationHandler, protected WorkflowRegistryInterface $workflowRegistry - ) { - } + ) {} public function getIdentifier(): string { diff --git a/tests/ValidationBaseline.php b/tests/ValidationBaseline.php index 99ce772226..53422e93e0 100644 --- a/tests/ValidationBaseline.php +++ b/tests/ValidationBaseline.php @@ -28,8 +28,7 @@ final class ValidationBaseline public function __construct( private readonly string $baselineFile, private readonly string $repoRoot, - ) { - } + ) {} public function isInBaseline( string $relativePath, diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9374e6f3a2..00cd6610cc 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,7 +8,7 @@ use Composer\Autoload\ClassLoader; -/** @var \Composer\Autoload\ClassLoader $loader */ +/** @var ClassLoader $loader */ $loader = require __DIR__ . '/../vendor/autoload.php'; /** From 19dd26e26be350f24e31c702bc71f8ef36c8d1fe Mon Sep 17 00:00:00 2001 From: adriendupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:06:08 +0000 Subject: [PATCH 54/66] PHP & JS CS Fixes --- .../src/Security/Form/FormSubmissionsTabDecorator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php index 1145ce3e01..9ec4fc389c 100644 --- a/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php +++ b/code_samples/back_office/limitation/src/Security/Form/FormSubmissionsTabDecorator.php @@ -75,6 +75,6 @@ public function evaluate(array $parameters): bool #[\Override] public function getOrder(): int { - return $this->innerTab->getOrder(); + return $this->innerTab->getOrder(); } } From 76253890a3e0d24dccaaa9aa92ff52c1ae565f14 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 23:11:08 +0100 Subject: [PATCH 55/66] update hl_lines --- docs/ai/ai_actions/extend_ai_actions.md | 10 +++++----- docs/api/notification_channels.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/ai/ai_actions/extend_ai_actions.md b/docs/ai/ai_actions/extend_ai_actions.md index 69913215e4..18f205153d 100644 --- a/docs/ai/ai_actions/extend_ai_actions.md +++ b/docs/ai/ai_actions/extend_ai_actions.md @@ -43,7 +43,7 @@ You can influence the execution of an Action with two events: Below you can find the full example of a Symfony Command, together with a matching service definition. The command finds the images modified in the last 24 hours, and adds the alternative text to them if it's missing. -``` php hl_lines="72 85-110" +``` php hl_lines="75 88-115" [[= include_code('code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php') =]] ``` @@ -116,7 +116,7 @@ Create a class implementing the [ActionHandlerInterface](/api/php_api/php_api_re See the code sample below, together with a matching service definition: -``` php hl_lines="17 25-28 30-65 67-70" +``` php hl_lines="17 24-27 29-66 68-71" [[= include_code('code_samples/ai_actions/src/AI/Handler/LLaVaTextToTextActionHandler.php') =]] ``` @@ -136,7 +136,7 @@ The built-in Action Types use service tags to find Action Handlers capable of ha Form configuration makes the Handler configurable by using the back office. The example handler uses the `system_prompt` option, which becomes part of the Action Configuration UI thanks to the following code: -``` php hl_lines="16-20" +``` php hl_lines="18-22" [[= include_code('code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php') =]] ``` @@ -216,7 +216,7 @@ The `TranscribeAudio` Action Type requires adding two data classes that exist in Custom Form Type is needed if the Action Type requires additional options configurable in the UI. The following example adds a checkbox field that indicates to the Action Handler whether the transcription should include the timestamps. -``` php hl_lines="16-20" +``` php hl_lines="18-22" [[= include_code('code_samples/ai_actions/src/Form/Type/TranscribeAudioOptionsType.php') =]] ``` @@ -232,7 +232,7 @@ An example Action Handler combines the input data and the Action Type options an The language of the transcribed data is extracted from the Runtime Context for better results. The Action Type options provided in the Action Context dictate whether the timestamps will be removed before returning the result. -``` php hl_lines="34-37 52-55" +``` php hl_lines="37-40 55-58" [[= include_code('code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php') =]] ``` diff --git a/docs/api/notification_channels.md b/docs/api/notification_channels.md index dca42abde4..af4582732b 100644 --- a/docs/api/notification_channels.md +++ b/docs/api/notification_channels.md @@ -226,7 +226,7 @@ The [`…\Service\NotificationServiceInterface::send()`](/api/php_api/php_api_re For example, to send a notification, you often use a combination like the following: -``` php hl_lines="13-16" +``` php hl_lines="16-18" [[= include_code('code_samples/api/notifications/notification_send.php', 2) =]] ``` From 6c2bbe4d21115a0bc2d023573525abe846e128b6 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 23:40:46 +0100 Subject: [PATCH 56/66] update include_code --- docs/ai/ai_actions/extend_ai_actions.md | 6 +-- docs/commerce/cart/cart_api.md | 51 ++++++++++++++----------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/docs/ai/ai_actions/extend_ai_actions.md b/docs/ai/ai_actions/extend_ai_actions.md index 18f205153d..90ffc1aec7 100644 --- a/docs/ai/ai_actions/extend_ai_actions.md +++ b/docs/ai/ai_actions/extend_ai_actions.md @@ -14,7 +14,7 @@ For example, you can create a handler that connects to a translation model and u You can execute AI Actions by using the [ActionServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-ActionServiceInterface.html) service, as in the following example: ``` php -[[= include_code('code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php', 87, 105, remove_indent=True) =]] +[[= include_code('code_samples/ai_actions/src/Command/AddMissingAltTextCommand.php', 92, 110, remove_indent=True) =]] ``` The `GenerateAltTextAction` is a built-in action that implements the [ActionInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-ActionInterface.html), takes an [Image](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-Action-DataType-Image.html) as an input, and generates the alternative text in the response. @@ -77,7 +77,7 @@ See [Action Configuration Search Criteria reference](action_configuration_criter The following example creates a new Action Configuration: ``` php hl_lines="3 17" -[[= include_code('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 47, 63, remove_indent=True) =]] +[[= include_code('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 49, 65, remove_indent=True) =]] ``` Actions Configurations are tied to a specific Action Type and are translatable. @@ -88,7 +88,7 @@ Reuse existing Action Configurations to simplify the execution of AI Actions. You can pass one directly to the `ActionServiceInterface::execute()` method: ``` php hl_lines="7-8" -[[= include_code('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 65, 72, remove_indent=True) =]] +[[= include_code('code_samples/ai_actions/src/Command/ActionConfigurationCreateCommand.php', 67, 74, remove_indent=True) =]] ``` The passed Action Configuration is only taken into account if the Action Context was not passed to the Action directly using the [ActionInterface::setActionContext()](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ConnectorAi-ActionInterface.html#method_hasActionContext) method. diff --git a/docs/commerce/cart/cart_api.md b/docs/commerce/cart/cart_api.md index d466b6c9dd..5ea27b5897 100644 --- a/docs/commerce/cart/cart_api.md +++ b/docs/commerce/cart/cart_api.md @@ -23,7 +23,7 @@ From the developer's perspective, carts and entries are referenced with a UUID i To access a single cart, use the `CartServiceInterface::getCart` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 64, 66, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 68, remove_indent=True) =]] ``` ## Get multiple carts @@ -32,10 +32,10 @@ To fetch multiple carts, use the `CartServiceInterface::findCarts` method. It follows the same search Query pattern as other APIs: ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 10, 11) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 11, 11) =]] // ... -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 49, 57) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 52, 59) =]] ``` ## Create cart @@ -43,10 +43,10 @@ It follows the same search Query pattern as other APIs: To create a cart, use the `CartServiceInterface::createCart` method and provide it with `Ibexa\Contracts\Cart\Value\CartCreateStruct` that contains metadata (name, currency, owner): ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 8, 9) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 9, 9) =]] // ... -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 70, 78) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 73, 80) =]] ``` ## Update cart metadata @@ -56,10 +56,10 @@ You could do it to support a scenario when, for example, the user changes a curr To update cart metadata, use the `CartServiceInterface::updateCartMetadata` method: ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 9, 10) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 10, 10) =]] // ... -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 82, 89) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 85, 91) =]] ``` You can also use this method to change cart ownership: @@ -88,8 +88,8 @@ $cart = $cartService->updateCartMetadata($cart, $updateMetadataStruct); To delete a cart permanently, use the `CartServiceInterface::deleteCart` method and pass the `CartInterface` object: ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 63, 64) =]] -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 124, 125) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 127, 127) =]] ``` ## Empty cart @@ -97,8 +97,8 @@ To delete a cart permanently, use the `CartServiceInterface::deleteCart` method To remove all products from the cart in a single operation, use the `CartServiceInterface::emptyCart` method: ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 63, 64) =]] -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 91, 92) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 94, 94) =]] ``` ## Check cart validity @@ -109,8 +109,9 @@ To validate the cart, use the `CartServiceInterface::validateCart` method. Validation is done with help from the `symfony/validator` component, and the method returns a `Symfony\Component\Validator\ConstraintViolationListInterface` object. ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 63, 64) =]] -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 94, 95) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] + +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 97, 97) =]] ``` ## Add entry to cart @@ -119,11 +120,13 @@ To add entries (products) to the cart, create an `Ibexa\Contracts\Cart\Value\Ent Then pass it to the `CartServiceInterface::addEntry` method: ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 11, 12) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 12, 12) =]] + // ... -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 63, 64) =]] -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 99, 106) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] + +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 102, 108) =]] ``` ## Remove entry from cart @@ -131,8 +134,9 @@ Then pass it to the `CartServiceInterface::addEntry` method: To remove an entry from the cart, use the `CartServiceInterface::removeEntry` method. ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 63, 64) =]] -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 109, 112) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] + +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 112, 114) =]] ``` ## Update entry metadata @@ -141,12 +145,15 @@ Entries have their own metadata, for example, quantity. To change entry metadata, use the `CartServiceInterface::updateEntry` method and provide it with `Ibexa\Contracts\Cart\Value\EntryUpdateStruct`. ``` php -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 12, 13) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 13, 13) =]] + // ... -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 63, 64) =]] -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 109, 110) =]] -[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 114, 122) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] + +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 112, 112) =]] + +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 116, 124) =]] ``` ## Adding context data From 3f8fea2073787f28f70c757450a9cf54c7e59d9b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 23:46:40 +0100 Subject: [PATCH 57/66] update include_code --- docs/commerce/cart/cart_api.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/commerce/cart/cart_api.md b/docs/commerce/cart/cart_api.md index 5ea27b5897..95d43c5116 100644 --- a/docs/commerce/cart/cart_api.md +++ b/docs/commerce/cart/cart_api.md @@ -33,6 +33,7 @@ It follows the same search Query pattern as other APIs: ``` php [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 11, 11) =]] + // ... [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 52, 59) =]] @@ -44,6 +45,7 @@ To create a cart, use the `CartServiceInterface::createCart` method and provide ``` php [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 9, 9) =]] + // ... [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 73, 80) =]] @@ -57,6 +59,7 @@ To update cart metadata, use the `CartServiceInterface::updateCartMetadata` meth ``` php [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 10, 10) =]] + // ... [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 85, 91) =]] @@ -89,6 +92,7 @@ To delete a cart permanently, use the `CartServiceInterface::deleteCart` method ``` php [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] + [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 127, 127) =]] ``` @@ -98,6 +102,7 @@ To remove all products from the cart in a single operation, use the `CartService ``` php [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 66, 66) =]] + [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 94, 94) =]] ``` @@ -153,7 +158,7 @@ To change entry metadata, use the `CartServiceInterface::updateEntry` method and [[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 112, 112) =]] -[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 116, 124) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 117, 124) =]] ``` ## Adding context data @@ -220,5 +225,5 @@ To combine the contents of multiple shopping carts into a target cart, use the ` This operation is helpful when you want to consolidate items from a reorder cart and a current cart into a single order. ``` php -[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 127, 139, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/CartCommand.php', 129, 141, remove_indent=True) =]] ``` From 252bf0c76361ea8871b4b00f361b216bee18b5e3 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 18 Nov 2026 23:52:39 +0100 Subject: [PATCH 58/66] update include_code --- .../commerce/order_management/order_management_api.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/commerce/order_management/order_management_api.md b/docs/commerce/order_management/order_management_api.md index 2dd2863c61..71ca99a221 100644 --- a/docs/commerce/order_management/order_management_api.md +++ b/docs/commerce/order_management/order_management_api.md @@ -31,7 +31,7 @@ See the [Discounts API](discounts_api.md#retrieve-applied-discounts) to learn ho To access a single order by using its numerical ID, use the [`OrderServiceInterface::getOrder`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_getOrder) method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 54, 57, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 56, 59, remove_indent=True) =]] ``` ## Get multiple orders @@ -40,10 +40,11 @@ To fetch multiple orders, use the [`OrderServiceInterface::findOrders`](/api/php It follows the same search query pattern as other APIs: ``` php -[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 8, 9) =]][[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 10, 14) =]] +[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 9, 9) =]] +[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 11, 14) =]] // ... -[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 106, 115) =]] +[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 109, 117) =]] ``` ## Create order @@ -51,7 +52,7 @@ It follows the same search query pattern as other APIs: To create an order, use the [`OrderServiceInterface::createOrder`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_createOrder) method and provide it with the [`Ibexa\Contracts\OrderManagement\Value\Struct\OrderCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-Value-Struct-OrderCreateStruct.html) object that contains a list of products, purchased quantities, product, total prices, and tax amounts. ``` php -[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 88, 98, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 90, 100, remove_indent=True) =]] ``` ## Update order @@ -61,5 +62,5 @@ You could do it to support a scenario when, for example, the order is processed To update order information, use the [`OrderServiceInterface::updateOrder`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_updateOrder) method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 101, 104, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 103, 106, remove_indent=True) =]] ``` From 23855a2bb572b00a900716e028345727b192d641 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:00:39 +0100 Subject: [PATCH 59/66] update include_code --- .../order_management/order_management_api.md | 1 + docs/commerce/payment/extend_payment.md | 4 ++-- docs/commerce/payment/payment_api.md | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/commerce/order_management/order_management_api.md b/docs/commerce/order_management/order_management_api.md index 71ca99a221..a08493b5fe 100644 --- a/docs/commerce/order_management/order_management_api.md +++ b/docs/commerce/order_management/order_management_api.md @@ -44,6 +44,7 @@ It follows the same search query pattern as other APIs: [[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 11, 14) =]] // ... + [[= include_code('code_samples/api/commerce/src/Command/OrderCommand.php', 109, 117) =]] ``` diff --git a/docs/commerce/payment/extend_payment.md b/docs/commerce/payment/extend_payment.md index 0b3eacf71a..551029fee6 100644 --- a/docs/commerce/payment/extend_payment.md +++ b/docs/commerce/payment/extend_payment.md @@ -94,11 +94,11 @@ When you create a payment, you can attach custom data to it, for example, you ca You add custom data by using the `setContext` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 78, 89, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 80, 91, remove_indent=True) =]] ``` Then, you retrieve it with the `getContext` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 51, 54, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 53, 56, remove_indent=True) =]] ``` diff --git a/docs/commerce/payment/payment_api.md b/docs/commerce/payment/payment_api.md index a0e4a8d6e4..2c7f84693d 100644 --- a/docs/commerce/payment/payment_api.md +++ b/docs/commerce/payment/payment_api.md @@ -17,7 +17,7 @@ You can change that by providing a custom payment identifier in `Ibexa\Contracts To access a single payment by using its numerical ID, use the `PaymentServiceInterface::getPayment` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 45, 48, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 47, 50, remove_indent=True) =]] ``` ### Get single payment by identifier @@ -25,7 +25,7 @@ To access a single payment by using its numerical ID, use the `PaymentServiceInt To access a single payment by using its string identifier, use the `PaymentServiceInterface::getPaymentByIdentifier` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 51, 52, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 53, 54, remove_indent=True) =]] ``` ## Get multiple payments @@ -34,7 +34,7 @@ To fetch multiple payments, use the `PaymentServiceInterface::findPayments` meth It follows the same search query pattern as other APIs: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 60, 75, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 62, 77, remove_indent=True) =]] ``` ## Create payment @@ -42,7 +42,7 @@ It follows the same search query pattern as other APIs: To create a payment, use the `PaymentServiceInterface::createPayment` method and provide it with the `Ibexa\Contracts\Payment\Payment\PaymentCreateStruct` object that takes the following arguments: `method`, `order` and `amount`. ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 78, 91, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 80, 93, remove_indent=True) =]] ``` ## Update payment @@ -53,7 +53,7 @@ The `Ibexa\Contracts\Payment\Payment\PaymentUpdateStruct` object takes the follo To update payment information, use the `PaymentServiceInterface::updatePayment` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 94, 99, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 96, 101, remove_indent=True) =]] ``` ## Delete payment @@ -61,5 +61,5 @@ To update payment information, use the `PaymentServiceInterface::updatePayment` To delete a payment from the system, use the `PaymentServiceInterface::deletePayment` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 102, 102, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentCommand.php', 104, 104, remove_indent=True) =]] ``` From 1a712a3b659137985bb00970a737ad631a51619a Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:15:10 +0100 Subject: [PATCH 60/66] update include_code --- docs/commerce/payment/payment_method_api.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/commerce/payment/payment_method_api.md b/docs/commerce/payment/payment_method_api.md index 998dcd2090..47d68e6669 100644 --- a/docs/commerce/payment/payment_method_api.md +++ b/docs/commerce/payment/payment_method_api.md @@ -26,7 +26,7 @@ From the developer's perspective, payment methods are referenced with identifier To access a single payment method by using its string identifier, use the `PaymentMethodService::getPaymentMethodByIdentifier` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 47, 50, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 49, 52, remove_indent=True) =]] ``` ### Get single payment method by ID @@ -34,7 +34,7 @@ To access a single payment method by using its string identifier, use the `Payme To access a single payment method by using its numerical ID, use the `PaymentMethodService::getPaymentMethod` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 41, 44, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 43, 46, remove_indent=True) =]] ``` ## Get multiple payment methods @@ -44,7 +44,7 @@ To fetch multiple payment methods, use the `PaymentMethodService::findPaymentMet It follows the same search query pattern as other APIs: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 53, 69, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 55, 71, remove_indent=True) =]] ``` ## Create payment method @@ -59,7 +59,8 @@ To create a payment method, use the `PaymentMethodService::createPaymentMethod` - `options` object. ``` php -[[= include_file('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 52, 53) =]][[= include_file('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 71, 81) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 55, 55) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 74, 83) =]] ``` ## Update payment method @@ -70,7 +71,7 @@ An `Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodUpdateStruct` object can To update payment method information, use the `PaymentMethodServiceInterface::updatePaymentMethod` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 84, 93, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 86, 95, remove_indent=True) =]] ``` ## Delete payment method @@ -78,7 +79,7 @@ To update payment method information, use the `PaymentMethodServiceInterface::up To delete a payment method from the system, use the `PaymentMethodService::deletePayment` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 96, 101, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 98, 103, remove_indent=True) =]] ``` ## Check whether payment method is used @@ -86,5 +87,5 @@ To delete a payment method from the system, use the `PaymentMethodService::delet To check whether a payment method is used, for example, before you delete it, use the `PaymentMethodService::isPaymentMethodUsed` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 104, 116, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 106, 118, remove_indent=True) =]] ``` From dcbc6445bef4545fb6b3d10e9d416c158aa342c4 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:17:53 +0100 Subject: [PATCH 61/66] update include_code --- docs/commerce/shipping_management/shipment_api.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/commerce/shipping_management/shipment_api.md b/docs/commerce/shipping_management/shipment_api.md index 2ea3f1b38d..960f9ec649 100644 --- a/docs/commerce/shipping_management/shipment_api.md +++ b/docs/commerce/shipping_management/shipment_api.md @@ -16,7 +16,7 @@ From the developer's perspective, shipments are referenced with a UUID identifie To access a single shipment by using its string identifier, use the `ShipmentService::getShipmentByIdentifier` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 58, 66, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 60, 68, remove_indent=True) =]] ``` ### Get single shipment by id @@ -24,7 +24,7 @@ To access a single shipment by using its string identifier, use the `ShipmentSer To access a single shipment by using its numerical id, use the `ShipmentService::getShipment` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 46, 55, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 48, 57, remove_indent=True) =]] ``` ## Get multiple shipments @@ -33,7 +33,7 @@ To fetch multiple shipments, use the `ShipmentService::findShipments` method. It follows the same search query pattern as other APIs: ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 69, 87, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 71, 89, remove_indent=True) =]] ``` ## Create shipment @@ -41,7 +41,7 @@ It follows the same search query pattern as other APIs: To create a shipment, use the `ShipmentService::createShipment` method and provide it with an `Ibexa\Contracts\Shipping\Value\ShipmentCreateStruct` object that takes two parameters, a `shippingMethod` string and a `Money` object. ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 90, 103, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 92, 105, remove_indent=True) =]] ``` ## Update shipment @@ -51,7 +51,7 @@ You could do it to support a scenario when, for example, the shipment is process To update shipment information, use the `ShipmentService::updateShipment` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 106, 116, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 108, 118, remove_indent=True) =]] ``` ## Delete shipment @@ -59,5 +59,5 @@ To update shipment information, use the `ShipmentService::updateShipment` method To delete a shipment from the system, use the `ShipmentService::deleteShipment` method: ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 119, 119, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShipmentCommand.php', 121, 121, remove_indent=True) =]] ``` From 7b090102c7bab649a07a9e5952164da634cf79b5 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:20:56 +0100 Subject: [PATCH 62/66] update include_code --- .../shipping_management/shipping_method_api.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/commerce/shipping_management/shipping_method_api.md b/docs/commerce/shipping_management/shipping_method_api.md index 07ffb64da0..fa39b0ea82 100644 --- a/docs/commerce/shipping_management/shipping_method_api.md +++ b/docs/commerce/shipping_management/shipping_method_api.md @@ -17,7 +17,7 @@ To access a shipping method by using its identifier, use the `ShippingMethodServ The method takes a string as `$identifier` parameter and uses a prioritized language from SiteAccess settings unless you pass another language as `forcedLanguage`. ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 53, 62, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 55, 64, remove_indent=True) =]] ``` ### Get shipping method by ID @@ -26,7 +26,7 @@ To access a shipping method by using its ID, use the `ShippingMethodServiceInter The method takes a string as `$id` parameter and uses a prioritized language from SiteAccess settings unless you pass another language as `forcedLanguage`. ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 41, 50, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 43, 52, remove_indent=True) =]] ``` ## Get multiple shipping methods @@ -35,7 +35,7 @@ To fetch multiple shipping methods, use the `ShippingMethodServiceInterface::get It follows the same search query pattern as other APIs: ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 65, 82, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 67, 84, remove_indent=True) =]] ``` ## Create shipping method @@ -43,7 +43,7 @@ It follows the same search query pattern as other APIs: To create a shipping method, use the `ShippingMethodServiceInterface::createShippingMethod` method and provide it with the `Ibexa\Contracts\Shipping\Value\ShippingMethodCreateStruct` object that you created by using the `newShippingMethodCreateStruct` method. ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 85, 107, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 87, 109, remove_indent=True) =]] ``` ## Update shipping method @@ -51,7 +51,7 @@ To create a shipping method, use the `ShippingMethodServiceInterface::createShip To update a shipping method, use the `ShippingMethodServiceInterface::updateShippingMethod` method and provide it with the `Ibexa\Contracts\Shipping\Value\ShippingMethodUpdateStruct` object that you created by using the `newShippingMethodUpdateStruct` method. ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 110, 123, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 112, 125, remove_indent=True) =]] ``` ## Delete shipping method @@ -59,7 +59,7 @@ To update a shipping method, use the `ShippingMethodServiceInterface::updateShip To update a shipping method, use the `ShippingMethodServiceInterface::deleteShippingMethod` method. ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 126, 131, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 128, 133, remove_indent=True) =]] ``` ## Delete shipping method translation @@ -67,5 +67,5 @@ To update a shipping method, use the `ShippingMethodServiceInterface::deleteShip To delete shipping method translation, use the `ShippingMethodServiceInterface::deleteShippingMethodTranslation` method. ``` php -[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 134, 142, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 136, 144, remove_indent=True) =]] ``` From a41304b1bb2d236ecefb8f62b0c80131d91b351c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:23:47 +0100 Subject: [PATCH 63/66] update include_code --- docs/commerce/checkout/checkout_api.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/commerce/checkout/checkout_api.md b/docs/commerce/checkout/checkout_api.md index cfcdb2655c..c9cdc2c95c 100644 --- a/docs/commerce/checkout/checkout_api.md +++ b/docs/commerce/checkout/checkout_api.md @@ -22,7 +22,7 @@ From the developer's perspective, checkouts are referenced with an UUID identifi To access a single checkout, use the `CheckoutServiceInterface::getCheckout` method: ``` php -[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 29, 29, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 28, 28, remove_indent=True) =]] ``` ## Get single checkout for specific cart @@ -31,7 +31,7 @@ To fetch checkout for a cart that already exists, use the `CheckoutServiceInterf You can use it when you want to initiate the checkout process right after products are successfully added to a cart. ``` php -[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 23, 26, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 22, 25, remove_indent=True) =]] ``` ## Create checkout @@ -39,7 +39,7 @@ You can use it when you want to initiate the checkout process right after produc To create a checkout, use the `CheckoutServiceInterface::createCheckout` method and provide it with a `CheckoutCreateStruct` struct that contains a `CartInterface` object. ``` php -[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 32, 37, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 31, 36, remove_indent=True) =]] ``` ## Update checkout @@ -53,7 +53,7 @@ To update the checkout, use the `CheckoutServiceInterface::updateCheckout` metho All data is placed in session storage. ``` php -[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 40, 41, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 39, 40, remove_indent=True) =]] ``` ## Delete checkout @@ -61,5 +61,5 @@ All data is placed in session storage. To delete a checkout from the session, use the `CheckoutServiceInterface::deleteCheckout` method: ``` php -[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 44, 44, remove_indent=True) =]] +[[= include_code('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 43, 43, remove_indent=True) =]] ``` From 136751de6d116ae89f432e6db5e35e25de006e87 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:27:48 +0100 Subject: [PATCH 64/66] update include_code --- docs/api/graphql/graphql_custom_ft.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/graphql/graphql_custom_ft.md b/docs/api/graphql/graphql_custom_ft.md index 59b4018fbd..0124edd7ee 100644 --- a/docs/api/graphql/graphql_custom_ft.md +++ b/docs/api/graphql/graphql_custom_ft.md @@ -60,8 +60,8 @@ It requires that you implement the `getFieldTypeIdentifier` method to tell which Add `MyFieldDefinitionMapper.php` mapper to `src/GraphQL/Schema`: ``` php -[[= include_code('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 1, 17) =]] -[[= include_code('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 38, 39) =]] +[[= include_code('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 1, 16) =]] +} ``` The `FieldDefinitionMapper` interface defines following methods: @@ -76,7 +76,7 @@ When a mapper method is decorated, you need to call the decorated service method To do that, you need to replace `mapXXX` by the method it's in: ``` php -[[= include_code('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 21, 24, remove_indent=True) =]] +[[= include_code('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 23, 25, remove_indent=True) =]] ``` It's required for every implemented method, so that other mappers are called for the other field types. From d8468b1698c3961a91e539798bc19a6a270b3108 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:29:37 +0100 Subject: [PATCH 65/66] update include_code --- .../data_migration/data_migration_api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content_management/data_migration/data_migration_api.md b/docs/content_management/data_migration/data_migration_api.md index f2020917d5..4786c79cfa 100644 --- a/docs/content_management/data_migration/data_migration_api.md +++ b/docs/content_management/data_migration/data_migration_api.md @@ -11,13 +11,13 @@ You can use the PHP API to manage and run [data migrations](data_migration.md). To list all migration files available in the directory defined in configuration (by default, `src/Migrations/Ibexa`), use the `MigrationService:listMigrations()` method: ``` php -[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 32, 34, remove_indent=True) =]] +[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 34, 36, remove_indent=True) =]] ``` To get a single migration file by its name, use the `MigrationService:findOneByName()` method: ``` php -[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 37, 37, remove_indent=True) =]] +[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 39, 39, remove_indent=True) =]] ``` ## Running migration files @@ -25,7 +25,7 @@ To get a single migration file by its name, use the `MigrationService:findOneByN To run migration file(s), use either `MigrationService:executeOne()` or `MigrationService:executeAll()`: ``` php -[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 39, 40, remove_indent=True) =]] +[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 41, 42, remove_indent=True) =]] ``` Both `executeOne()` and `executeAll()` can take an optional parameter: the login of the User that you want to execute the migrations as. @@ -35,5 +35,5 @@ Both `executeOne()` and `executeAll()` can take an optional parameter: the login To add a new migration file, use the `MigrationService:add()` method: ``` php -[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 25, 30, remove_indent=True) =]] +[[= include_code('code_samples/api/migration/src/Command/MigrationCommand.php', 27, 32, remove_indent=True) =]] ``` From 0baf76bd8aa56e69f5d6c512f5189a65d8a97668 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 19 Nov 2026 10:42:34 +0100 Subject: [PATCH 66/66] .php-cs-fixer-inline.php: rm phpdoc_force_fqcn_fixer --- .php-cs-fixer-inline.php | 1 - 1 file changed, 1 deletion(-) diff --git a/.php-cs-fixer-inline.php b/.php-cs-fixer-inline.php index a22d4f25a1..bc7228c4dd 100644 --- a/.php-cs-fixer-inline.php +++ b/.php-cs-fixer-inline.php @@ -17,7 +17,6 @@ $configFactory->withRules(array_merge($commonRules, [ 'psr_autoloading' => false, - //'AdamWojs/phpdoc_force_fqcn_fixer' => false, ])); return $configFactory