Skip to content

Commit 1430235

Browse files
thiemowmdeWMDE bot
authored andcommitted
Remove obsolete PHPDoc tags that don't add new information
Maybe these PHPDocs are from a time where our PHPCS rule set forced us to add documentation, even if there was nothing to say? Or these comments are from a time before we have been able to add all these language-level type declarations? In any case, these comments just repeat what the code already says. They don't add any new information. There are many more comments like this. This patch was made with a regex and focusses on shorter 1- and 2-line comments. I don#t want to make the patch any bigger to keep it in a state where it can still be reviewed. Change-Id: I36a0e3e0bff2e946f1104bcb29ad725000e90366
1 parent 385aed7 commit 1430235

File tree

6 files changed

+0
-24
lines changed

6 files changed

+0
-24
lines changed

src/Entity/EntityIdValue.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,13 @@ public function __construct( EntityId $entityId ) {
2323
$this->entityId = $entityId;
2424
}
2525

26-
/**
27-
* @return string
28-
*/
2926
public function getHash(): string {
3027
return md5( $this->getSerializationForHash() );
3128
}
3229

3330
/**
3431
* The serialization to use for hashing, for compatibility reasons this is
3532
* equivalent to the old (pre 7.4) PHP serialization.
36-
*
37-
* @return string
3833
*/
3934
public function getSerializationForHash(): string {
4035
$data = $this->entityId->getSerialization();

src/Snak/PropertyValueSnak.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ public function getDataValue() {
5050
/**
5151
* The serialization to use for hashing, for compatibility reasons this is
5252
* equivalent to the old (pre 7.4) PHP serialization.
53-
*
54-
* @return string
5553
*/
5654
public function getSerializationForHash(): string {
5755
$propertyIdSerialization = $this->propertyId->getSerialization();
@@ -65,8 +63,6 @@ public function getSerializationForHash(): string {
6563
/**
6664
* The serialization to use for hashing, for compatibility reasons this is
6765
* equivalent to the old (pre 7.4) PHP serialization.
68-
*
69-
* @return string
7066
*/
7167
private function getDataValueSerializationForHash(): string {
7268
if ( method_exists( $this->dataValue, 'getSerializationForHash' ) ) {

src/Snak/SnakObject.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,13 @@ public function getPropertyId() {
6767
return $this->propertyId;
6868
}
6969

70-
/**
71-
* @return string
72-
*/
7370
public function getHash(): string {
7471
return sha1( $this->getSerializationForHash() );
7572
}
7673

7774
/**
7875
* The serialization to use for hashing, for compatibility reasons this is
7976
* equivalent to the old (pre 7.4) PHP serialization.
80-
*
81-
* @return string
8277
*/
8378
public function getSerializationForHash(): string {
8479
$data = $this->serialize();

src/Statement/StatementList.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ class StatementList implements IteratorAggregate, Countable {
3737
*/
3838
private $statements;
3939

40-
/**
41-
* @param Statement ...$statements
42-
*/
4340
public function __construct( Statement ...$statements ) {
4441
$this->statements = $statements;
4542
}
@@ -310,9 +307,6 @@ private function statementsEqual( array $statements ): bool {
310307
return true;
311308
}
312309

313-
/**
314-
* @return bool
315-
*/
316310
public function isEmpty(): bool {
317311
return $this->statements === [];
318312
}

src/Term/AliasGroupList.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ public function removeByLanguage( $languageCode ) {
104104
/**
105105
* If the group is empty, it will not be stored.
106106
* In case the language of that group had an associated group, that group will be removed.
107-
*
108-
* @param AliasGroup $group
109107
*/
110108
public function setGroup( AliasGroup $group ) {
111109
if ( $group->isEmpty() ) {

src/Term/TermList.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ public function hasTermForLanguage( $languageCode ) {
107107

108108
/**
109109
* Replaces non-empty or removes empty terms.
110-
*
111-
* @param Term $term
112110
*/
113111
public function setTerm( Term $term ) {
114112
if ( $term->getText() === '' ) {

0 commit comments

Comments
 (0)