Skip to content

Commit

Permalink
Remove redundant PHPDoc blocks that are identical to the code
Browse files Browse the repository at this point in the history
Thanks to strict types and a recent MediaWiki CodeSniffer update a
lot of the PHPDoc comments in this codebase became redundant. Only
very few comments in this codebase contain additional information.
Such comments don't add any new information to what the code alone
already says. We started removing them in many other codebases
already.

In case someone wants to add more documentation to a method the
basic PHPDoc block can usually automatically be generated with a
button press in the IDE.

The only additional change in this patch is that I occasionally
add a missing `void` return type. This is necessary to be able to
remove the comment.

Change-Id: Id7d6d6a437175a9d017f564daf7ed16e76f09158
  • Loading branch information
thiemowmde committed Dec 19, 2023
1 parent 0161955 commit d1383ca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/Parsoid/Poem.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ public function getConfig(): array {
];
}

/**
* @param ?ParsoidExtensionAPI $extApi
*/
public function __construct( ?ParsoidExtensionAPI $extApi = null ) {
/* @phan-suppress-previous-line PhanEmptyPublicMethod */
/* The dom post processor doesn't need to use $extApi, so ignore it */
Expand Down
3 changes: 0 additions & 3 deletions src/Parsoid/PoemProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ public function wtPostprocess(
}
}

/**
* @param Element $node
*/
private function processNowikis( Element $node ): void {
$doc = $node->ownerDocument;
$c = $node->firstChild;
Expand Down

0 comments on commit d1383ca

Please sign in to comment.