Skip to content

Commit 4cb7de5

Browse files
authored
IBX-4929: Fixed PHPDoc syntax issues (#226)
1 parent d7df502 commit 4cb7de5

File tree

8 files changed

+70
-49
lines changed

8 files changed

+70
-49
lines changed

src/contracts/Persistence/Content/Relation.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ class Relation extends ValueObject
5151
/**
5252
* Type bitmask.
5353
*
54-
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::COMMON,
55-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED,
56-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK,
57-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD
58-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::ASSET
54+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::COMMON
55+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED
56+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK
57+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD
58+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::ASSET
5959
*
6060
* @var int
6161
*/

src/contracts/Persistence/Content/Relation/CreateStruct.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ class CreateStruct extends ValueObject
4444
/**
4545
* Type bitmask.
4646
*
47-
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::COMMON,
48-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED,
49-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK,
50-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD
47+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::COMMON
48+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED
49+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK
50+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD
5151
*
5252
* @var int
5353
*/

src/contracts/Repository/Repository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ interface Repository
2727
*
2828
* @template T
2929
*
30-
* @param callable(\Ibexa\Contracts\Core\Repository\Repository): T $callback
30+
* @phpstan-param callable(\Ibexa\Contracts\Core\Repository\Repository): T $callback
31+
*
3132
* @param \Ibexa\Contracts\Core\Repository\Repository|null $outerRepository Optional, mostly
3233
* for internal use but allows to specify Repository to pass to closure.
3334
*

src/contracts/Repository/RoleService.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface RoleService
2828
/**
2929
* Creates a new RoleDraft.
3030
*
31-
* @since 6.0
31+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
3232
*
3333
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleCreateStruct $roleCreateStruct
3434
*
@@ -44,7 +44,7 @@ public function createRole(RoleCreateStruct $roleCreateStruct): RoleDraft;
4444
/**
4545
* Creates a new RoleDraft for existing Role.
4646
*
47-
* @since 6.0
47+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
4848
*
4949
* @param \Ibexa\Contracts\Core\Repository\Values\User\Role $role
5050
*
@@ -59,7 +59,7 @@ public function createRoleDraft(Role $role): RoleDraft;
5959
/**
6060
* Copies an existing Role.
6161
*
62-
* @since eZ Platform 3.0
62+
* @since 3.0 eZ Platform 3.0 (ezplatform-kernel 1.0)
6363
*
6464
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to copy a role
6565
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if the name of the role already exists or if limitation of the same type
@@ -73,7 +73,7 @@ public function copyRole(Role $role, RoleCopyStruct $roleCopyStruct): Role;
7373
/**
7474
* Loads a RoleDraft for the given id.
7575
*
76-
* @since 6.0
76+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
7777
*
7878
* @param int $id
7979
*
@@ -99,7 +99,7 @@ public function loadRoleDraftByRoleId(int $roleId): RoleDraft;
9999
/**
100100
* Updates the properties of a RoleDraft.
101101
*
102-
* @since 6.0
102+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
103103
*
104104
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft $roleDraft
105105
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleUpdateStruct $roleUpdateStruct
@@ -114,7 +114,7 @@ public function updateRoleDraft(RoleDraft $roleDraft, RoleUpdateStruct $roleUpda
114114
/**
115115
* Adds a new policy to the RoleDraft.
116116
*
117-
* @since 6.0
117+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
118118
*
119119
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft $roleDraft
120120
* @param \Ibexa\Contracts\Core\Repository\Values\User\PolicyCreateStruct $policyCreateStruct
@@ -131,7 +131,7 @@ public function addPolicyByRoleDraft(RoleDraft $roleDraft, PolicyCreateStruct $p
131131
/**
132132
* Removes a policy from a RoleDraft.
133133
*
134-
* @since 6.0
134+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
135135
*
136136
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft $roleDraft
137137
* @param \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft $policyDraft the policy to remove from the RoleDraft
@@ -147,7 +147,7 @@ public function removePolicyByRoleDraft(RoleDraft $roleDraft, PolicyDraft $polic
147147
* Updates the limitations of a policy. The module and function cannot be changed and
148148
* the limitations are replaced by the ones in $roleUpdateStruct.
149149
*
150-
* @since 6.0
150+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
151151
*
152152
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft $roleDraft
153153
* @param \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft $policy
@@ -169,7 +169,7 @@ public function updatePolicyByRoleDraft(
169169
/**
170170
* Deletes the given RoleDraft.
171171
*
172-
* @since 6.0
172+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
173173
*
174174
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft $roleDraft
175175
*
@@ -180,7 +180,7 @@ public function deleteRoleDraft(RoleDraft $roleDraft): void;
180180
/**
181181
* Publishes the given RoleDraft.
182182
*
183-
* @since 6.0
183+
* @since 1.0 eZ Platform 1.0 (ezpublish-kernel 6.0)
184184
*
185185
* @param \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft $roleDraft
186186
*

src/contracts/Repository/SearchService.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface SearchService
2626
* When this is supported you can expect search engine to populate SearchHit->score and SearchResult->maxScore
2727
* properties as well as sort by this if no sort clauses are specified.
2828
*
29-
* @since 6.12 (constant added in 6.7.6 and up)
29+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12) (constant added in 6.7.6 and up)
3030
*/
3131
public const CAPABILITY_SCORING = 1;
3232

@@ -40,7 +40,7 @@ interface SearchService
4040
* - Some of the faceting features are still work in progress in API and won't be further matured before in 7 .x
4141
* releases
4242
*
43-
* @since 6.12 (constant added in 6.7.6 and up)
43+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12) (constant added in 6.7.6 and up)
4444
*/
4545
public const CAPABILITY_FACETS = 2;
4646

@@ -52,7 +52,7 @@ interface SearchService
5252
* allow you on some search criteria to specify this custom field to rather query on that instead of the default
5353
* field generated by the system.
5454
*
55-
* @since 6.12 (constant added in 6.7.6 and up)
55+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12) (constant added in 6.7.6 and up)
5656
*/
5757
public const CAPABILITY_CUSTOM_FIELDS = 4;
5858

@@ -65,7 +65,7 @@ interface SearchService
6565
* interact with FullText criterion (singular) which is the most relevant here. Also given how FullText can be part of a more complex criteria it
6666
* might imply a need to more strictly define where users are supposed to place FullText vs other criteria.
6767
*
68-
* @since 6.12 (constant added in 6.7.6 and up)
68+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12) (constant added in 6.7.6 and up)
6969
*/
7070
public const CAPABILITY_SPELLCHECK = 8;
7171

@@ -83,7 +83,7 @@ interface SearchService
8383
* was matched and leave it to field type to render result with that info taking into account. But for now it is
8484
* designed as simple string field, so should be string with for instance `<mark>` around matched text.
8585
*
86-
* @since 6.12 (constant added in 6.7.6 and up)
86+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12) (constant added in 6.7.6 and up)
8787
*/
8888
public const CAPABILITY_HIGHLIGHT = 16;
8989

@@ -93,7 +93,7 @@ interface SearchService
9393
* WARNING: This feature is considered experimental given it is not completely clear what it is supposed to do. Feature
9494
* might be deprecated in the future.
9595
*
96-
* @since 6.12 (constant added in 6.7.6 and up)
96+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12) (constant added in 6.7.6 and up)
9797
*/
9898
public const CAPABILITY_SUGGEST = 32;
9999

@@ -102,15 +102,15 @@ interface SearchService
102102
*
103103
* Advance full text is a feature making to possible by current engine to parse advance full text expressions.
104104
*
105-
* @since 6.12 (constant added in 6.7.6 and up)
105+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12) (constant added in 6.7.6 and up)
106106
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\FullText
107107
*/
108108
public const CAPABILITY_ADVANCED_FULLTEXT = 64;
109109

110110
/**
111111
* Capability flag for aggregation feature for use with {@see ::supports()}.
112112
*
113-
* @since eZ Platform 3.2
113+
* @since 3.2 eZ Platform 3.2 (ezplatform-kernel 1.2)
114114
*/
115115
public const CAPABILITY_AGGREGATIONS = 128;
116116

@@ -137,7 +137,7 @@ public function findContent(Query $query, array $languageFilter = [], bool $filt
137137
* it can be more efficient for use cases where you don't need the full Content. Also including use cases
138138
* where content will be loaded by separate code, like an ESI based sub requests that takes content ID as input.
139139
*
140-
* @since 5.4.5
140+
* @since 0.5.4.5 eZ Publish 5.4 (ezpublish-kernel 5.4)
141141
*
142142
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if query is not valid
143143
*
@@ -198,7 +198,7 @@ public function findLocations(LocationQuery $query, array $languageFilter = [],
198198
*
199199
* Will return false if search engine does not implement {@see \Ibexa\Contracts\Core\Search\Capable}.
200200
*
201-
* @since 6.12
201+
* @since 1.12 eZ Platform 1.12 (ezpublish-kernel 6.12)
202202
*
203203
* @param int $capabilityFlag One of CAPABILITY_* constants.
204204
*

src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
/**
1212
* This class is used by Criteria to describe which operators they support.
1313
*
14-
* Instances of this class are returned in an array by the {@see Criterion::getSpecifications()} method
14+
* Instances of this class are returned in an array by the Criterion::getSpecifications() method
15+
*
16+
* @see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion::getSpecifications()
1517
*/
1618
class Specifications
1719
{
18-
/**
19-
* Criterion input type description constants.
20-
*/
20+
/** Criterion input type description constants: single. */
2121
public const FORMAT_SINGLE = 1;
22+
/** Criterion input type description constants: array. */
2223
public const FORMAT_ARRAY = 2;
2324

24-
/**
25-
* Criterion input value type description constants.
26-
* Used by {@see getDescription()} to say which type of values an operator expects.
27-
*/
25+
/** Criterion input value type description constants: integer. */
2826
public const TYPE_INTEGER = 1;
27+
/** Criterion input value type description constants: string. */
2928
public const TYPE_STRING = 2;
29+
/** Criterion input value type description constants: boolean. */
3030
public const TYPE_BOOLEAN = 4;
3131

3232
/**
@@ -35,10 +35,13 @@ class Specifications
3535
public $operator;
3636

3737
/**
38-
* Format supported for the Criterion value, either {@see self::FORMAT_SINGLE} for single
39-
* or {@see self::FORMAT_ARRAY} for multiple.
38+
* Format supported for the Criterion value.
39+
*
40+
* Either {@see Specifications::FORMAT_SINGLE} for single
41+
* or {@see Specifications::FORMAT_ARRAY} for multiple.
4042
*
41-
* @see self::FORMAT_*
43+
* @see Specifications::FORMAT_SINGLE
44+
* @see Specifications::FORMAT_ARRAY
4245
*
4346
* @var int
4447
*/
@@ -47,7 +50,9 @@ class Specifications
4750
/**
4851
* Accepted values types, specifying what type of variables are accepted as a value.
4952
*
50-
* @see self::TYPE_*
53+
* @see Specifications::TYPE_INTEGER
54+
* @see Specifications::TYPE_STRING
55+
* @see Specifications::TYPE_BOOLEAN
5156
*
5257
* @var int
5358
*/
@@ -56,20 +61,29 @@ class Specifications
5661
/**
5762
* Limitation on the number of items as the value.
5863
*
59-
* Only usable if {@see $valueFormat} is {@see self::FORMAT_ARRAY}.
64+
* Only usable if {@see Specifications::$valueFormat} is {@see Specifications::FORMAT_ARRAY}.
6065
* Not setting it means that 1...n will be required
6166
*
67+
* @see Specifications::$valueFormat
68+
* @see Specifications::FORMAT_ARRAY
69+
*
6270
* @var int
6371
*/
6472
public $valueCount;
6573

6674
/**
6775
* Creates a new Specifications object.
6876
*
69-
* @param string $operator The specified operator, as one of the Operator::* constants
70-
* @param int $valueFormat The accepted value format, either {@see self::FORMAT_ARRAY} or {@see self::FORMAT_SINGLE}
71-
* @param int $valueTypes The supported value types, as a bit field of the {@see self::TYPE_*} constants
72-
* @param int $valueCount The required number of values, when the accepted format is {@see self::FORMAT_ARRAY}
77+
* @param string $operator The specified operator, as one of the {@see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator}::* constants
78+
* @param int $valueFormat The accepted value format, either {@see Specifications::FORMAT_ARRAY} or {@see Specifications::FORMAT_SINGLE}
79+
* @param int $valueTypes The supported value types, as a bit field of the self::TYPE_* constants
80+
* @param int $valueCount The required number of values, when the accepted format is {@see Specifications::FORMAT_ARRAY}
81+
*
82+
* @see Specifications::FORMAT_SINGLE
83+
* @see Specifications::FORMAT_ARRAY
84+
* @see Specifications::TYPE_INTEGER
85+
* @see Specifications::TYPE_STRING
86+
* @see Specifications::TYPE_BOOLEAN
7387
*/
7488
public function __construct(string $operator, int $valueFormat, ?int $valueTypes = null, ?int $valueCount = null)
7589
{

src/contracts/Repository/Values/Content/Relation.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ abstract public function getDestinationContentInfo(): ContentInfo;
8989
/**
9090
* The relation type bitmask.
9191
*
92-
* @see Relation::COMMON, Relation::EMBED, Relation::LINK, Relation::FIELD, Relation::ASSET
92+
* @see Relation::COMMON
93+
* @see Relation::EMBED
94+
* @see Relation::LINK
95+
* @see Relation::FIELD
96+
* @see Relation::ASSET
9397
*
9498
* @var int
9599
*/

src/lib/Pagination/Pagerfanta/SearchResultAdapter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
use Pagerfanta\Adapter\AdapterInterface;
1313

1414
/**
15-
* Contract for {@see \Ibexa\Contracts\Core\Repository\SearchService} based adapters.
15+
* Contract for SearchService based adapters.
16+
*
17+
* @see \Ibexa\Contracts\Core\Repository\SearchService
1618
*/
1719
interface SearchResultAdapter extends AdapterInterface
1820
{

0 commit comments

Comments
 (0)