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 85b9dce847..dc2562caf7 100644 --- a/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php +++ b/code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php @@ -11,7 +11,7 @@ class Greeting extends ValueObjectVisitor /** * @param \App\Rest\Values\Greeting $data */ - public function visit(Visitor $visitor, Generator $generator, $data) + public function visit(Visitor $visitor, Generator $generator, $data): void { $visitor->setHeader('Content-Type', $generator->getMediaType('Greeting')); $generator->startObjectElement('Greeting'); diff --git a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php index 76cd57d9d4..a9e7b350b7 100644 --- a/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php +++ b/code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php @@ -15,7 +15,7 @@ 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/docs/administration/back_office/back_office_menus/back_office_menus.md b/docs/administration/back_office/back_office_menus/back_office_menus.md index b034ae674f..a6fc33cc44 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 @@ -15,6 +15,7 @@ Menus are extensible using event subscribers, for example: ``` php [[= include_file('code_samples/back_office/menu/menu_item/src/EventSubscriber/MyMenuSubscriber.php', 0, 29) =]] +[[= include_file('code_samples/back_office/menu/menu_item/src/EventSubscriber/MyMenuSubscriber.php', 48, 50) =]] ``` !!! tip diff --git a/docs/administration/back_office/back_office_tabs/back_office_tabs.md b/docs/administration/back_office/back_office_tabs/back_office_tabs.md index 997fc98526..2730df0795 100644 --- a/docs/administration/back_office/back_office_tabs/back_office_tabs.md +++ b/docs/administration/back_office/back_office_tabs/back_office_tabs.md @@ -14,17 +14,18 @@ You can extend existing tab groups with new tabs, or create your own tab groups. A custom tab can extend one of the following classes: -- `Ibexa\Contracts\AdminUi\Tab\AbstractTab` - base tab. -- `Ibexa\Contracts\AdminUi\Tab\AbstractControllerBasedTab` - embeds the results of a controller action in the tab. -- `Ibexa\Contracts\AdminUi\Tab\AbstractRouteBasedTab` - embeds the results of the selected route, passing applicable parameters. +- [`AbstractTab`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-AdminUi-Tab-AbstractTab.html) - base tab +- [`AbstractControllerBasedTab`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-AdminUi-Tab-AbstractControllerBasedTab.html) - embeds the results of a controller action in the tab +- [`AbstractRouteBasedTab`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-AdminUi-Tab-AbstractRouteBasedTab.html) - embeds the results of the selected route, passing applicable parameters ``` php //... -[[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 16, 17) =]] +[[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 16, 18) =]] //... -[[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 34, 43) =]][[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 49, 51) =]] +[[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 27, 31) =]] +[[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 42, 44) =]] //... -[[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 70, 73) =]] +[[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php', 63, 68) =]] ``` !!! tip diff --git a/docs/administration/back_office/customize_calendar.md b/docs/administration/back_office/customize_calendar.md index d8b1680842..5e56e0a7cd 100644 --- a/docs/administration/back_office/customize_calendar.md +++ b/docs/administration/back_office/customize_calendar.md @@ -69,7 +69,9 @@ One such built-in implementation is `InMemoryEventSource`. To add an in-memory collection as an event source, create `src/Calendar/Holidays/EventSourceFactory.php`: ```php -[[= include_file('code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php', 0, 23) =]][[= include_file('code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php', 29, 40) =]] +[[= include_file('code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php', 0, 20) =]] +[[= include_file('code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php', 26, 36) =]] + ``` !!! note @@ -107,7 +109,7 @@ To do this, place the following `holidays.json` file in `src/Calendar/Holidays`: Next, import this file in `src/Calendar/Holidays/EventSourceFactory.php`: ``` php hl_lines="6-9" -[[= include_file('code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php', 19, 33) =]] +[[= include_file('code_samples/back_office/calendar/src/Calendar/Holidays/EventSourceFactory.php', 16, 30) =]] ``` The calendar now displays the events listed in the JSON file. diff --git a/docs/administration/recent_activity/recent_activity.md b/docs/administration/recent_activity/recent_activity.md index 1591b9daa2..e6fed7c114 100644 --- a/docs/administration/recent_activity/recent_activity.md +++ b/docs/administration/recent_activity/recent_activity.md @@ -82,7 +82,7 @@ See [Activity Log Search Criteria reference](activity_log_criteria.md) and [Acti In the following example, log groups that contain at least one creation of a Content item are displayed in terminal, with a maximum of 10 groups within the last hour. It uses the default `admin` user that has a [permission](#permission-and-security) to list everyone's entries. -```php hl_lines="39-43" +```php hl_lines="34-38" [[= include_file('code_samples/recent_activity/src/Command/MonitorRecentContentCreationCommand.php') =]] ``` @@ -190,7 +190,7 @@ In the following example, several actions are logged into one context group, eve - `complete` ``` php -[[= include_file('code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php', 62, 82) =]] +[[= include_file('code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php', 46, 66) =]] ``` Context groups can't be nested. diff --git a/docs/api/php_api/php_api.md b/docs/api/php_api/php_api.md index c4917c04d8..d453789bf1 100644 --- a/docs/api/php_api/php_api.md +++ b/docs/api/php_api/php_api.md @@ -126,7 +126,7 @@ While [using `sudo()`](#using-sudo) is the recommended option, you can also set To identify as a different user, you need to use the `UserService` together with `PermissionResolver` (in the example `admin` is the login of the administrator user): ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/CreateContentCommand.php', 40, 41) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/CreateContentCommand.php', 44, 46) =]] ``` !!! tip diff --git a/docs/content_management/content_api/browsing_content.md b/docs/content_management/content_api/browsing_content.md index 5636fa90e8..3e9a683643 100644 --- a/docs/content_management/content_api/browsing_content.md +++ b/docs/content_management/content_api/browsing_content.md @@ -26,11 +26,14 @@ This value object provides primitive fields, such as `contentTypeId`, `published You can also use it to request other Content-related value objects from various services: ``` php hl_lines="8" +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 0, 5) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 21, 23) =]] + // ... -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 4, 5) =]] -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 18, 22) =]] -// ... -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 44, 46) =]][[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 54, 65) =]] + +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 42, 44) =]][[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 50, 58) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 113, 116) =]] + ``` @@ -68,7 +71,7 @@ The [`URLAliasService`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-C You can retrieve the content type of a content item through the [`getContentType`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-ContentInfo.html#method_getContentType) method of the ContentInfo object: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 82, 84) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 69, 71) =]] ``` ### Versions @@ -76,13 +79,13 @@ You can retrieve the content type of a content item through the [`getContentType To iterate over the versions of a content item, use the [`ContentService::loadVersions`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ContentService.html#method_loadVersions) method, which returns an array of `VersionInfo` value objects. ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 86, 92) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 73, 79) =]] ``` You can additionally provide the `loadVersions` method with the version status to get only versions of a specific status, for example: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 93, 94) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 80, 81) =]] ``` !!! note @@ -98,7 +101,7 @@ This method loads only the specified subset of relations to improve performance You can get the current version's `VersionInfo` using [`ContentService::loadVersionInfo`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ContentService.html#method_loadVersionInfo). ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 105, 112) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 92, 99) =]] ``` You can also specify the version number as the second argument to get Relations for a specific version: @@ -117,7 +120,7 @@ It also holds the [relation type](content_relations.md), and the optional field You can use the `getOwner` method of the `ContentInfo` object to load the content item's owner as a `User` value object. ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 114, 115) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 101, 102) =]] ``` To get the creator of the current version and not the content item's owner, you need to use the `creatorId` property from the current version's `VersionInfo` object. @@ -127,7 +130,7 @@ To get the creator of the current version and not the content item's owner, you You can find the section to which a content item belongs through the [`getSection`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-ContentInfo.html#method_getSection) method of the ContentInfo object: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 117, 118) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 104, 105) =]] ``` !!! note @@ -142,17 +145,19 @@ You need to provide it with the object state group. All object state groups can be retrieved through [`loadObjectStateGroups`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ObjectStateService.html#method_loadObjectStateGroups). ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 120, 125) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentMetaDataCommand.php', 107, 112) =]] ``` ## Viewing content with fields To retrieve the fields of the selected content item, you can use the following command: -```php hl_lines="9-10 12-19" -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentCommand.php', 4, 7) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentCommand.php', 42, 60) =]] -} +```php hl_lines="17-18 20-27" +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentCommand.php', 0, 7) =]] +// ... +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentCommand.php', 17, 19) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ViewContentCommand.php', 35, 54) =]] + ``` Line 9 shows how [`ContentService::loadContent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ContentService.html#method_loadContent) loads the content item provided to the command. @@ -182,7 +187,7 @@ $contentService->loadContent($content->id, Language::ALL); To go through all the content items contained in a subtree, you need to use the [`LocationService`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-LocationService.html). ``` php hl_lines="5 15" -[[= include_file('code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php', 35, 54) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php', 31, 50) =]] ``` `loadLocation` (line 15) returns a value object, here a `Location`. diff --git a/docs/content_management/content_api/creating_content.md b/docs/content_management/content_api/creating_content.md index 7cd1df6a04..bb4589e06b 100644 --- a/docs/content_management/content_api/creating_content.md +++ b/docs/content_management/content_api/creating_content.md @@ -20,8 +20,8 @@ Value objects such as content items are read-only, so to create or modify them y [`ContentService::newContentCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ContentService.html#method_newContentCreateStruct) returns a new [`ContentCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-ContentCreateStruct.html) object. -``` php hl_lines="1-2 6" -[[= include_file('code_samples/api/public_php_api/src/Command/CreateContentCommand.php', 47, 53) =]] +``` php hl_lines="2-3 7" +[[= include_file('code_samples/api/public_php_api/src/Command/CreateContentCommand.php', 51, 60) =]] ``` This command creates a draft using [`ContentService::createContent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ContentService.html#method_createContent) (line 6). @@ -42,7 +42,7 @@ Therefore, when creating a content item of the Image type (or any other content the `ContentCreateStruct` is slightly more complex than in the previous example: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/CreateImageCommand.php', 47, 62) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/CreateImageCommand.php', 51, 63) =]] ``` Value of the Image field type contains the path to the image file and other basic information based on the input file. @@ -66,7 +66,7 @@ To publish it, use [`ContentService::publishVersion`](/api/php_api/php_api_refer This method must get the [`VersionInfo`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-VersionInfo.html) object of a draft version. ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/CreateContentCommand.php', 58, 59) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/CreateContentCommand.php', 62, 63) =]] ``` ## Updating content @@ -76,7 +76,7 @@ and pass it to [`ContentService::updateContent`](/api/php_api/php_api_reference/ This method works on a draft, so to publish your changes you need to use [`ContentService::publishVersion`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ContentService.html#method_publishVersion) as well: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/UpdateContentCommand.php', 45, 50) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/UpdateContentCommand.php', 44, 53) =]] ``` ## Translating content @@ -86,15 +86,16 @@ Content [translations](languages.md#language-versions) are created per version. To translate a content item to a new language, you need to update it and provide a new `initialLanguageCode`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/TranslateContentCommand.php', 50, 52) =]] -[[= include_file('code_samples/api/public_php_api/src/Command/TranslateContentCommand.php', 58, 60) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/TranslateContentCommand.php', 49, 55) =]] + +[[= include_file('code_samples/api/public_php_api/src/Command/TranslateContentCommand.php', 60, 63) =]] ``` You can also update content in multiple languages at once using the `setField` method's third argument. Only one language can still be set as a version's initial language: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/TranslateContentCommand.php', 55, 55) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/TranslateContentCommand.php', 57, 58) =]] ``` ### Deleting a translation diff --git a/docs/content_management/content_management_api/bookmark_api.md b/docs/content_management/content_management_api/bookmark_api.md index 8f57d51d51..37b6f90d08 100644 --- a/docs/content_management/content_management_api/bookmark_api.md +++ b/docs/content_management/content_management_api/bookmark_api.md @@ -13,17 +13,17 @@ description: You can use the PHP API to view the bookmark list, and add or remov To view a list of all bookmarks, use [`BookmarkService::loadBookmarks`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-BookmarkService.html#method_loadBookmarks): ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/BookmarkCommand.php', 42, 48) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/BookmarkCommand.php', 43, 50) =]] ``` You can add a bookmark to a content item by providing its Location object to the [`BookmarkService::createBookmark`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-BookmarkService.html#method_createBookmark) method: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/BookmarkCommand.php', 38, 40) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/BookmarkCommand.php', 37, 40) =]] ``` You can remove a bookmark from a location with [`BookmarkService::deleteBookmark`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-BookmarkService.html#method_deleteBookmark): ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/BookmarkCommand.php', 51, 51) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/BookmarkCommand.php', 52, 53) =]] ``` diff --git a/docs/content_management/content_management_api/object_state_api.md b/docs/content_management/content_management_api/object_state_api.md index 7f65271c04..cc01885617 100644 --- a/docs/content_management/content_management_api/object_state_api.md +++ b/docs/content_management/content_management_api/object_state_api.md @@ -18,7 +18,7 @@ You can manage Object states by using the PHP API by using `ObjectStateService`. You can use the [`ObjectStateService`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ObjectStateService.html) to get information about object state groups or object states. ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 41, 46) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 44, 49) =]] ``` ## Creating object states @@ -26,7 +26,7 @@ You can use the [`ObjectStateService`](/api/php_api/php_api_reference/classes/Ib To create an object state group and add object states to it, you need to make use of the [`ObjectStateService`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ObjectStateService.html): ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 50, 54) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 53, 57) =]] ``` [`ObjectStateService::createObjectStateGroup`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ObjectStateService.html#method_createObjectStateGroup) takes as argument an [`ObjectStateGroupCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-ObjectState-ObjectStateGroupCreateStruct.html), in which you need to specify the identifier, default language and at least one name for the group. @@ -34,7 +34,7 @@ To create an object state group and add object states to it, you need to make us To create an object state inside a group, use [`ObjectStateService::newObjectStateCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-ObjectStateService.html#method_newObjectStateCreateStruct) and provide it with an `ObjectStateCreateStruct`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 56, 60) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 59, 63) =]] ``` ## Assigning object state @@ -43,5 +43,5 @@ To assign an object state to a content item, use [`ObjectStateService::setConten Provide it with a `ContentInfo` object of the content item, the object state group and the object state: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 71, 75) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/ObjectStateCommand.php', 73, 78) =]] ``` diff --git a/docs/content_management/content_management_api/section_api.md b/docs/content_management/content_management_api/section_api.md index f93c0760f2..2166a02fd1 100644 --- a/docs/content_management/content_management_api/section_api.md +++ b/docs/content_management/content_management_api/section_api.md @@ -17,7 +17,7 @@ You can manage sections by using the PHP API by using `SectionService`. To create a new section, you need to make use of the [`SectionCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-SectionCreateStruct.html) and pass it to the [`SectionService::createSection`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-SectionService.html#method_createSection) method: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 48, 52) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 52, 56) =]] ``` ## Getting section information @@ -25,7 +25,7 @@ To create a new section, you need to make use of the [`SectionCreateStruct`](/ap You can use `SectionService` to retrieve section information such as whether it's in use: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 66, 71) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 70, 75) =]] ``` ## Listing content in a section @@ -34,7 +34,9 @@ To list content items assigned to a section you need to make a [query](search_ap You can also use the query to get the total number of assigned content items: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 59, 65) =]][[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 72, 76) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 63, 69) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 75, 80) =]] + ``` ## Assigning section to content @@ -43,7 +45,7 @@ To assign content to a section, use the [`SectionService::assignSection`](/api/p You need to provide it with the `ContentInfo` object of the content item, and the [`Section`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Section.html) object: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 54, 57) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SectionCommand.php', 58, 61) =]] ``` Assigning a section to content doesn't automatically assign it to the content item's children. diff --git a/docs/content_management/field_types/create_custom_generic_field_type.md b/docs/content_management/field_types/create_custom_generic_field_type.md index 298f7ce67e..b655c22ed8 100644 --- a/docs/content_management/field_types/create_custom_generic_field_type.md +++ b/docs/content_management/field_types/create_custom_generic_field_type.md @@ -38,7 +38,10 @@ Next, implement a definition of a field type extending the Generic field type in It provides settings for the field type and an implementation of the `Ibexa\Contracts\Core\FieldType\FieldType` abstract class. ```php -[[= include_file('code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php', 0, 6) =]][[= include_file('code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php', 9, 16) =]]} +[[= include_file('code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php', 0, 3) =]] +[[= include_file('code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php', 6, 8) =]] +[[= include_file('code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php', 10, 16) =]] +[[= include_file('code_samples/field_types/generic_ft/src/FieldType/HelloWorld/Type.php', 26, 27) =]] ``` For more information about the Type class of a field type, see [Type class](type_and_value.md#type-class). diff --git a/docs/content_management/taxonomy/taxonomy_api.md b/docs/content_management/taxonomy/taxonomy_api.md index aa5f85e69c..16cb291ff8 100644 --- a/docs/content_management/taxonomy/taxonomy_api.md +++ b/docs/content_management/taxonomy/taxonomy_api.md @@ -4,7 +4,7 @@ description: Using the PHP API you can browse taxonomy entries, get their inform # Taxonomy API -To manage taxonomies, use `Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface`. +To manage taxonomies, use [`TaxonomyServiceInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Taxonomy-Service-TaxonomyServiceInterface.html). ## Getting taxonomy entries @@ -14,7 +14,7 @@ Or pass entry identifier (with optionally a taxonomy identifier), and use `TaxonomyServiceInterface::loadEntryByIdentifier()`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 35, 37) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 34, 37) =]] ``` !!! note @@ -37,7 +37,7 @@ The default taxonomy identifier is given by `TaxonomyConfiguration::getDefaultTa The default limit is 30. ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 33, 33) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 32, 33) =]] ``` To see how many entries is there, use `TaxonomyServiceInterface::countAllEntries()` with optionally a taxonomy identifier. @@ -47,7 +47,7 @@ provide it with the entry object, and optionally specify the limit of results an The default limit is 30: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 40, 44) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 39, 44) =]] ``` ## Managing taxonomy entries @@ -56,7 +56,7 @@ You can move a taxonomy entry to a different parent by using `TaxonomyServiceInt Provide the method with two objects: the entry that you want to move and the new parent entry: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 46, 49) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 45, 49) =]] ``` You can also move a taxonomy entry by passing its target sibling entry to `TaxonomyServiceInterface::moveEntry()`. @@ -64,7 +64,7 @@ The method takes as parameters the entry you want to move, the future sibling, and a `position` parameter, which is either `TaxonomyServiceInterface::MOVE_POSITION_NEXT` or `TaxonomyServiceInterface::MOVE_POSITION_PREV`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 51, 52) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/TaxonomyCommand.php', 50, 52) =]] ``` !!! note diff --git a/docs/content_management/url_management/url_api.md b/docs/content_management/url_management/url_api.md index cc8188c003..030deaa8b7 100644 --- a/docs/content_management/url_management/url_api.md +++ b/docs/content_management/url_management/url_api.md @@ -19,9 +19,9 @@ in which you need to specify: ```php // ... -[[= include_file('code_samples/api/public_php_api/src/Command/FindUrlCommand.php', 6, 10) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindUrlCommand.php', 5, 6) =]][[= include_file('code_samples/api/public_php_api/src/Command/FindUrlCommand.php', 7, 10) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Command/FindUrlCommand.php', 32, 51) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindUrlCommand.php', 34, 53) =]] ``` ## URL search reference diff --git a/docs/content_management/workflow/workflow_api.md b/docs/content_management/workflow/workflow_api.md index 157d436373..839480bba2 100644 --- a/docs/content_management/workflow/workflow_api.md +++ b/docs/content_management/workflow/workflow_api.md @@ -25,7 +25,7 @@ but the implementation in workflow service extends them, for example by providin To get information about a specific workflow for a content item, use `WorkflowServiceInterface::loadWorkflowMetadataForContent`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 49, 53) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 51, 56) =]] ``` !!! tip @@ -36,7 +36,7 @@ To get information about a specific workflow for a content item, use `WorkflowSe To get a list of all workflows that can be used for a given content item, use `WorkflowRegistry`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 43, 46) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 45, 49) =]] ``` ## Applying workflow transitions @@ -44,14 +44,14 @@ To get a list of all workflows that can be used for a given content item, use `W To place a content item in a workflow, use `WorkflowService::start`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 48, 48) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 50, 51) =]] ``` To apply a transition to a content item, use `Workflow::apply`. Additionally, you can check if the transition is possible for the given object using `WorkflowService::can`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 55, 59) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/WorkflowCommand.php', 57, 62) =]] ``` !!! tip diff --git a/docs/pim/product_api.md b/docs/pim/product_api.md index b12ec44821..dad5a2e096 100644 --- a/docs/pim/product_api.md +++ b/docs/pim/product_api.md @@ -128,7 +128,7 @@ Get the availability object with `ProductAvailabilityServiceInterface::getAvaila You can then use `ProductAvailabilityServiceInterface::getStock()` to get the stock number for the product: ```php -[[= include_file('code_samples/api/product_catalog/src/Command/ProductCommand.php', 90, 95) =]] } +[[= include_file('code_samples/api/product_catalog/src/Command/ProductCommand.php', 90, 95) =]][[= include_file('code_samples/api/product_catalog/src/Command/ProductCommand.php', 104, 105) =]] ``` To change availability for a product, use `ProductAvailabilityServiceInterface::updateProductAvailability()` with a [`ProductAvailabilityUpdateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ProductCatalog-Values-Availability-ProductAvailabilityUpdateStruct.html) and provide it with the product object. diff --git a/docs/search/search_api.md b/docs/search/search_api.md index 9f69bf8dc6..cad0323235 100644 --- a/docs/search/search_api.md +++ b/docs/search/search_api.md @@ -30,7 +30,8 @@ The following command takes the content type identifier as an argument and lists // ... [[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 4, 7) =]]// ... [[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 17, 19) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 32, 48) =]]} +[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 32, 48) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 48, 49) =]] ``` [`SearchService::findContentInfo`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-SearchService.html#method_findContentInfo) (line 16) @@ -116,19 +117,20 @@ It doesn't use the `SearchService` and isn't based on indexed data. For example, the following command lists all content items under the specified parent location and sorts them by name in descending order: -``` php hl_lines="11-14" +``` php hl_lines="13-16" // ... [[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 4, 9) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 38, 49) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 19, 21) =]][[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 33, 53) =]] ``` The same Filter can be applied to find locations instead of content items, for example: -``` php hl_lines="15" +``` php hl_lines="17" // ... -[[= include_file('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 4, 9) =]]// ... -[[= include_file('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 38, 49) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 4, 9) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 19, 21) =]]// ... +[[= include_file('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 33, 53) =]] ``` !!! caution @@ -181,7 +183,7 @@ For example, in the code below, `locationId` is provided to list all children of ``` php hl_lines="22-24" // ... [[= include_file('code_samples/api/public_php_api/src/Controller/CustomController.php', 4, 12) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Controller/CustomController.php', 19, 35) =]] +[[= include_file('code_samples/api/public_php_api/src/Controller/CustomController.php', 16, 32) =]] ``` The rendering of results is then relegated to [templates](templates.md) (lines 22-24). @@ -191,7 +193,7 @@ When using Repository filtering, provide the results of `ContentService::find()` ``` php hl_lines="19" // ... [[= include_file('code_samples/api/public_php_api/src/Controller/CustomFilterController.php', 4, 12) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Controller/CustomFilterController.php', 19, 34) =]] +[[= include_file('code_samples/api/public_php_api/src/Controller/CustomFilterController.php', 16, 31) =]] ``` ### Paginating search results @@ -201,8 +203,7 @@ To paginate search or filtering results, it's recommended to use the [Pagerfanta ``` php // ... [[= include_file('code_samples/api/public_php_api/src/Controller/PaginationController.php', 8, 15) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Controller/PaginationController.php', 22, 32) =]] -[[= include_file('code_samples/api/public_php_api/src/Controller/PaginationController.php', 33, 43) =]] +[[= include_file('code_samples/api/public_php_api/src/Controller/PaginationController.php', 19, 39) =]] ``` Pagination can then be rendered for example using the following template: @@ -238,8 +239,9 @@ For more complex searches, you need to combine multiple Criteria. You can do it using logical operators: `LogicalAnd`, `LogicalOr`, and `LogicalNot`. ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 45, 48) =]][[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 59, 60) =]] -[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 60, 63) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 44, 49) =]][[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 53, 54) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 60, 65) =]] + ``` This example takes three parameters from a command — `$text`, `$contentTypeId`, and `$locationId`. @@ -253,7 +255,7 @@ The example below uses the `LogicalNot` operator to search for all content conta that doesn't belong to the provided Section: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 47, 47) =]][[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 49, 52) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 46, 54) =]] ``` ### Combining independent Criteria @@ -286,7 +288,7 @@ To sort the results of a query, use one of more [Sort Clauses](sort_clause_refer For example, to order search results by their publicationg date, from oldest to newest, and then alphabetically by content name, add the following Sort Clauses to the query: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 54, 57) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 55, 59) =]] ``` !!! tip @@ -305,7 +307,8 @@ For a list of supported Criteria and Sort Clauses, see [Search in trash referenc Searching through the trashed content items operates directly on the database, therefore you cannot use external search engines, such as Solr or Elasticsearch, and it's impossible to reindex the data. ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindInTrashCommand.php', 38, 42) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindInTrashCommand.php', 4, 6) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindInTrashCommand.php', 35, 42) =]] ``` !!! caution @@ -324,7 +327,7 @@ With aggregations you can find the count of search results or other result infor To do this, you use of the query's `$aggregations` property: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 31, 35) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 30, 35) =]] ``` The name of the aggregation must be unique in the given query. @@ -332,13 +335,13 @@ The name of the aggregation must be unique in the given query. Access the results by using the `get()` method of the aggregation: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 40, 41) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 39, 40) =]] ``` Aggregation results contain the name of the result and the count of found items: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 43, 45) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 42, 45) =]] ``` With field aggregations you can group search results according to the value of a specific field. @@ -347,14 +350,14 @@ In this case the aggregation takes the content type identifier and the field ide The following example creates an aggregation named `selection` that groups results according to the value of the `topic` field in the `article` content type: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 36, 36) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 35, 36) =]] ``` With term aggregation you can define additional limits to the results. The following example limits the number of terms returned to 5 and only considers terms that have 10 or more results: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 31, 33) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 30, 33) =]] ``` To use a range aggregation, you must provide a `ranges` array containing a set of `Range` objects that define the borders of the specific range sets. diff --git a/docs/templating/queries_and_controllers/controllers.md b/docs/templating/queries_and_controllers/controllers.md index 485c9cd897..da8c2ebe23 100644 --- a/docs/templating/queries_and_controllers/controllers.md +++ b/docs/templating/queries_and_controllers/controllers.md @@ -13,7 +13,7 @@ You indicate which controller to use in the [content view configuration](templat ``` ``` php -[[= include_file('code_samples/front/embed_content/src/Controller/RelationController.php', 2, 9) =]] +[[= include_file('code_samples/front/embed_content/src/Controller/RelationController.php', 0, 10) =]][[= include_file('code_samples/front/embed_content/src/Controller/RelationController.php', 16, 18) =]][[= include_file('code_samples/front/embed_content/src/Controller/RelationController.php', 37, 40) =]] ``` For a full example of using a custom controller, see [Embed content](embed_content.md#embed-relations-with-a-custom-controller). diff --git a/docs/tutorials/generic_field_type/6_settings.md b/docs/tutorials/generic_field_type/6_settings.md index 9868534843..fe1dece8f2 100644 --- a/docs/tutorials/generic_field_type/6_settings.md +++ b/docs/tutorials/generic_field_type/6_settings.md @@ -15,7 +15,7 @@ You also specify coordinates as placeholder values `%x%` and `%y%`. Open `src/FieldType/Point2D/Type.php` and add a `getSettingsSchema` method according to the following code block: -```php hl_lines="18-26" +```php hl_lines="18-27" [[= include_file('code_samples/field_types/2dpoint_ft/steps/step_6/Type.php') =]] ``` @@ -39,15 +39,11 @@ In `src/FieldType/Point2D/Type.php` you: ```php [[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php', 0, 4) =]] -[[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php', 7, 8) =]] - -// ... - -[[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php', 14, 15) =]] - // ... +[[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php', 7, 9) =]][[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php', 10, 16) =]] -[[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php', 40, 46) =]] +// ... +[[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Type.php', 41, 48) =]] ```
diff --git a/docs/tutorials/generic_field_type/7_add_a_validation.md b/docs/tutorials/generic_field_type/7_add_a_validation.md index 98641327da..1042ee5130 100644 --- a/docs/tutorials/generic_field_type/7_add_a_validation.md +++ b/docs/tutorials/generic_field_type/7_add_a_validation.md @@ -9,6 +9,7 @@ To provide basic validation that ensures both coordinates are provided, add asse ```php [[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php', 6, 23) =]] // ... +[[= include_file('code_samples/field_types/2dpoint_ft/src/FieldType/Point2D/Value.php', 56, 57) =]] ``` As a result, if a user tries to publish the Point 2D with one value, they receive an error message. diff --git a/docs/users/segment_api.md b/docs/users/segment_api.md index 749aecd82f..2a49d8833e 100644 --- a/docs/users/segment_api.md +++ b/docs/users/segment_api.md @@ -15,13 +15,13 @@ To load a segment group, use `SegmentationService::loadSegmentGroupByIdentifier( Get all segments assigned to the group with `SegmentationService::loadSegmentsAssignedToGroup()`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 46, 52) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 48, 55) =]] ``` Similarly, you can load a segment by using `SegmentationService::loadSegmentByIdentifier()`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 54, 54) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 56, 57) =]] ``` ## Checking assignment @@ -29,7 +29,7 @@ Similarly, you can load a segment by using `SegmentationService::loadSegmentById You can check whether a user is assigned to a segment with `SegmentationService::isUserAssignedToSegment()`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 58, 62) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 60, 65) =]] ``` ## Assigning users @@ -37,7 +37,7 @@ You can check whether a user is assigned to a segment with `SegmentationService: To assign a user to a segment, use `SegmentationService::assignUserToSegment()`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 56, 56) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 58, 59) =]] ``` ## Creating segments @@ -47,13 +47,13 @@ Each segment must be assigned to a segment group. To create a segment group, use `SegmentationService::createSegmentGroup()` and provide it with a `SegmentGroupCreateStruct`: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 30, 36) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 32, 39) =]] ``` To add a segment, use `SegmentationService::createSegment()` and provide it with a `SegmentCreateStruct`, which takes an existing group as one of the parameters: ``` php -[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 38, 44) =]] +[[= include_file('code_samples/api/public_php_api/src/Command/SegmentCommand.php', 40, 47) =]] ``` ## Updating segments diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d5067dcdcc..458db81aba 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -198,12 +198,6 @@ parameters: count: 1 path: code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php - - - message: '#^Method App\\Rest\\ValueObjectVisitor\\Greeting\:\:visit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/Greeting.php - - message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' identifier: argument.type @@ -306,12 +300,6 @@ parameters: count: 1 path: code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php - - - message: '#^Method App\\Strategy\\StaticThumbnailStrategy\:\:getThumbnail\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: code_samples/back_office/thumbnails/src/Strategy/StaticThumbnailStrategy.php - - message: '#^Method App\\Attribute\\Percent\\Form\\PercentValueFormMapper\:\:createValueForm\(\) has parameter \$builder with generic interface Symfony\\Component\\Form\\FormBuilderInterface but does not specify its types\: TData$#' identifier: missingType.generics