aboutsummaryrefslogtreecommitdiffstats
path: root/includes/parser
diff options
context:
space:
mode:
authorthiemowmde <thiemo.kreuz@wikimedia.de>2025-01-16 14:24:44 +0100
committerthiemowmde <thiemo.kreuz@wikimedia.de>2025-01-16 14:24:44 +0100
commit659df897ea828bba243ca9879875870c35e7bb03 (patch)
treee7ed15e123fc3c70933b356b8ae55d9998a6fb57 /includes/parser
parenta9d4d54f74d224cb068510c7715dbfa1ad46123d (diff)
downloadmediawikicore-659df897ea828bba243ca9879875870c35e7bb03.tar.gz
mediawikicore-659df897ea828bba243ca9879875870c35e7bb03.zip
Remove trivial 1-line PHPDocs that just repeat the code
I assume these are all either auto-generated by an IDE or the language-level type declarations have been added later. In any case the comments don't add any new information to what the code already says. This is just extra clutter that makes the code harder to read, I would argue. There are many, many more comments like this. In this patch I intentionally focus on the most trivial 1-line comments. Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
Diffstat (limited to 'includes/parser')
-rw-r--r--includes/parser/ParserObserver.php3
-rw-r--r--includes/parser/Parsoid/Config/PageConfig.php3
-rw-r--r--includes/parser/Parsoid/Config/PageContent.php3
-rw-r--r--includes/parser/Parsoid/Config/SiteConfig.php1
-rw-r--r--includes/parser/Parsoid/HtmlToContentTransform.php24
-rw-r--r--includes/parser/Parsoid/ParsoidServices.php3
6 files changed, 0 insertions, 37 deletions
diff --git a/includes/parser/ParserObserver.php b/includes/parser/ParserObserver.php
index 7655641b0132..bb28e0d073bf 100644
--- a/includes/parser/ParserObserver.php
+++ b/includes/parser/ParserObserver.php
@@ -49,9 +49,6 @@ class ParserObserver {
private MapCacheLRU $previousParseStackTraces;
- /**
- * @param LoggerInterface $logger
- */
public function __construct( LoggerInterface $logger ) {
$this->logger = $logger;
$this->previousParseStackTraces = new MapCacheLRU( 10 );
diff --git a/includes/parser/Parsoid/Config/PageConfig.php b/includes/parser/Parsoid/Config/PageConfig.php
index f99028e0911a..c57227813b18 100644
--- a/includes/parser/Parsoid/Config/PageConfig.php
+++ b/includes/parser/Parsoid/Config/PageConfig.php
@@ -134,9 +134,6 @@ class PageConfig extends IPageConfig {
return $stuff['revision-record'] ?? null;
}
- /**
- * @return ?RevisionRecord
- */
private function getRevision(): ?RevisionRecord {
return $this->revision;
}
diff --git a/includes/parser/Parsoid/Config/PageContent.php b/includes/parser/Parsoid/Config/PageContent.php
index 2ed56384b37f..fca23ae2fc77 100644
--- a/includes/parser/Parsoid/Config/PageContent.php
+++ b/includes/parser/Parsoid/Config/PageContent.php
@@ -31,9 +31,6 @@ use Wikimedia\Parsoid\Config\PageContent as IPageContent;
class PageContent extends IPageContent {
private RevisionRecord $rev;
- /**
- * @param RevisionRecord $rev
- */
public function __construct( RevisionRecord $rev ) {
$this->rev = $rev;
}
diff --git a/includes/parser/Parsoid/Config/SiteConfig.php b/includes/parser/Parsoid/Config/SiteConfig.php
index be6964a6b240..6fb3fb5cbbbc 100644
--- a/includes/parser/Parsoid/Config/SiteConfig.php
+++ b/includes/parser/Parsoid/Config/SiteConfig.php
@@ -807,7 +807,6 @@ class SiteConfig extends ISiteConfig {
return $this->config->get( MainConfigNames::UrlProtocols );
}
- /** @return array */
public function getNoFollowConfig(): array {
return [
'nofollow' => $this->config->get( MainConfigNames::NoFollowLinks ),
diff --git a/includes/parser/Parsoid/HtmlToContentTransform.php b/includes/parser/Parsoid/HtmlToContentTransform.php
index ad48d2c85055..1ab61ee213da 100644
--- a/includes/parser/Parsoid/HtmlToContentTransform.php
+++ b/includes/parser/Parsoid/HtmlToContentTransform.php
@@ -106,9 +106,6 @@ class HtmlToContentTransform {
$this->options = $options;
}
- /**
- * @param RevisionRecord $rev
- */
public function setOriginalRevision( RevisionRecord $rev ): void {
if ( $this->pageConfig ) {
throw new LogicException( 'Cannot set revision after using the PageConfig' );
@@ -121,9 +118,6 @@ class HtmlToContentTransform {
$this->oldid = $rev->getId();
}
- /**
- * @param int $oldid
- */
public function setOriginalRevisionId( int $oldid ): void {
if ( $this->pageConfig ) {
throw new LogicException( 'Cannot set revision ID after using the PageConfig' );
@@ -135,9 +129,6 @@ class HtmlToContentTransform {
$this->oldid = $oldid;
}
- /**
- * @param Bcp47Code $lang
- */
public function setContentLanguage( Bcp47Code $lang ): void {
if ( $this->pageConfig ) {
throw new LogicException( 'Cannot set content language after using the PageConfig' );
@@ -199,16 +190,10 @@ class HtmlToContentTransform {
$this->modifiedPageBundle->mw = $modifiedDataMW;
}
- /**
- * @param string $originalSchemaVeraion
- */
public function setOriginalSchemaVersion( string $originalSchemaVeraion ): void {
$this->originalPageBundle->version = $originalSchemaVeraion;
}
- /**
- * @param string $originalHtml
- */
public function setOriginalHtml( string $originalHtml ): void {
if ( $this->doc ) {
throw new LogicException( __FUNCTION__ . ' cannot be called after' .
@@ -218,9 +203,6 @@ class HtmlToContentTransform {
$this->originalPageBundle->html = $originalHtml;
}
- /**
- * @param array $originalDataMW
- */
public function setOriginalDataMW( array $originalDataMW ): void {
if ( $this->doc ) {
throw new LogicException( __FUNCTION__ . ' cannot be called after getModifiedDocument()' );
@@ -235,9 +217,6 @@ class HtmlToContentTransform {
}
}
- /**
- * @param array $originalDataParsoid
- */
public function setOriginalDataParsoid( array $originalDataParsoid ): void {
if ( $this->doc ) {
throw new LogicException( __FUNCTION__ . ' cannot be called after getModifiedDocument()' );
@@ -248,9 +227,6 @@ class HtmlToContentTransform {
$this->modifiedPageBundle->parsoid = $originalDataParsoid;
}
- /**
- * @return PageConfig
- */
private function getPageConfig(): PageConfig {
if ( !$this->pageConfig ) {
diff --git a/includes/parser/Parsoid/ParsoidServices.php b/includes/parser/Parsoid/ParsoidServices.php
index 0c4c4a647617..626146a0de06 100644
--- a/includes/parser/Parsoid/ParsoidServices.php
+++ b/includes/parser/Parsoid/ParsoidServices.php
@@ -34,9 +34,6 @@ use Wikimedia\Parsoid\Config\SiteConfig;
class ParsoidServices {
private MediaWikiServices $services;
- /**
- * @param MediaWikiServices $services
- */
public function __construct( MediaWikiServices $services ) {
$this->services = $services;
}