Skip to content

Commit 63dac90

Browse files
committed
[PHPDoc] Aligned PHPDoc after applying return type Rector
1 parent 6a17e24 commit 63dac90

File tree

8 files changed

+8
-35
lines changed

8 files changed

+8
-35
lines changed

src/lib/FieldType/Author/Type.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*
2222
* Field type representing a list of authors, consisting of author name, and
2323
* author email.
24+
*
25+
* @phpstan-type TAuthorHash list<array{id: int, name: string, email:string}>
2426
*/
2527
class Type extends FieldType implements TranslationContainerInterface
2628
{
@@ -123,9 +125,9 @@ protected function getSortInfo(BaseValue $value)
123125
}
124126

125127
/**
126-
* Converts an $hash to the Value defined by the field type.
128+
* Converts a $hash to the Value defined by the field type.
127129
*
128-
* @param mixed $hash
130+
* @phpstan-param TAuthorHash $hash
129131
*
130132
* @return \Ibexa\Core\FieldType\Author\Value $value
131133
*/
@@ -146,7 +148,7 @@ static function ($author) {
146148
*
147149
* @param \Ibexa\Core\FieldType\Author\Value $value
148150
*
149-
* @return mixed
151+
* @phpstan-return TAuthorHash
150152
*/
151153
public function toHash(SPIValue $value): array
152154
{

src/lib/FieldType/Url/UrlStorage.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ public function __construct(StorageGatewayInterface $gateway, LoggerInterface $l
3636
$this->logger = $logger;
3737
}
3838

39-
/**
40-
* @see \Ibexa\Contracts\Core\FieldType\FieldStorage
41-
*
42-
* @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo
43-
* @param \Ibexa\Contracts\Core\Persistence\Content\Field $field
44-
* @param array $context
45-
*
46-
* @return bool|mixed
47-
*/
4839
public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context): bool
4940
{
5041
$url = $field->value->externalData;

src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function getUrlIdMap(array $urls)
9999
*
100100
* @param string $url The URL to insert in the database
101101
*
102-
* @return string
102+
* @throws \Doctrine\DBAL\Exception
103103
*/
104104
public function insertUrl($url): int
105105
{

src/lib/Limitation/LocationLimitationType.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,6 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren
224224
return new Criterion\LocationId($value->limitationValues);
225225
}
226226

227-
/**
228-
* Returns info on valid $limitationValues.
229-
*
230-
* @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name
231-
* of that option, in case of int on of VALUE_SCHEMA_ constants.
232-
*/
233227
public function valueSchema(): int
234228
{
235229
return self::VALUE_SCHEMA_LOCATION_ID;

src/lib/Limitation/SubtreeLimitationType.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,6 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren
258258
return new PermissionSubtree($value->limitationValues);
259259
}
260260

261-
/**
262-
* Returns info on valid $limitationValues.
263-
*
264-
* @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name
265-
* of that option, in case of int on of VALUE_SCHEMA_ constants.
266-
*/
267261
public function valueSchema(): int
268262
{
269263
return self::VALUE_SCHEMA_LOCATION_PATH;

src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ public static function create()
3333
}
3434

3535
/**
36-
* Converts data from $value to $storageFieldValue.
37-
*
38-
* @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value
39-
* @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue
36+
* @throws \DOMException
37+
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
4038
*/
4139
public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue)
4240
{

src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin
8686
* Returns the name of the index column the datatype uses, which is either
8787
* "sort_key_int" or "sort_key_string". This column is then used for
8888
* filtering and sorting for this type.
89-
*
90-
* @return string
9189
*/
9290
public function getIndexColumn(): bool
9391
{

src/lib/Search/Common/FieldValueMapper/PriceMapper.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ public function canMap(Field $field): bool
2323

2424
/**
2525
* Map field value to a proper search engine representation.
26-
*
27-
* @param \Ibexa\Contracts\Core\Search\Field $field
28-
*
29-
* @return mixed
3026
*/
3127
public function map(Field $field): float
3228
{

0 commit comments

Comments
 (0)