diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8465ce68fd..32ccafbf44 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -4360,11 +4360,6 @@ parameters: count: 1 path: src/contracts/Limitation/Target/Builder/VersionBuilder.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Target\\\\DestinationLocation\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Limitation/Target/DestinationLocation.php - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:acceptValue\\(\\) has no return type specified\\.$#" count: 1 @@ -4490,11 +4485,6 @@ parameters: count: 1 path: src/contracts/Persistence/Content/Type.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Type\\\\FieldDefinition\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Persistence/Content/Type/FieldDefinition.php - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Type\\\\Handler\\:\\:delete\\(\\) has no return type specified\\.$#" count: 1 @@ -6350,21 +6340,11 @@ parameters: count: 1 path: src/contracts/Repository/Values/Content/Search/Facet/UserFacet.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Search\\\\SearchResult\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Repository/Values/Content/Search/SearchResult.php - - message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" count: 1 path: src/contracts/Repository/Values/Content/Trash/SearchResult.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Repository/Values/Content/Trash/SearchResult.php - - message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\TrashItemDeleteResultList implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" count: 1 @@ -6480,26 +6460,11 @@ parameters: count: 1 path: src/contracts/Repository/Values/UserPreference/UserPreferenceList.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Repository/Values/ValueObject.php - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:attributes\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: src/contracts/Repository/Values/ValueObject.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:getProperties\\(\\) has parameter \\$dynamicProperties with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Repository/Values/ValueObject.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:getProperties\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Repository/Values/ValueObject.php - - message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:__set\\(\\) expects string, null given\\.$#" count: 1 @@ -17796,7 +17761,7 @@ parameters: path: src/lib/Repository/Mapper/RoleDomainMapper.php - - message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array, array\\|null given\\.$#" + message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array\\, array\\|null given\\.$#" count: 2 path: src/lib/Repository/Mapper/RoleDomainMapper.php @@ -17956,7 +17921,7 @@ parameters: path: src/lib/Repository/Permission/PermissionResolver.php - - message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array, array\\|null given\\.$#" + message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array\\, array\\|null given\\.$#" count: 1 path: src/lib/Repository/Permission/PermissionResolver.php @@ -18760,16 +18725,6 @@ parameters: count: 1 path: src/lib/Repository/Values/Content/Content.php - - - message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:getProperties\\(\\) has parameter \\$dynamicProperties with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Repository/Values/Content/Content.php - - - - message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:getProperties\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Repository/Values/Content/Content.php - - message: "#^Property Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:\\$fieldDefinitionTranslationMap has unknown class eZ\\\\Publish\\\\API\\\\Repository\\\\Values\\\\Content\\\\Field as its type\\.$#" count: 1 @@ -34460,11 +34415,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/SearchServiceTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\SearchServiceTest\\:\\:testUserMetadataGroupHorizontalFilterContent\\(\\) has parameter \\$queryType with no type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\SearchServiceTest\\:\\:testUserMetadataGroupHorizontalFilterLocation\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/bundle/Core/Resources/config/default_settings.yml b/src/bundle/Core/Resources/config/default_settings.yml index ed8d74c620..eb1d15c4f6 100644 --- a/src/bundle/Core/Resources/config/default_settings.yml +++ b/src/bundle/Core/Resources/config/default_settings.yml @@ -180,6 +180,7 @@ parameters: reference: reference: ~ filters: + auto_rotate: [] geometry/scaledownonly: [600, 600] small: reference: reference diff --git a/src/contracts/FieldType/FieldType.php b/src/contracts/FieldType/FieldType.php index 5cdb9f6cbb..6e87f2a0f6 100644 --- a/src/contracts/FieldType/FieldType.php +++ b/src/contracts/FieldType/FieldType.php @@ -101,20 +101,20 @@ abstract public function getSettingsSchema(); * It is considered best practice to return a hash map, which contains * rudimentary settings structures, like e.g. for the "ezstring" FieldType * - * - * array( - * 'stringLength' => array( - * 'minStringLength' => array( - * 'type' => 'int', - * 'default' => 0, - * ), - * 'maxStringLength' => array( - * 'type' => 'int' - * 'default' => null, - * ) - * ), - * ); - * + * ``` + * [ + * 'stringLength' => [ + * 'minStringLength' => [ + * 'type' => 'int', + * 'default' => 0, + * ], + * 'maxStringLength' => [ + * 'type' => 'int' + * 'default' => null, + * ], + * ], + * ]; + * ``` * * @return mixed */ @@ -361,22 +361,22 @@ abstract public function fromPersistenceValue(FieldValue $fieldValue); * * @param \Ibexa\Contracts\Core\FieldType\Value $value * - * @return array Hash with relation type as key and array of destination content ids as value. + * @return array Hash with relation type as key and array of destination content IDs as value. * * Example: - * - * array( - * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => array( - * "contentIds" => array( 12, 13, 14 ), - * "locationIds" => array( 24 ) - * ), - * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => array( - * "contentIds" => array( 12 ), - * "locationIds" => array( 24, 45 ) - * ), - * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => array( 12 ) - * ) - * + * ``` + * [ + * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => [ + * 'contentIds' => [12, 13, 14], + * 'locationIds' => [24] + * ], + * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => [ + * 'contentIds" => [12], + * 'locationIds' => [24, 45] + * ], + * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => [12] + * ] + * ``` */ abstract public function getRelations(Value $value); } diff --git a/src/contracts/FieldType/Generic/Type.php b/src/contracts/FieldType/Generic/Type.php index 74626118cf..0af7c518e5 100644 --- a/src/contracts/FieldType/Generic/Type.php +++ b/src/contracts/FieldType/Generic/Type.php @@ -260,20 +260,20 @@ final public function acceptValue($inputValue): Value * If given $inputValue could not be converted or is already an instance of dedicate value object, * the method should simply return it. * - * This is an operation method for {@see acceptValue()}. + * This is an operation method for {@see Type::acceptValue()}. * * Example implementation: - * - * protected function createValueFromInput( $inputValue ) + * ``` + * protected function createValueFromInput($inputValue) * { - * if ( is_array( $inputValue ) ) + * if (is_array($inputValue)) * { - * $inputValue = \My\FieldType\CookieJar\Value( $inputValue ); + * $inputValue = \My\FieldType\CookieJar\Value($inputValue); * } * * return $inputValue; * } - * + * ``` * * @param mixed $inputValue * @@ -304,23 +304,23 @@ protected function getValueClass(): string /** * Throws an exception if the given $value is not an instance of the supported value subtype. * - * This is an operation method for {@see acceptValue()}. + * This is an operation method for {@see Type::acceptValue()}. * * Default implementation expects the value class to reside in the same namespace as its * FieldType class and is named "Value". * * Example implementation: - * + * ``` * protected function checkValueType($value): void * { - * if ( !$inputValue instanceof \My\FieldType\CookieJar\Value ) ) + * if (!$inputValue instanceof \My\FieldType\CookieJar\Value)) * { - * throw new InvalidArgumentException( "Given value type is not supported." ); + * throw new InvalidArgumentException("Given value type isn't supported."); * } * } - * + * ``` * - * @param mixed $value A value returned by {@see createValueFromInput()}. + * @param mixed $value A value returned by {@see Type::createValueFromInput()}. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the parameter is not an instance of the supported value subtype. */ diff --git a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php index ce3b46643c..54a73434ca 100644 --- a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php +++ b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php @@ -14,8 +14,10 @@ use Symfony\Component\Validator\ConstraintViolationInterface; /** - * {@see \Symfony\Component\Validator\ConstraintViolationInterface} to - * {@see \Ibexa\Contracts\Core\FieldType\ValidationError} adapter. + * Constraint violation validation error. + * + * Adapts {@see \Symfony\Component\Validator\ConstraintViolationInterface} to + * {@see \Ibexa\Contracts\Core\FieldType\ValidationError}. */ final class ConstraintViolationAdapter implements ValidationErrorInterface { diff --git a/src/contracts/Limitation/Target/Builder/VersionBuilder.php b/src/contracts/Limitation/Target/Builder/VersionBuilder.php index d852793a44..5b870b5fed 100644 --- a/src/contracts/Limitation/Target/Builder/VersionBuilder.php +++ b/src/contracts/Limitation/Target/Builder/VersionBuilder.php @@ -14,6 +14,8 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentException; /** + * Version builder. + * * Builder of {@see \Ibexa\Contracts\Core\Limitation\Target\Version} instance. */ final class VersionBuilder @@ -41,8 +43,6 @@ public function updateFields(array $updatedFields): self * * @param array $languageCodes * - * @return self - * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function translateToAnyLanguageOf(array $languageCodes): self @@ -61,9 +61,7 @@ public function translateToAnyLanguageOf(array $languageCodes): self /** * Set intent to create Content from unspecified (yet) content type, any from the given list. * - * @param int[] $contentTypeIds - * - * @return self + * @param array $contentTypeIds * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ @@ -83,14 +81,12 @@ public function createFromAnyContentTypeOf(array $contentTypeIds): self /** * Set intent to change Version status. * - * Supported: VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED + * Supported: {@see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo::STATUS_DRAFT}, {@see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo::STATUS_PUBLISHED}, {@see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo::STATUS_ARCHIVED} * * @see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo * * @param int $status * - * @return self - * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function changeStatusTo(int $status): self @@ -114,9 +110,7 @@ public function changeStatusTo(int $status): self * Set intent to update Content Version Fields. * * @param string|null $initialLanguageCode - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $fields - * - * @return self + * @param array $fields */ public function updateFieldsTo(?string $initialLanguageCode, array $fields): self { @@ -138,9 +132,7 @@ static function (Field $field) { /** * Set intent to publish, to specified translations, all from the given list. * - * @param string[] $languageCodes - * - * @return self + * @param array $languageCodes * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ diff --git a/src/contracts/Limitation/Type.php b/src/contracts/Limitation/Type.php index c6f3ac801b..edd5e2f3c7 100644 --- a/src/contracts/Limitation/Type.php +++ b/src/contracts/Limitation/Type.php @@ -22,26 +22,51 @@ interface Type { /** - * Constants for return value of {@see evaluate()}. + * Access is granted. * - * Currently ACCESS_ABSTAIN must mean that evaluate does not support the provided $object or $targets, - * this is currently only supported by role limitations as policy limitations should not allow this. + * Constant for return value of {@see Type::evaluate()}. * * Note: In future version constant values might change to 1, 0 and -1 as used in Symfony. - * - * @since 5.3.2 */ public const ACCESS_GRANTED = true; + + /** + * The type abstains from voting. + * + * Constant for return value of {@see Type::evaluate()}. + * + * Returning ACCESS_ABSTAIN must mean that evaluate does not support the provided $object or $targets, + * this is only supported by role limitations as policy limitations should not allow this. + * + * Note: In future version constant values might change to 1, 0 and -1 as used in Symfony. + */ public const ACCESS_ABSTAIN = null; + + /** + * Access is denied. + * + * Constant for return value of {@see Type::evaluate()}. + * + * Note: In future version constant values might change to 1, 0 and -1 as used in Symfony. + */ public const ACCESS_DENIED = false; /** - * Constants for valueSchema() return values. + * Limitation's value must be an array of location IDs. + * + * Constant for {@see Type::valueSchema()} return values. * - * Used in cases where a certain value is accepted but the options are to many to return as a hash of options. * GUI should typically present option to browse content tree to select limitation value(s). */ public const VALUE_SCHEMA_LOCATION_ID = 1; + + /** + * Limitation's value must be an array of location paths. + * + * Constant for {@see Type::valueSchema()} return values. + * + * GUI should typically present option to browse content tree to select limitation value(s). + */ public const VALUE_SCHEMA_LOCATION_PATH = 2; /** @@ -62,17 +87,17 @@ public function acceptValue(APILimitationValue $limitationValue); * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue * - * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] + * @return array */ public function validate(APILimitationValue $limitationValue); /** * Create the Limitation Value. * - * The is the method to create values as Limitation type needs value knowledge anyway in acceptValue, + * This is the method to create values as Limitation type needs value knowledge anyway in acceptValue, * the reverse relation is provided by means of identifier lookup (Value has identifier, and so does RoleService). * - * @param mixed[] $limitationValues + * @param array $limitationValues * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ @@ -90,10 +115,10 @@ public function buildValue(array $limitationValues); * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $value * @param \Ibexa\Contracts\Core\Repository\Values\User\UserReference $currentUser * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject $object - * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject[]|null $targets An array of location, parent or "assignment" + * @param array|null $targets An array of location, parent or "assignment" * objects, if null: none where provided by caller * - * @return bool|null Returns one of ACCESS_* constants + * @return bool|null Returns one of ACCESS_* constants, {@see Type::ACCESS_GRANTED}, {@see Type::ACCESS_ABSTAIN}, or {@see Type::ACCESS_DENIED}. */ public function evaluate(APILimitationValue $value, APIUserReference $currentUser, APIValueObject $object, array $targets = null); diff --git a/src/contracts/Repository/LocationService.php b/src/contracts/Repository/LocationService.php index 7f1f43615b..79136f9841 100644 --- a/src/contracts/Repository/LocationService.php +++ b/src/contracts/Repository/LocationService.php @@ -59,10 +59,10 @@ public function loadLocation(int $locationId, ?array $prioritizedLanguages = nul * Returned list of Locations will be filtered by what is found and what current user has access to. * * @param array $locationIds - * @param string[]|null $prioritizedLanguages Filter on and use as prioritized language code on translated properties of returned objects. + * @param array|null $prioritizedLanguages Filter on and use as prioritized language code on translated properties of returned objects. * @param bool|null $useAlwaysAvailable Respect always available flag on content when filtering on $prioritizedLanguages. * - * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location[]|iterable + * @return array|iterable<\Ibexa\Contracts\Core\Repository\Values\Content\Location> */ public function loadLocationList(array $locationIds, ?array $prioritizedLanguages = null, ?bool $useAlwaysAvailable = null): iterable; @@ -255,23 +255,29 @@ public function getAllLocationsCount(): int; * @param int $limit * @param int $offset * - * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location[] + * @return array */ public function loadAllLocations(int $offset = 0, int $limit = 25): array; /** * Fetch a LocationList from the Repository filtered by the given conditions. * - * @phpstan-param TFilteringLanguageFilter|null $languages a list of language codes to be added as additional constraints. + * @phpstan-param TFilteringLanguageFilter|null $languages + * + * @param array|null $languages a list of language codes to be added as additional constraints. * If skipped, by default, unless SiteAccessAware layer has been disabled, languages set * for a SiteAccess in a current context will be used. */ public function find(Filter $filter, ?array $languages = null): LocationList; /** - * Count total number of items returned by {@see find} method. + * Counts total number of items matching the filter. + * + * Return the count of items that would be returned by {@see LocationService::find()} method. + * + * @phpstan-param TFilteringLanguageFilter|null $languages * - * @phpstan-param TFilteringLanguageFilter|null $languages a list of language codes to be added as additional constraints. + * @param array|null $languages a list of language codes to be added as additional constraints. * If skipped, by default, unless SiteAccessAware layer has been disabled, languages set * for a SiteAccess in a current context will be used. */ diff --git a/src/contracts/Repository/SearchService.php b/src/contracts/Repository/SearchService.php index 0d8a77dfe6..e38d0e4f9c 100644 --- a/src/contracts/Repository/SearchService.php +++ b/src/contracts/Repository/SearchService.php @@ -20,7 +20,9 @@ interface SearchService { /** - * Capability flag for scoring feature for use with {@see ::supports()}. + * Capability flag for scoring feature. + * + * To use with {@see SearchService::supports()}. * * Scoring, a search feature telling you how well one search hit scores compared to other items in the search result. * When this is supported you can expect search engine to populate SearchHit->score and SearchResult->maxScore @@ -29,9 +31,11 @@ interface SearchService public const CAPABILITY_SCORING = 1; /** - * Capability flag for facets feature for use with {@see ::supports()}. + * Capability flag for facets feature. + * + * To use with {@see SearchService::supports()}. * - * Faceted search: https://en.wikipedia.org/wiki/Faceted_search + * Faceted search: {@link https://en.wikipedia.org/wiki/Faceted_search} * * Note: Even if search engine tells you this is supported, beware: * - It might not support all facets, by design it will only return facets for facet builders the search engine supports. @@ -41,17 +45,22 @@ interface SearchService public const CAPABILITY_FACETS = 2; /** - * Capability flag for custom fields feature for use with {@see ::supports()}. + * Capability flag for custom fields feature. + * + * To use with {@see SearchService::supports()}. * - * Custom fields is the capability for search engines to 1. allow you to extend the search index via plugins to - * generate custom fields, like a different representation (format, ...) of an existing field or similar. And 2. - * allow you on some search criteria to specify this custom field to rather query on that instead of the default - * field generated by the system. + * Custom fields is the capability for search engines to: + * - Allow you to extend the search index via plugins to + * generate custom fields, like a different representation (format, ...) of an existing field or similar. + * - Allow you on some search criteria to specify this custom field to rather query on that instead of the default + * field generated by the system. */ public const CAPABILITY_CUSTOM_FIELDS = 4; /** - * Capability flag for spellcheck feature for use with {@see ::supports()}. + * Capability flag for spellcheck feature. + * + * To use with {@see SearchService::supports()}. * * Spell check within search capabilities refers to ability to suggest better wordings in fulltext search string. * @@ -62,7 +71,9 @@ interface SearchService public const CAPABILITY_SPELLCHECK = 8; /** - * Capability flag for highlight feature for use with {@see ::supports()}. + * Capability flag for highlight feature. + * + * To use with {@see SearchService::supports()}. * * Highlight in search refers to extracting relevant text from the search index that matches the search result, * typically returning a chunk of text of a predefined size with matching text highlighted. @@ -78,7 +89,9 @@ interface SearchService public const CAPABILITY_HIGHLIGHT = 16; /** - * Capability flag for suggest feature for use with {@see ::supports()}. + * Capability flag for suggest feature. + * + * To use with {@see SearchService::supports()}. * * WARNING: This feature is considered experimental given it is not completely clear what it is supposed to do. Feature * might be deprecated in the future. @@ -86,7 +99,9 @@ interface SearchService public const CAPABILITY_SUGGEST = 32; /** - * Capability flag for advanced fulltext feature for use with {@see ::supports()}. + * Capability flag for advanced fulltext feature. + * + * To use with {@see SearchService::supports()}. * * Advance full text is a feature making to possible by current engine to parse advance full text expressions. * @@ -95,7 +110,9 @@ interface SearchService public const CAPABILITY_ADVANCED_FULLTEXT = 64; /** - * Capability flag for aggregation feature for use with {@see ::supports()}. + * Capability flag for aggregation feature. + * + * To use with {@see SearchService::supports()}. * * @since 3.2 eZ Platform 3.2 (ezplatform-kernel 1.2) */ @@ -106,12 +123,15 @@ interface SearchService * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if query is not valid * - * @phpstan-param TSearchLanguageFilter $languageFilter Configuration for specifying prioritized languages the query will be performed on. - * Also used to define which field languages are loaded for the returned content. - * Currently, it supports: ['languages' => [, ...], 'useAlwaysAvailable' => bool]. - * `useAlwaysAvailable` defaults to true to avoid exceptions on missing translations. + * @phpstan-param TSearchLanguageFilter $languageFilter * - * @param bool $filterOnUserPermissions if true only the objects which the user is allowed to read are returned. + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query $query + * @param array|array $languageFilter Configuration for specifying prioritized languages query will be performed on. + * Also used to define which field languages are loaded for the returned content. + * Currently, supports two syntaxes: + * - `['languages' => [,…], 'useAlwaysAvailable' => ]` + * - `[,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations. + * @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned. * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult<\Ibexa\Contracts\Core\Repository\Values\Content\Content> */ @@ -124,12 +144,14 @@ public function findContent(Query $query, array $languageFilter = [], bool $filt * it can be more efficient for use cases where you don't need the full Content. Also including use cases * where content will be loaded by separate code, like an ESI based sub requests that takes content ID as input. * - * @phpstan-param TSearchLanguageFilter $languageFilter Configuration for specifying prioritized languages the query will be performed on. - * Also used to define which field languages are loaded for the returned content. - * Currently, it supports: ['languages' => [, ...], 'useAlwaysAvailable' => bool]. - * `useAlwaysAvailable` defaults to true to avoid exceptions on missing translations. + * @phpstan-param TSearchLanguageFilter $languageFilter * - * @param bool $filterOnUserPermissions if true (default) only the objects which is the user allowed to read are returned. + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query $query + * @param array|array $languageFilter Configuration for specifying prioritized languages query will be performed on. + * Currently, supports two syntaxes: + * - `['languages' => [,…], 'useAlwaysAvailable' => ]` + * - `[,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations. + * @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned. * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult<\Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo> * @@ -144,12 +166,16 @@ public function findContentInfo(Query $query, array $languageFilter = [], bool $ * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if criterion is not valid * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if there is more than than one result matching the criterions * - * @phpstan-param TSearchLanguageFilter $languageFilter Configuration for specifying prioritized languages the query will be performed on. - * Also used to define which field languages are loaded for the returned content. - * Currently, it supports: ['languages' => [, ...], 'useAlwaysAvailable' => bool]. - * `useAlwaysAvailable` defaults to true to avoid exceptions on missing translations. + * @phpstan-param TSearchLanguageFilter $languageFilter + * + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $filter + * @param array|array $languageFilter Configuration for specifying prioritized languages query will be performed on. + * Currently, supports two syntaxes: + * - `['languages' => [,…], 'useAlwaysAvailable' => ]` + * - `[,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations. + * @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned. * - * @param bool $filterOnUserPermissions if true only the objects which is the user allowed to read are returned. + * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ public function findSingle(CriterionInterface $filter, array $languageFilter = [], bool $filterOnUserPermissions = true): Content; @@ -163,12 +189,14 @@ public function suggest(string $prefix, array $fieldPaths = [], int $limit = 10, /** * Finds Locations for the given query. * - * @phpstan-param TSearchLanguageFilter $languageFilter Configuration for specifying prioritized languages the query will be performed on. - * Also used to define which field languages are loaded for the returned content. - * Currently, it supports: ['languages' => [, ...], 'useAlwaysAvailable' => bool]. - * `useAlwaysAvailable` defaults to true to avoid exceptions on missing translations. + * @phpstan-param TSearchLanguageFilter $languageFilter * - * @param bool $filterOnUserPermissions if true only the objects which is the user allowed to read are returned. + * @param array|array $languageFilter Configuration for specifying prioritized languages query will be performed on. + * Also used to define which field languages are loaded for the returned content. + * Currently, supports two syntaxeses: + * - `['languages' => [,…], 'useAlwaysAvailable' => ]` + * - `[,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations. + * @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned. * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult<\Ibexa\Contracts\Core\Repository\Values\Content\Location> * @@ -181,7 +209,15 @@ public function findLocations(LocationQuery $query, array $languageFilter = [], * * Will return false if search engine does not implement {@see \Ibexa\Contracts\Core\Search\Capable}. * - * @param int $capabilityFlag One of CAPABILITY_* constants. + * @param int $capabilityFlag One of the CAPABILITY_* constants (only a single one, not a bitwise combination): + * {@see SearchService::CAPABILITY_SCORING CAPABILITY_SCORING}, + * {@see SearchService::CAPABILITY_FACETS CAPABILITY_FACETS}, + * {@see SearchService::CAPABILITY_CUSTOM_FIELDS CAPABILITY_CUSTOM_FIELDS}, + * {@see SearchService::CAPABILITY_SPELLCHECK CAPABILITY_SPELLCHECK}, + * {@internal SearchService::CAPABILITY_HIGHLIGHT CAPABILITY_HIGHLIGHT,} + * {@see SearchService::CAPABILITY_SUGGEST CAPABILITY_SUGGEST}, + * {@see SearchService::CAPABILITY_ADVANCED_FULLTEXT CAPABILITY_ADVANCED_FULLTEXT}, or + * {@see SearchService::CAPABILITY_AGGREGATIONS CAPABILITY_AGGREGATIONS}. * * @return bool */ diff --git a/src/contracts/Repository/Values/Content/Location.php b/src/contracts/Repository/Values/Content/Location.php index 404a3b4f68..724cea02b2 100644 --- a/src/contracts/Repository/Values/Content/Location.php +++ b/src/contracts/Repository/Values/Content/Location.php @@ -15,18 +15,18 @@ /** * This class represents a location in the repository. * - * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo calls getContentInfo() - * @property-read int $contentId @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use {@see Location::getContentId()} instead. - * @property-read int $id @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use {@see Location::getId()} instead. + * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo Calls {@see Location::getContentInfo()} + * @property-read int $contentId Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use {@see Location::getContentId()} instead. + * @property-read int $id Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use {@see Location::getId()} instead. * @property-read int $priority Position of the Location among its siblings when sorted using priority - * @property-read bool $hidden @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use {@see Location::isHidden()} instead. - * @property-read bool $invisible @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use {@see Location::isInvisible()} instead. + * @property-read bool $hidden Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use {@see Location::isHidden()} instead. + * @property-read bool $invisible Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use {@see Location::isInvisible()} instead. * @property-read bool $explicitlyHidden Indicates that the Location entity has been explicitly marked as hidden. - * @property-read string $remoteId a global unique id of the content object - * @property-read int $parentLocationId the id of the parent location - * @property-read string $pathString @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use {@see Location::getPathString()} instead. - * @property-read array $path @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use {@see Location::getPath()} instead. - * @property-read int $depth @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. Use {@see Location::getDepth()} instead. + * @property-read string $remoteId A global unique ID of the content object + * @property-read int $parentLocationId The ID of the parent location + * @property-read string $pathString Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use {@see Location::getPathString()} instead. + * @property-read array $path Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use {@see Location::getPath()} instead. + * @property-read int $depth Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use {@see Location::getDepth()} instead. * @property-read int $sortField Specifies which property the child locations should be sorted on. Valid values are found at {@link Location::SORT_FIELD_*} * @property-read int $sortOrder Specifies whether the sort order should be ascending or descending. Valid values are {@link Location::SORT_ORDER_*} */ @@ -79,17 +79,15 @@ abstract class Location extends ValueObject ]; /** - * Location ID. - * - * @var int Location ID. + * @var int */ protected $id; /** - * the status of the location. + * The status of the location. * - * a location gets the status DRAFT on newly created content which is not published. When content is published the - * location gets the status STATUS_PUBLISHED + * A location gets the status {@see Location::STATUS_DRAFT} on newly created content which is not published. + * When content is published the location gets the status {@see Location::STATUS_PUBLISHED}. * * @var int */ @@ -144,16 +142,19 @@ abstract class Location extends ValueObject protected $parentLocationId; /** - * The materialized path of the location entry, eg: /1/2/. + * The materialized path of the location entry, eg: /1/2/4/23/. * * @var string */ protected $pathString; /** - * Same as {@see Location::$pathString} but as array, e.g.: [ '1', '2', '4', '23' ]. + * The list of ancestor locations' IDs, ordered by increasing depth, + * starting with '1', and ending with the current Location's ID. * - * @var string[] + * Same as {@see Location::$pathString} but as array, e.g.: `['1', '2', '4', '23']`. + * + * @var array */ protected array $path; @@ -251,7 +252,7 @@ public function getSortClauses(): array /** * The path to the Location represented by the current instance, - * e.g. /1/2/4/23 where 23 is current id. + * e.g. /1/2/4/23/ where 23 is current ID. */ public function getPathString(): string { @@ -259,9 +260,12 @@ public function getPathString(): string } /** - * Same as {@see Location::getPathString()} but as array, e.g.: [ '1', '2', '4', '23' ]. + * The list of ancestor locations' IDs, ordered by increasing depth, + * starting with 1, and ending with the current Location's ID. + * + * Same as {@see Location::getPathString()} but as array, e.g.: `['1', '2', '4', '23']`. * - * @return string[] + * @return array */ public function getPath(): array { @@ -296,6 +300,7 @@ public function getDepth(): int return $this->depth; } + /** @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. */ public function __isset($property) { if ($property === 'path') { @@ -305,6 +310,7 @@ public function __isset($property) return parent::__isset($property); } + /** @deprecated 4.6.7 accessing magic getter is deprecated and will be removed in 5.0.0. */ public function __get($property) { if ($property === 'path') { diff --git a/src/contracts/Repository/Values/Content/Query/Criterion.php b/src/contracts/Repository/Values/Content/Query/Criterion.php index 1f1215cf04..695f4a5d04 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion.php @@ -44,13 +44,15 @@ abstract class Criterion implements CriterionInterface public $valueData; /** - * Performs operator validation based on the Criterion specifications returned by {@see getSpecifications()}. + * Creates a Criterion. + * + * Performs operator validation based on the Criterion specifications returned by {@see Criterion::getSpecifications()}. * * @param string|null $target The target the Criterion applies to: metadata identifier, field identifier... * @param string|null $operator - * The operator the Criterion uses. If null is given, will default to Operator::IN if $value is an array, - * Operator::EQ if it is not. - * @param scalar[]|scalar $value + * The operator the Criterion uses. If null is given, will default to {@see Operator::IN} if $value is an array, + * {@see Operator::EQ} if it isn't. + * @param array|scalar $value * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Value|null $valueData * * @todo Add a dedicated exception @@ -118,12 +120,12 @@ public function __construct(?string $target, ?string $operator, $value, ?Value $ * * Returns the combination of the Criterion's supported operator/value, * as an array of {@see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator\Specifications} objects - * - Operator is one supported Operator, as an Operator::* constant - * - ValueType is the type of input value this operator requires, either array or single - * - SupportedTypes is an array of types the operator will accept - * - ValueCountLimitation is an integer saying how many values are expected. + * - {@see Specifications::$operator} is a supported {@see Operator} constant. + * - {@see Specifications::$valueFormat} is the type of input value this operator requires, either array ({@see Specifications::FORMAT_ARRAY}) or single ({@see Specifications::FORMAT_SINGLE}). + * - {@see Specifications::$valueTypes} are bitwise flags of types the operator will accept ({@see Specifications::TYPE_BOOLEAN}, {@see Specifications::TYPE_INTEGER}, and/or {@see Specifications::TYPE_STRING}). + * - {@see Specifications::$valueCount} is an integer saying how many values are expected. * - * + * ``` * // IN and EQ are supported * return [ * // The EQ operator expects a single value, either as an integer or a string @@ -139,16 +141,16 @@ public function __construct(?string $target, ?string $operator, $value, ?Value $ * Specifications::TYPE_INTEGER | Specifications::TYPE_STRING * ) * ] - * + * ``` * - * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator\Specifications[] + * @return array */ abstract public function getSpecifications(): array; /** * Returns a callback that checks the values types depending on the operator specifications. * - * @param int $valueTypes The accepted values, as a bit field of Specifications::TYPE_* constants + * @param int $valueTypes The accepted values, as a bit field of {@see Specifications}::TYPE_* constants * * @return callable */ diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php b/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php index eea866fb8f..8015b42d29 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php @@ -18,19 +18,19 @@ * A criterion that matches content based on one of the date metadata (created or modified). * * Supported Operators: - * EQ, IN: matches content whose date is or belongs to a list of timestamps - * GT, GTE: matches content whose date is greater than/greater than or equals the given timestamp - * LT, LTE: matches content whose date is lower than/lower than or equals the given timestamp - * BETWEEN: matches content whose date is between (included) the TWO given timestamps + * - {@see Operator::EQ EQ}, {@see Operator::IN IN}: matches content whose date is or belongs to a list of timestamps. + * - {@see Operator::GT GT}, {@see Operator::GTE GTE}: matches content whose date is greater than/greater than or equals the given timestamp. + * - {@see Operator::LT LT}, {@see Operator::LTE LTE}: matches content whose date is lower than/lower than or equals the given timestamp. + * - {@see Operator::BETWEEN BETWEEN}: matches content whose date is between TWO (included) given timestamps. * - * Example: - * + * The following example is a criterion for contents created yesterday or today: + * ``` * $createdCriterion = new Criterion\DateMetadata( * Criterion\DateMetadata::CREATED, - * Operator::GTE, - * strtotime( 'yesterday' ) + * Criterion\Operator::GTE, + * strtotime('yesterday') * ); - * + * ``` */ class DateMetadata extends Criterion implements TrashCriterion, FilteringCriterion { @@ -41,7 +41,9 @@ class DateMetadata extends Criterion implements TrashCriterion, FilteringCriteri public const PUBLISHED = 'published'; /** - * (applies to TrashService::findTrashItems only). + * To search for contents based on when they have been sent to trash. + * + * Applies to {@see \Ibexa\Contracts\Core\Repository\TrashService::findTrashItems()} only. */ public const TRASHED = 'trashed'; @@ -53,12 +55,12 @@ class DateMetadata extends Criterion implements TrashCriterion, FilteringCriteri ]; /** - * Creates a new DateMetadata criterion on $metadata. + * Creates a new DateMetadata criterion. * * @throws \InvalidArgumentException If target is unknown * - * @param string $target One of DateMetadata::CREATED, DateMetadata::MODIFIED or DateMetadata::TRASHED (applies to TrashService::findTrashItems only) - * @param string $operator One of the Operator constants + * @param string $target One of {@see DateMetadata::CREATED}, {@see DateMetadata::MODIFIED}, or {@see DateMetadata::TRASHED} (applies to {@see \Ibexa\Contracts\Core\Repository\TrashService::findTrashItems()} only) + * @param string $operator One of the {@see Operator} constants * @param mixed $value The match value, either as an array of as a single value, depending on the operator */ public function __construct(string $target, string $operator, $value) diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php b/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php index 53a2866610..cf03d4ca1f 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php @@ -11,9 +11,7 @@ /** * This class is used by Criteria to describe which operators they support. * - * Instances of this class are returned in an array by the Criterion::getSpecifications() method - * - * @see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion::getSpecifications() + * Instances of this class are returned in an array by the {@see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion::getSpecifications()} method. */ class Specifications { diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php b/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php index e9f1246b95..95590e3744 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php @@ -19,16 +19,16 @@ * group, modifier). * * Supported Operators: - * EQ, IN: Matches the provided user ID(s) against the user IDs in the database + * - {@see Operator::EQ EQ}, {@see Operator::IN IN}: Matches the provided user ID(s) against the user IDs in the database. * - * Example: - * + * The following example is a criterion for contents owned by a user with ID 10 or 14: + * ``` * $createdCriterion = new Criterion\UserMetadata( * Criterion\UserMetadata::OWNER, - * Operator::IN, - * array( 10, 14 ) + * Criterion\Operator::IN, + * [10, 14] * ); - * + * ``` */ class UserMetadata extends Criterion implements TrashCriterion, FilteringCriterion { @@ -48,13 +48,13 @@ class UserMetadata extends Criterion implements TrashCriterion, FilteringCriteri public const MODIFIER = 'modifier'; /** - * Creates a new UserMetadata criterion on $metadata. + * Creates a new UserMetadata criterion. * * @throws \InvalidArgumentException If target is unknown * - * @param string $target One of UserMetadata::OWNER, UserMetadata::GROUP or UserMetadata::MODIFIED - * @param string|null $operator The operator the Criterion uses. If null is given, will default to Operator::IN if $value is an array, Operator::EQ if it is not. - * @param mixed $value The match value, either as an array of as a single value, depending on the operator + * @param string $target One of {@see UserMetadata::OWNER}, {@see UserMetadata::GROUP}, or {@see UserMetadata::MODIFIER}. + * @param string|null $operator The operator the Criterion uses. If null is given, will default to {@see Operator::IN} if $value is an array, {@see Operator::EQ} if it isn't. + * @param mixed $value The match value, either as an array of as a single value, depending on the operator. */ public function __construct(string $target, ?string $operator, $value) { diff --git a/src/contracts/Repository/Values/ValueObject.php b/src/contracts/Repository/Values/ValueObject.php index e38eb6c44a..f46b52d750 100644 --- a/src/contracts/Repository/Values/ValueObject.php +++ b/src/contracts/Repository/Values/ValueObject.php @@ -14,9 +14,9 @@ /** * The base class for all value objects and structs. * - * Supports readonly properties by marking them as protected. + * Supports read-only properties by marking them as protected. * In this case they will only be writable using constructor, and need to be documented - * using property-read <$var> annotation in class doc in addition to inline property doc. + * using `@property-read <$var>` annotation in class doc in addition to inline property doc. * Writable properties must be public and must be documented inline. */ abstract class ValueObject @@ -24,10 +24,10 @@ abstract class ValueObject /** * Construct object optionally with a set of properties. * - * Readonly properties values must be set using $properties as they are not writable anymore + * Readonly properties values must be set using `$properties` as they aren't writable anymore * after object has been created. * - * @param array $properties + * @param array $properties */ public function __construct(array $properties = []) { @@ -37,17 +37,18 @@ public function __construct(array $properties = []) } /** - * Function where list of properties are returned. + * Returns list of available properties' names. * - * Used by {@see attributes()}, override to add dynamic properties + * {@internal Used by {@see ValueObject::attributes()}.} + * Override to add dynamic properties. * - * @uses ::__isset() + * @uses ValueObject::__isset() * * @todo Make object traversable and reuse this function there (hence why this is not exposed) * - * @param array $dynamicProperties Additional dynamic properties exposed on the object + * @param array $dynamicProperties Additional dynamic properties exposed on the object * - * @return array + * @return array * * @SerializerIgnore() */ @@ -64,9 +65,9 @@ protected function getProperties($dynamicProperties = []) } /** - * Magic set function handling writes to non public properties. + * Magic set function handling writes to non-public properties. * - * @ignore This method is for internal use + * @internal * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException When property does not exist * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyReadOnlyException When property is readonly (protected) @@ -87,7 +88,7 @@ public function __set($property, $value) * * Returns value for all readonly (protected) properties. * - * @ignore This method is for internal use + * @internal * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException exception on all reads to undefined properties so typos are not silently accepted. * @@ -108,7 +109,7 @@ public function __get($property) * * Returns true for all (public/)protected/private properties. * - * @ignore This method is for internal use + * @internal * * @param string $property Name of the property * @@ -122,12 +123,12 @@ public function __isset($property) /** * Magic unset function handling unset() to non public properties. * - * @ignore This method is for internal use + * @internal * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException exception on all writes to undefined properties so typos are not silently accepted and * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyReadOnlyException exception on readonly (protected) properties. * - * @uses ::__set() + * @uses ValueObject::__set() * * @param string $property Name of the property * @@ -148,7 +149,7 @@ public function __unset($property) * var_export() generates code, that calls this method when it * is parsed with PHP. * - * @ignore This method is for internal use + * @internal * * @param mixed[] $array * @@ -162,11 +163,11 @@ public static function __set_state(array $array) /** * Internal function for Legacy template engine compatibility to get property value. * - * @ignore This method is for internal use + * @internal * * @deprecated Since 5.0, available purely for legacy eZTemplate compatibility * - * @uses ::__get() + * @uses ValueObject::__get() * * @param string $property * @@ -180,11 +181,12 @@ final public function attribute($property) /** * Internal function for Legacy template engine compatibility to get properties. * - * @ignore This method is for internal use + * @internal * * @deprecated Since 5.0, available purely for legacy eZTemplate compatibility * - * @uses ::__isset() + * @uses ValueObject::getProperties() + * @uses ValueObject::__isset() * * @return array */ @@ -196,11 +198,11 @@ final public function attributes() /** * Internal function for Legacy template engine compatibility to check existence of property. * - * @ignore This method is for internal use + * @internal * * @deprecated Since 5.0, available purely for legacy eZTemplate compatibility * - * @uses ::__isset() + * @uses ValueObject::__isset() * * @param string $property * diff --git a/src/contracts/Search/Capable.php b/src/contracts/Search/Capable.php index df1bdaf0a6..28180a5b22 100644 --- a/src/contracts/Search/Capable.php +++ b/src/contracts/Search/Capable.php @@ -9,6 +9,8 @@ namespace Ibexa\Contracts\Core\Search; /** + * Capability interface for search engines. + * * Capability interface for search engines needed for {@see \Ibexa\Contracts\Core\Repository\SearchService::supports()}. * * @since 6.12 And ported to 6.7.6 for search engine forward compatibility. @@ -18,7 +20,7 @@ interface Capable /** * Query for supported capability of currently configured search engine. * - * @param int $capabilityFlag One of \Ibexa\Contracts\Core\Repository\SearchService::CAPABILITY_* constants. + * @param int $capabilityFlag One of {@see \Ibexa\Contracts\Core\Repository\SearchService}::CAPABILITY_* constants. * * @return bool */ diff --git a/tests/integration/Core/Repository/SearchServiceTest.php b/tests/integration/Core/Repository/SearchServiceTest.php index fa547e7904..7d2e94b987 100644 --- a/tests/integration/Core/Repository/SearchServiceTest.php +++ b/tests/integration/Core/Repository/SearchServiceTest.php @@ -4067,7 +4067,7 @@ protected function createContentForTestUserMetadataGroupHorizontal() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testUserMetadataGroupHorizontalFilterContent($queryType = null) + public function testUserMetadataGroupHorizontalFilterContent(string $queryType = null) { if ($queryType === null) { $queryType = 'filter'; @@ -4184,6 +4184,7 @@ public function testUserMetadataGroupHorizontalFilterLocation($queryType = null) $editorsUserGroupId ); + /** @var string $queryType */ $query = new LocationQuery( [ $queryType => new Criterion\LogicalAnd($criteria),