diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5bf5afb553..f017a7e271 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -7480,21 +7480,6 @@ parameters: count: 1 path: src/contracts/Repository/Values/ValueObject.php - - - message: "#^PHPDoc tag @property\\-read has invalid value \\(\\$name\\)\\: Unexpected token \"\\$name\", expected type at offset 60$#" - count: 1 - path: src/contracts/Search/Field.php - - - - message: "#^PHPDoc tag @property\\-read has invalid value \\(\\$type\\)\\: Unexpected token \"\\$type\", expected type at offset 109$#" - count: 1 - path: src/contracts/Search/Field.php - - - - message: "#^PHPDoc tag @property\\-read has invalid value \\(\\$value\\)\\: Unexpected token \"\\$value\", expected type at offset 84$#" - count: 1 - path: src/contracts/Search/Field.php - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Search\\\\FieldType\\\\FullTextField\\:\\:__construct\\(\\) has parameter \\$transformationRules with no value type specified in iterable type array\\.$#" count: 1 @@ -22985,16 +22970,6 @@ parameters: count: 1 path: src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php - - - message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\Field\\:\\:\\$type\\.$#" - count: 3 - path: src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php - - - - message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\Field\\:\\:\\$value\\.$#" - count: 3 - path: src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php - - message: "#^Method Ibexa\\\\Core\\\\Search\\\\Legacy\\\\Content\\\\WordIndexer\\\\Gateway\\:\\:bulkIndex\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/contracts/Limitation/Target/Version.php b/src/contracts/Limitation/Target/Version.php index 196dae3949..b68f3a4869 100644 --- a/src/contracts/Limitation/Target/Version.php +++ b/src/contracts/Limitation/Target/Version.php @@ -14,13 +14,13 @@ /** * Version Limitation target. Indicates an intent to create new Version. * - * @property-read string[] $allLanguageCodesList - * @property-read int[] $allContentTypeIdsList - * @property-read int $newStatus - * @property-read string $forUpdateInitialLanguageCode - * @property-read string[] $forUpdateLanguageCodesList - * @property-read string[] $forPublishLanguageCodesList - * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $updatedFields + * @phpstan-property-read string[] $allLanguageCodesList + * @phpstan-property-read int[] $allContentTypeIdsList + * @phpstan-property-read int $newStatus + * @phpstan-property-read string $forUpdateInitialLanguageCode + * @phpstan-property-read string[] $forUpdateLanguageCodesList + * @phpstan-property-read string[] $forPublishLanguageCodesList + * @phpstan-property-read \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $updatedFields */ final class Version extends ValueObject implements Target { diff --git a/src/contracts/Repository/Values/Content/ContentInfo.php b/src/contracts/Repository/Values/Content/ContentInfo.php index 6a7a4e13c9..8b56c0370d 100644 --- a/src/contracts/Repository/Values/Content/ContentInfo.php +++ b/src/contracts/Repository/Values/Content/ContentInfo.php @@ -15,21 +15,21 @@ /** * This class provides all version independent information of the Content object. * - * @property-read int $id @deprecated Use {@see ContentInfo::getId} instead. The unique id of the Content object - * @property-read int $contentTypeId The unique id of the content type item the Content object is an instance of - * @property-read string $name the computed name (via name schema) in the main language of the Content object - * @property-read int $sectionId @deprecated 4.6.2 Use {@see ContentInfo::getSectionId} instead. The section to which the Content object is assigned - * @property-read int $currentVersionNo Current Version number is the version number of the published version or the version number of a newly created draft (which is 1). - * @property-read bool $published true if there exists a published version false otherwise - * @property-read int $ownerId the user id of the owner of the Content object - * @property-read \DateTime $modificationDate Content object modification date - * @property-read \DateTime $publishedDate date of the first publish - * @property-read bool $alwaysAvailable Indicates if the Content object is shown in the mainlanguage if its not present in an other requested language - * @property-read string $remoteId a global unique id of the Content object - * @property-read string $mainLanguageCode The main language code of the Content object. If the available flag is set to true the Content is shown in this language if the requested language does not exist. - * @property-read int|null $mainLocationId @deprecated Use {@see ContentInfo::getMainLocationId} instead - * @property-read int $status status of the Content object - * @property-read bool $isHidden status of the Content object + * @phpstan-property-read int $id @deprecated Use {@see ContentInfo::getId} instead. The unique id of the Content object + * @phpstan-property-read int $contentTypeId The unique id of the content type item the Content object is an instance of + * @phpstan-property-read string $name the computed name (via name schema) in the main language of the Content object + * @phpstan-property-read int $sectionId @deprecated 4.6.2 Use {@see ContentInfo::getSectionId} instead. The section to which the Content object is assigned + * @phpstan-property-read int $currentVersionNo Current Version number is the version number of the published version or the version number of a newly created draft (which is 1). + * @phpstan-property-read bool $published true if there exists a published version false otherwise + * @phpstan-property-read int $ownerId the user id of the owner of the Content object + * @phpstan-property-read \DateTime $modificationDate Content object modification date + * @phpstan-property-read \DateTime $publishedDate date of the first publish + * @phpstan-property-read bool $alwaysAvailable Indicates if the Content object is shown in the mainlanguage if its not present in an other requested language + * @phpstan-property-read string $remoteId a global unique id of the Content object + * @phpstan-property-read string $mainLanguageCode The main language code of the Content object. If the available flag is set to true the Content is shown in this language if the requested language does not exist. + * @phpstan-property-read int|null $mainLocationId @deprecated Use {@see ContentInfo::getMainLocationId} instead + * @phpstan-property-read int $status status of the Content object + * @phpstan-property-read bool $isHidden status of the Content object */ class ContentInfo extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/Field.php b/src/contracts/Repository/Values/Content/Field.php index 6114c1c479..978e8f07df 100644 --- a/src/contracts/Repository/Values/Content/Field.php +++ b/src/contracts/Repository/Values/Content/Field.php @@ -13,11 +13,11 @@ /** * This class represents a field of a content object. * - * @property-read mixed $id an internal id of the field - * @property-read string $fieldDefIdentifier the field definition identifier - * @property-read mixed $value the value of the field - * @property-read string $languageCode the language code of the field - * @property-read string $fieldTypeIdentifier field type identifier + * @phpstan-property-read mixed $id an internal id of the field + * @phpstan-property-read string $fieldDefIdentifier the field definition identifier + * @phpstan-property-read mixed $value the value of the field + * @phpstan-property-read string $languageCode the language code of the field + * @phpstan-property-read string $fieldTypeIdentifier field type identifier */ class Field extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/Language.php b/src/contracts/Repository/Values/Content/Language.php index 0594395ab0..67ebdcecf1 100644 --- a/src/contracts/Repository/Values/Content/Language.php +++ b/src/contracts/Repository/Values/Content/Language.php @@ -13,10 +13,10 @@ /** * This class represents a language in the repository. * - * @property-read mixed $id the language id - * @property-read string $languageCode the language code in - * @property-read string $name human readable name of the language - * @property-read bool $enabled indicates if the language is enabled or not. + * @phpstan-property-read mixed $id the language id + * @phpstan-property-read string $languageCode the language code in + * @phpstan-property-read string $name human readable name of the language + * @phpstan-property-read bool $enabled indicates if the language is enabled or not. */ class Language extends ValueObject { @@ -42,7 +42,11 @@ class Language extends ValueObject */ protected $name; - /** @var bool */ + /** + * Indicates if the language is enabled or not. + * + * @var bool + */ protected $enabled; public function getId(): int diff --git a/src/contracts/Repository/Values/Content/Location.php b/src/contracts/Repository/Values/Content/Location.php index 72c5348002..850ffce88a 100644 --- a/src/contracts/Repository/Values/Content/Location.php +++ b/src/contracts/Repository/Values/Content/Location.php @@ -17,18 +17,18 @@ * * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo calls getContentInfo() * @property-read int $contentId calls getContentInfo()->id - * @property-read int $id the id of the location - * @property-read int $priority Position of the Location among its siblings when sorted using priority - * @property-read bool $hidden Indicates that the Location entity is hidden (explicitly or hidden by content). - * @property-read bool $invisible Indicates that the Location is not visible, being either marked as hidden itself, or implicitly hidden by its Content or an ancestor Location - * @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 use {@see Location::getPathString()} instead. * @property-read array $path Same as $pathString but as array, e.g. [ 1, 2, 4, 23 ] - * @property-read int $depth Depth location has in the location tree - * @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_*} + * @phpstan-property-read int $id the id of the location + * @phpstan-property-read int $priority Position of the Location among its siblings when sorted using priority + * @phpstan-property-read bool $hidden Indicates that the Location entity is hidden (explicitly or hidden by content). + * @phpstan-property-read bool $invisible Indicates that the Location is not visible, being either marked as hidden itself, or implicitly hidden by its Content or an ancestor Location + * @phpstan-property-read bool $explicitlyHidden Indicates that the Location entity has been explicitly marked as hidden. + * @phpstan-property-read string $remoteId a global unique id of the content object + * @phpstan-property-read int $parentLocationId the id of the parent location + * @phpstan-property-read string $pathString @deprecated use {@see Location::getPathString()} instead. + * @phpstan-property-read int $depth Depth location has in the location tree + * @phpstan-property-read int $sortField Specifies which property the child locations should be sorted on. Valid values are found at {@link Location::SORT_FIELD_*} + * @phpstan-property-read int $sortOrder Specifies whether the sort order should be ascending or descending. Valid values are {@link Location::SORT_ORDER_*} */ abstract class Location extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/LocationList.php b/src/contracts/Repository/Values/Content/LocationList.php index cf6d624d33..1cca89ef88 100644 --- a/src/contracts/Repository/Values/Content/LocationList.php +++ b/src/contracts/Repository/Values/Content/LocationList.php @@ -18,8 +18,8 @@ * This class represents a queried location list holding a totalCount and a partial list of locations * (by offset/limit parameters and permission filters). * - * @property-read int $totalCount - the total count of found locations (filtered by permissions) - * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\Location[] $locations - the partial list of + * @phpstan-property-read int $totalCount - the total count of found locations (filtered by permissions) + * @phpstan-property-read \Ibexa\Contracts\Core\Repository\Values\Content\Location[] $locations - the partial list of * Locations controlled by offset/limit. **/ class LocationList extends ValueObject implements IteratorAggregate, TotalCountAwareInterface diff --git a/src/contracts/Repository/Values/Content/Relation.php b/src/contracts/Repository/Values/Content/Relation.php index 7922e4f8fa..2acba271eb 100644 --- a/src/contracts/Repository/Values/Content/Relation.php +++ b/src/contracts/Repository/Values/Content/Relation.php @@ -13,11 +13,11 @@ /** * Class representing a relation between content. * - * @property-read mixed $id the internal id of the relation - * @property-read string $sourceFieldDefinitionIdentifier the field definition identifier of the field where this relation is anchored if the relation is of type EMBED, LINK, or ATTRIBUTE * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $sourceContentInfo - calls {@link getSourceContentInfo()} * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $destinationContentInfo - calls {@link getDestinationContentInfo()} - * @property-read int $type The relation type bitmask containing one or more of Relation::COMMON, Relation::EMBED, Relation::LINK, Relation::FIELD + * @phpstan-property-read mixed $id the internal id of the relation + * @phpstan-property-read string $sourceFieldDefinitionIdentifier the field definition identifier of the field where this relation is anchored if the relation is of type EMBED, LINK, or ATTRIBUTE + * @phpstan-property-read int $type The relation type bitmask containing one or more of Relation::COMMON, Relation::EMBED, Relation::LINK, Relation::FIELD */ abstract class Relation extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/Section.php b/src/contracts/Repository/Values/Content/Section.php index 959b5ef953..07df9ebf7f 100644 --- a/src/contracts/Repository/Values/Content/Section.php +++ b/src/contracts/Repository/Values/Content/Section.php @@ -13,9 +13,9 @@ /** * This class represents a section. * - * @property-read mixed $id the id of the section - * @property-read string $identifier the identifier of the section - * @property-read string $name human readable name of the section + * @phpstan-property-read mixed $id the id of the section + * @phpstan-property-read string $identifier the identifier of the section + * @phpstan-property-read string $name human readable name of the section */ class Section extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/Thumbnail.php b/src/contracts/Repository/Values/Content/Thumbnail.php index 80caed993e..f11bbbe307 100644 --- a/src/contracts/Repository/Values/Content/Thumbnail.php +++ b/src/contracts/Repository/Values/Content/Thumbnail.php @@ -11,10 +11,10 @@ use Ibexa\Contracts\Core\Repository\Values\ValueObject; /** - * @property-read string $resource - * @property-read int|null $width - * @property-read int|null $height - * @property-read string|null $mimeType + * @phpstan-property-read string $resource + * @phpstan-property-read int|null $width + * @phpstan-property-read int|null $height + * @phpstan-property-read string|null $mimeType */ class Thumbnail extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/URLAlias.php b/src/contracts/Repository/Values/Content/URLAlias.php index 6e4502ff90..960f64518d 100644 --- a/src/contracts/Repository/Values/Content/URLAlias.php +++ b/src/contracts/Repository/Values/Content/URLAlias.php @@ -13,15 +13,15 @@ /** * This class represents a url alias in the repository. * - * @property-read string $id A unique identifier for the alias - * @property-read int $type The type of the URL Alias i.e. one of URLAlias::LOCATION, URLAlias::RESOURCE, URLAlias::VIRTUAL - * @property-read mixed $destination If type = URLAlias::LOCATION it is a Location id otherwise a string (e.g. /content/search) - * @property-read string $path the alias path - * @property-read string[] $languageCodes the languages for which this alias is valid - * @property-read bool $alwaysAvailable Fallback indicator for other languages - * @property-read bool $isHistory Indicates that this alias was autogenerated for an in the meanwhile archived version of the content - * @property-read bool $isCustom If false this alias was autogenerated otherwise manuel created - * @property-read bool $forward Indicates if the url should be redirected + * @phpstan-property-read string $id A unique identifier for the alias + * @phpstan-property-read int $type The type of the URL Alias i.e. one of URLAlias::LOCATION, URLAlias::RESOURCE, URLAlias::VIRTUAL + * @phpstan-property-read mixed $destination If type = URLAlias::LOCATION it is a Location id otherwise a string (e.g. /content/search) + * @phpstan-property-read string $path the alias path + * @phpstan-property-read string[] $languageCodes the languages for which this alias is valid + * @phpstan-property-read bool $alwaysAvailable Fallback indicator for other languages + * @phpstan-property-read bool $isHistory Indicates that this alias was autogenerated for an in the meanwhile archived version of the content + * @phpstan-property-read bool $isCustom If false this alias was autogenerated otherwise manuel created + * @phpstan-property-read bool $forward Indicates if the url should be redirected */ class URLAlias extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/URLWildcard.php b/src/contracts/Repository/Values/Content/URLWildcard.php index 6a624e0808..25bf836b02 100644 --- a/src/contracts/Repository/Values/Content/URLWildcard.php +++ b/src/contracts/Repository/Values/Content/URLWildcard.php @@ -13,10 +13,10 @@ /** * This class represents a url alias in the repository. * - * @property-read mixed $id A unique identifier for the alias - * @property-read string $sourceUrl The source url with wildcards - * @property-read string $destinationUrl The destination URL with placeholders - * @property-read bool $forward indicates if the url is redirected or not + * @phpstan-property-read mixed $id A unique identifier for the alias + * @phpstan-property-read string $sourceUrl The source url with wildcards + * @phpstan-property-read string $destinationUrl The destination URL with placeholders + * @phpstan-property-read bool $forward indicates if the url is redirected or not */ class URLWildcard extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php b/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php index ccdf0e1ae0..3c96e59c7b 100644 --- a/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php +++ b/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php @@ -13,8 +13,8 @@ /** * This class represents a result of a translated url wildcard which is not an URLAlias. * - * @property-read string $uri The found resource uri - * @property-read bool $forward indicates if the url is redirected or not + * @phpstan-property-read string $uri The found resource uri + * @phpstan-property-read bool $forward indicates if the url is redirected or not */ class URLWildcardTranslationResult extends ValueObject { diff --git a/src/contracts/Repository/Values/Content/VersionInfo.php b/src/contracts/Repository/Values/Content/VersionInfo.php index f416251c89..326e0ddaab 100644 --- a/src/contracts/Repository/Values/Content/VersionInfo.php +++ b/src/contracts/Repository/Values/Content/VersionInfo.php @@ -17,14 +17,14 @@ * which the version belongs to. * * @property-read \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo calls getContentInfo() - * @property-read mixed $id the internal id of the version - * @property-read int $versionNo the version number of this version (which only increments in scope of a single Content object) - * @property-read \DateTime $modificationDate the last modified date of this version - * @property-read \DateTime $creationDate the creation date of this version - * @property-read mixed $creatorId the user id of the user which created this version - * @property-read int $status the status of this version. One of VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED - * @property-read string $initialLanguageCode the language code of the version. This value is used to flag a version as a translation to specific language - * @property-read string[] $languageCodes a collection of all languages which exist in this version. + * @phpstan-property-read mixed $id the internal id of the version + * @phpstan-property-read int $versionNo the version number of this version (which only increments in scope of a single Content object) + * @phpstan-property-read \DateTime $modificationDate the last modified date of this version + * @phpstan-property-read \DateTime $creationDate the creation date of this version + * @phpstan-property-read mixed $creatorId the user id of the user which created this version + * @phpstan-property-read int $status the status of this version. One of VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED + * @phpstan-property-read string $initialLanguageCode the language code of the version. This value is used to flag a version as a translation to specific language + * @phpstan-property-read string[] $languageCodes a collection of all languages which exist in this version. */ abstract class VersionInfo extends ValueObject implements MultiLanguageName { diff --git a/src/contracts/Repository/Values/ContentType/ContentType.php b/src/contracts/Repository/Values/ContentType/ContentType.php index 3fdf59c188..ec09ea81c6 100644 --- a/src/contracts/Repository/Values/ContentType/ContentType.php +++ b/src/contracts/Repository/Values/ContentType/ContentType.php @@ -17,22 +17,22 @@ * * @property-read \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup[] $contentTypeGroups calls getContentTypeGroups * @property-read \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCollection $fieldDefinitions calls getFieldDefinitions() or on access getFieldDefinition($fieldDefIdentifier) - * @property-read mixed $id the id of the content type - * @property-read int $status the status of the content type. One of ContentType::STATUS_DEFINED|ContentType::STATUS_DRAFT|ContentType::STATUS_MODIFIED - * @property-read string $identifier the identifier of the content type - * @property-read \DateTime $creationDate the date of the creation of this content type - * @property-read \DateTime $modificationDate the date of the last modification of this content type - * @property-read mixed $creatorId the user id of the creator of this content type - * @property-read mixed $modifierId the user id of the user which has last modified this content type - * @property-read string $remoteId a global unique id of the content object - * @property-read string $urlAliasSchema URL alias schema. If nothing is provided, $nameSchema will be used instead. - * @property-read string $nameSchema The name schema. - * @property-read bool $isContainer @deprecated use strict getter {@see ContentType::isContainer} instead. * @property-read string $mainLanguageCode the main language of the content type names and description used for fallback. - * @property-read bool $defaultAlwaysAvailable if an instance of a content type is created the always available flag is set by default this this value. - * @property-read string[] $languageCodes array of language codes used by content type translations. - * @property-read int $defaultSortField Specifies which property the child locations should be sorted on by default when created. Valid values are found at {@link Location::SORT_FIELD_*} - * @property-read int $defaultSortOrder Specifies whether the sort order should be ascending or descending by default when created. Valid values are {@link Location::SORT_ORDER_*} + * @phpstan-property-read mixed $id the id of the content type + * @phpstan-property-read int $status the status of the content type. One of ContentType::STATUS_DEFINED|ContentType::STATUS_DRAFT|ContentType::STATUS_MODIFIED + * @phpstan-property-read string $identifier the identifier of the content type + * @phpstan-property-read \DateTime $creationDate the date of the creation of this content type + * @phpstan-property-read \DateTime $modificationDate the date of the last modification of this content type + * @phpstan-property-read mixed $creatorId the user id of the creator of this content type + * @phpstan-property-read mixed $modifierId the user id of the user which has last modified this content type + * @phpstan-property-read string $remoteId a global unique id of the content object + * @phpstan-property-read string $urlAliasSchema URL alias schema. If nothing is provided, $nameSchema will be used instead. + * @phpstan-property-read string $nameSchema The name schema. + * @phpstan-property-read bool $isContainer @deprecated use strict getter {@see ContentType::isContainer} instead. + * @phpstan-property-read bool $defaultAlwaysAvailable if an instance of a content type is created the always available flag is set by default this this value. + * @phpstan-property-read string[] $languageCodes array of language codes used by content type translations. + * @phpstan-property-read int $defaultSortField Specifies which property the child locations should be sorted on by default when created. Valid values are found at {@link Location::SORT_FIELD_*} + * @phpstan-property-read int $defaultSortOrder Specifies whether the sort order should be ascending or descending by default when created. Valid values are {@link Location::SORT_ORDER_*} */ abstract class ContentType extends ValueObject implements MultiLanguageName, MultiLanguageDescription { diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php b/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php index 4d8b4e1490..a04ed9ca7b 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php @@ -15,12 +15,12 @@ /** * This class represents a content type group value. * - * @property-read mixed $id the id of the content type group - * @property-read string $identifier the identifier of the content type group - * @property-read \DateTime $creationDate the date of the creation of this content type group - * @property-read \DateTime $modificationDate the date of the last modification of this content type group - * @property-read mixed $creatorId the user id of the creator of this content type group - * @property-read mixed $modifierId the user id of the user which has last modified this content type group + * @phpstan-property-read mixed $id the id of the content type group + * @phpstan-property-read string $identifier the identifier of the content type group + * @phpstan-property-read \DateTime $creationDate the date of the creation of this content type group + * @phpstan-property-read \DateTime $modificationDate the date of the last modification of this content type group + * @phpstan-property-read mixed $creatorId the user id of the creator of this content type group + * @phpstan-property-read mixed $modifierId the user id of the user which has last modified this content type group */ abstract class ContentTypeGroup extends ValueObject implements MultiLanguageName, MultiLanguageDescription { diff --git a/src/contracts/Repository/Values/ContentType/FieldDefinition.php b/src/contracts/Repository/Values/ContentType/FieldDefinition.php index f27f93bb68..ee4ce1c088 100644 --- a/src/contracts/Repository/Values/ContentType/FieldDefinition.php +++ b/src/contracts/Repository/Values/ContentType/FieldDefinition.php @@ -17,18 +17,18 @@ * * @property-read array $fieldSettings calls getFieldSettings() * @property-read array $validatorConfiguration calls getValidatorConfiguration() - * @property-read int $id the id of the field definition - * @property-read string $identifier the identifier of the field definition - * @property-read string $fieldGroup the field group name - * @property-read int $position the position of the field definition in the content type - * @property-read string $fieldTypeIdentifier String identifier of the field type - * @property-read bool $isTranslatable indicates if fields of this definition are translatable - * @property-read bool $isRequired indicates if this field is required in the content object - * @property-read bool $isSearchable indicates if the field is searchable - * @property-read bool $isThumbnail indicates if the field can be thumbnail - * @property-read bool $isInfoCollector indicates if this field is used for information collection - * @property-read mixed $defaultValue the default value of the field - * @property-read string $mainLanguageCode main Translation (language code) of a multilingual Field Definition + * @phpstan-property-read int $id the id of the field definition + * @phpstan-property-read string $identifier the identifier of the field definition + * @phpstan-property-read string $fieldGroup the field group name + * @phpstan-property-read int $position the position of the field definition in the content type + * @phpstan-property-read string $fieldTypeIdentifier String identifier of the field type + * @phpstan-property-read bool $isTranslatable indicates if fields of this definition are translatable + * @phpstan-property-read bool $isRequired indicates if this field is required in the content object + * @phpstan-property-read bool $isSearchable indicates if the field is searchable + * @phpstan-property-read bool $isThumbnail indicates if the field can be thumbnail + * @phpstan-property-read bool $isInfoCollector indicates if this field is used for information collection + * @phpstan-property-read mixed $defaultValue the default value of the field + * @phpstan-property-read string $mainLanguageCode main Translation (language code) of a multilingual Field Definition */ abstract class FieldDefinition extends ValueObject implements MultiLanguageName, MultiLanguageDescription { diff --git a/src/contracts/Repository/Values/Notification/Notification.php b/src/contracts/Repository/Values/Notification/Notification.php index d99042b121..24643f21ff 100644 --- a/src/contracts/Repository/Values/Notification/Notification.php +++ b/src/contracts/Repository/Values/Notification/Notification.php @@ -13,12 +13,12 @@ /** * This class represents a notification value. * - * @property-read int $id The ID of notification - * @property-read int $ownerId The ID of notification owner - * @property-read bool $isPending True if notification is unreaded - * @property-read string $type Notification type - * @property-read \DateTimeInterface $created Creation date. - * @property-read array $data Optional context data + * @phpstan-property-read int $id The ID of notification + * @phpstan-property-read int $ownerId The ID of notification owner + * @phpstan-property-read bool $isPending True if notification is unreaded + * @phpstan-property-read string $type Notification type + * @phpstan-property-read \DateTimeInterface $created Creation date. + * @phpstan-property-read array $data Optional context data */ class Notification extends ValueObject { diff --git a/src/contracts/Repository/Values/ObjectState/ObjectState.php b/src/contracts/Repository/Values/ObjectState/ObjectState.php index f4c8c6e331..80c3e0dae8 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectState.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectState.php @@ -15,11 +15,11 @@ /** * This class represents a object state value. * - * @property-read mixed $id the id of the content type group - * @property-read string $identifier the identifier of the content type group - * @property-read int $priority the priority in the group ordering * @property-read string $mainLanguageCode the default language of the object state names and descriptions used for fallback. - * @property-read string[] $languageCodes the available languages + * @phpstan-property-read mixed $id the id of the content type group + * @phpstan-property-read string $identifier the identifier of the content type group + * @phpstan-property-read int $priority the priority in the group ordering + * @phpstan-property-read string[] $languageCodes the available languages */ abstract class ObjectState extends ValueObject implements MultiLanguageName, MultiLanguageDescription { diff --git a/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php b/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php index 0524cca46d..2629125c94 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php @@ -15,11 +15,11 @@ /** * This class represents an object state group value. * - * @property-read mixed $id the id of the content type group - * @property-read string $identifier the identifier of the content type group * @property-read string $mainLanguageCode the default language of the object state group names and description used for fallback. - * @property-read string $defaultLanguageCode the default language code. - * @property-read string[] $languageCodes the available languages + * @phpstan-property-read mixed $id the id of the content type group + * @phpstan-property-read string $identifier the identifier of the content type group + * @phpstan-property-read string $defaultLanguageCode the default language code. + * @phpstan-property-read string[] $languageCodes the available languages */ abstract class ObjectStateGroup extends ValueObject implements MultiLanguageName, MultiLanguageDescription { diff --git a/src/contracts/Repository/Values/Setting/Setting.php b/src/contracts/Repository/Values/Setting/Setting.php index d22d616713..46e89119c9 100644 --- a/src/contracts/Repository/Values/Setting/Setting.php +++ b/src/contracts/Repository/Values/Setting/Setting.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Repository\Values\ValueObject; /** - * @property-read string $group - * @property-read string $identifier - * @property-read mixed $value + * @phpstan-property-read string $group + * @phpstan-property-read string $identifier + * @phpstan-property-read mixed $value */ class Setting extends ValueObject { diff --git a/src/contracts/Repository/Values/User/PasswordValidationContext.php b/src/contracts/Repository/Values/User/PasswordValidationContext.php index de81c4ca0c..5baba5834d 100644 --- a/src/contracts/Repository/Values/User/PasswordValidationContext.php +++ b/src/contracts/Repository/Values/User/PasswordValidationContext.php @@ -13,8 +13,8 @@ /** * Context of the password validation. * - * @property-read \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null $contentType - * @property-read \Ibexa\Contracts\Core\Repository\Values\User\User|null $user + * @phpstan-property-read \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null $contentType + * @phpstan-property-read \Ibexa\Contracts\Core\Repository\Values\User\User|null $user */ class PasswordValidationContext extends ValueObject { diff --git a/src/contracts/Repository/Values/User/Policy.php b/src/contracts/Repository/Values/User/Policy.php index 04c4be5d5a..2e8c3fa2b5 100644 --- a/src/contracts/Repository/Values/User/Policy.php +++ b/src/contracts/Repository/Values/User/Policy.php @@ -13,11 +13,11 @@ /** * This class represents a policy value. * - * @property-read mixed $id internal id of the policy - * @property-read mixed $roleId the role id this policy belongs to - * @property-read string $module Name of module, associated with the Policy - * @property-read string $function Name of the module function Or all functions with '*' * @property-read \Ibexa\Contracts\Core\Repository\Values\User\Limitation[] $limitations an array of \Ibexa\Contracts\Core\Repository\Values\User\Limitation + * @phpstan-property-read mixed $id internal id of the policy + * @phpstan-property-read mixed $roleId the role id this policy belongs to + * @phpstan-property-read string $module Name of module, associated with the Policy + * @phpstan-property-read string $function Name of the module function Or all functions with '*' */ abstract class Policy extends ValueObject { diff --git a/src/contracts/Repository/Values/User/Role.php b/src/contracts/Repository/Values/User/Role.php index 032c2284fc..a006490dd8 100644 --- a/src/contracts/Repository/Values/User/Role.php +++ b/src/contracts/Repository/Values/User/Role.php @@ -13,9 +13,9 @@ /** * This class represents a role. * - * @property-read int $id the internal id of the role - * @property-read string $identifier the identifier of the role * @property-read \Ibexa\Contracts\Core\Repository\Values\User\Policy[] $policies an array of the policies {@link \Ibexa\Contracts\Core\Repository\Values\User\Policy} of the role. + * @phpstan-property-read int $id the internal id of the role + * @phpstan-property-read string $identifier the identifier of the role */ abstract class Role extends ValueObject { diff --git a/src/contracts/Repository/Values/User/User.php b/src/contracts/Repository/Values/User/User.php index cb970e20c0..3cc1c75b0d 100644 --- a/src/contracts/Repository/Values/User/User.php +++ b/src/contracts/Repository/Values/User/User.php @@ -13,13 +13,13 @@ /** * This class represents a user value. * - * @property-read string $login - * @property-read string $email - * @property-read string $passwordHash - * @property-read string $hashAlgorithm Hash algorithm used to hash the password - * @property-read \DateTimeInterface|null $passwordUpdatedAt - * @property-read bool $enabled User can not login if false - * @property-read int $maxLogin Max number of time user is allowed to login + * @phpstan-property-read string $login + * @phpstan-property-read string $email + * @phpstan-property-read string $passwordHash + * @phpstan-property-read string $hashAlgorithm Hash algorithm used to hash the password + * @phpstan-property-read \DateTimeInterface|null $passwordUpdatedAt + * @phpstan-property-read bool $enabled User can not login if false + * @phpstan-property-read int $maxLogin Max number of time user is allowed to login */ abstract class User extends Content implements UserReference { diff --git a/src/contracts/Repository/Values/User/UserGroup.php b/src/contracts/Repository/Values/User/UserGroup.php index f04be77fc1..43b74391ff 100644 --- a/src/contracts/Repository/Values/User/UserGroup.php +++ b/src/contracts/Repository/Values/User/UserGroup.php @@ -13,7 +13,7 @@ /** * This class represents a user group. * - * @property-read mixed $parentId + * @phpstan-property-read mixed $parentId */ abstract class UserGroup extends Content { diff --git a/src/contracts/Repository/Values/UserPreference/UserPreference.php b/src/contracts/Repository/Values/UserPreference/UserPreference.php index a3c6bb3f6c..d15ca19c92 100644 --- a/src/contracts/Repository/Values/UserPreference/UserPreference.php +++ b/src/contracts/Repository/Values/UserPreference/UserPreference.php @@ -13,8 +13,8 @@ /** * This class represents a user preference value. * - * @property-read string $name name of user preference - * @property-read string $value value of user preference + * @phpstan-property-read string $name name of user preference + * @phpstan-property-read string $value value of user preference */ class UserPreference extends ValueObject { diff --git a/src/contracts/Search/Field.php b/src/contracts/Search/Field.php index 54245d2aa6..f3835932da 100644 --- a/src/contracts/Search/Field.php +++ b/src/contracts/Search/Field.php @@ -11,9 +11,9 @@ /** * Base class for document fields. * - * @property-read $name - * @property-read $value - * @property-read $type + * @phpstan-property-read string $name + * @phpstan-property-read mixed $value + * @phpstan-property-read \Ibexa\Contracts\Core\Search\FieldType $type */ class Field extends ValueObject { diff --git a/src/contracts/Search/FieldType.php b/src/contracts/Search/FieldType.php index 5163df332c..43f18bfd04 100644 --- a/src/contracts/Search/FieldType.php +++ b/src/contracts/Search/FieldType.php @@ -11,7 +11,7 @@ /** * Base class for document field definitions. * - * @property-read string $type [deprecated] The type name of the facet, deprecated - use {@see \Ibexa\Contracts\Core\Search\FieldType::getType} instead. + * @phpstan-property-read string $type [deprecated] The type name of the facet, deprecated - use {@see \Ibexa\Contracts\Core\Search\FieldType::getType} instead. */ abstract class FieldType extends ValueObject { diff --git a/src/contracts/Variation/Values/ImageVariation.php b/src/contracts/Variation/Values/ImageVariation.php index 980808f723..709682502a 100644 --- a/src/contracts/Variation/Values/ImageVariation.php +++ b/src/contracts/Variation/Values/ImageVariation.php @@ -7,11 +7,11 @@ namespace Ibexa\Contracts\Core\Variation\Values; /** - * @property-read int|null $width The width as number of pixels (for example "320") - * @property-read int|null $height The height as number of pixels (for example "256") - * @property-read string $name The name of the image alias (for example "original") - * @property-read mixed $info Extra information about the image, depending on the image type - * @property-read mixed $imageId + * @phpstan-property-read int|null $width The width as number of pixels (for example "320") + * @phpstan-property-read int|null $height The height as number of pixels (for example "256") + * @phpstan-property-read string $name The name of the image alias (for example "original") + * @phpstan-property-read mixed $info Extra information about the image, depending on the image type + * @phpstan-property-read mixed $imageId */ class ImageVariation extends Variation { diff --git a/src/contracts/Variation/Values/Variation.php b/src/contracts/Variation/Values/Variation.php index ec373e1890..352f11e120 100644 --- a/src/contracts/Variation/Values/Variation.php +++ b/src/contracts/Variation/Values/Variation.php @@ -11,12 +11,12 @@ /** * Base class for file variations (i.e. image aliases). * - * @property-read int $fileSize Number of bytes for current variation - * @property-read string $mimeType The MIME type (for example "image/png") - * @property-read string $fileName The name of the file (for example "my_image.png") - * @property-read string $dirPath The path to the file (for example "var/storage/images/test/199-2-eng-GB") - * @property-read string $uri Complete path + name of image file (for example "var/storage/images/test/199-2-eng-GB/apple.png") - * @property-read \DateTime $lastModified When the variation was last modified + * @phpstan-property-read int $fileSize Number of bytes for current variation + * @phpstan-property-read string $mimeType The MIME type (for example "image/png") + * @phpstan-property-read string $fileName The name of the file (for example "my_image.png") + * @phpstan-property-read string $dirPath The path to the file (for example "var/storage/images/test/199-2-eng-GB") + * @phpstan-property-read string $uri Complete path + name of image file (for example "var/storage/images/test/199-2-eng-GB/apple.png") + * @phpstan-property-read \DateTime $lastModified When the variation was last modified */ class Variation extends ValueObject {