Skip to content

Commit 6c48746

Browse files
coddersWMDE bot
authored andcommitted
Replace phpdoc types with type annotations for private members
Change Iece78d81c33f9ac8d50b8e2d7bb9f9a06d2f11a4 introduced type annotations for some private class properties to quiet a PHPCS sniff (MissingDocumentationPrivate). Since mediawiki-codesniffer v41 (T325201), the FunctionComment and Cleanup PropertyDocumentation sniffs are more lenient about allowing missing doc comments as long as information is provided by static type. Replace the phpdoc annotations with static types. Bug: T330644 Change-Id: I421284245c289208a209acfbd710491dacaf8cbc
1 parent a06dd8a commit 6c48746

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/Deserializers/StatementDeserializer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
*/
2323
class StatementDeserializer implements DispatchableDeserializer {
2424

25-
/** @var array */
26-
private static $rankIds = [
25+
private static array $rankIds = [
2726
'deprecated' => Statement::RANK_DEPRECATED,
2827
'normal' => Statement::RANK_NORMAL,
2928
'preferred' => Statement::RANK_PREFERRED,

src/Serializers/StatementSerializer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
*/
1919
class StatementSerializer implements DispatchableSerializer {
2020

21-
/** @var array */
22-
private $rankLabels = [
21+
private array $rankLabels = [
2322
Statement::RANK_DEPRECATED => 'deprecated',
2423
Statement::RANK_NORMAL => 'normal',
2524
Statement::RANK_PREFERRED => 'preferred',

0 commit comments

Comments
 (0)