diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2023-07-31 22:40:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2023-07-31 22:40:35 +0000 |
commit | eaf4a8f585c69ab2df699dc957920bb293f74344 (patch) | |
tree | 1e4d2f4548b59a3f9da9907c218e9330c0464f94 /includes/content | |
parent | 24ed522a1828d063878663c93ce9cc4225512870 (diff) | |
parent | f549005179e71526a90a5ea2e2f8258f74018059 (diff) | |
download | mediawikicore-eaf4a8f585c69ab2df699dc957920bb293f74344.tar.gz mediawikicore-eaf4a8f585c69ab2df699dc957920bb293f74344.zip |
Merge "content,maintenance: Use class-string<ClassName> in doc blocks"
Diffstat (limited to 'includes/content')
-rw-r--r-- | includes/content/CodeContentHandler.php | 6 | ||||
-rw-r--r-- | includes/content/ContentHandler.php | 2 | ||||
-rw-r--r-- | includes/content/CssContentHandler.php | 3 | ||||
-rw-r--r-- | includes/content/JavaScriptContentHandler.php | 2 | ||||
-rw-r--r-- | includes/content/JsonContentHandler.php | 2 | ||||
-rw-r--r-- | includes/content/TextContentHandler.php | 2 | ||||
-rw-r--r-- | includes/content/WikitextContentHandler.php | 3 |
7 files changed, 11 insertions, 9 deletions
diff --git a/includes/content/CodeContentHandler.php b/includes/content/CodeContentHandler.php index fcbadeed0662..8c94d95a396e 100644 --- a/includes/content/CodeContentHandler.php +++ b/includes/content/CodeContentHandler.php @@ -65,11 +65,7 @@ abstract class CodeContentHandler extends TextContentHandler { return MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( 'en' ); } - /** - * @stable to override - * - * @return string - */ + /** @inheritDoc */ protected function getContentClass() { throw new LogicException( 'Subclass must override' ); } diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 9bf1d2615a93..e5b2f4b4e471 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -846,7 +846,7 @@ abstract class ContentHandler { * @stable to override * @since 1.21 * - * @return string + * @return class-string<DifferenceEngine> */ protected function getDiffEngineClass() { return DifferenceEngine::class; diff --git a/includes/content/CssContentHandler.php b/includes/content/CssContentHandler.php index 9eda3282e094..ee112b28e75e 100644 --- a/includes/content/CssContentHandler.php +++ b/includes/content/CssContentHandler.php @@ -44,6 +44,9 @@ class CssContentHandler extends CodeContentHandler { parent::__construct( $modelId, [ CONTENT_FORMAT_CSS ] ); } + /** + * @return class-string<CssContent> + */ protected function getContentClass() { return CssContent::class; } diff --git a/includes/content/JavaScriptContentHandler.php b/includes/content/JavaScriptContentHandler.php index ffd7599d8ebb..4f062324a213 100644 --- a/includes/content/JavaScriptContentHandler.php +++ b/includes/content/JavaScriptContentHandler.php @@ -43,7 +43,7 @@ class JavaScriptContentHandler extends CodeContentHandler { } /** - * @return string + * @return class-string<JavaScriptContent> */ protected function getContentClass() { return JavaScriptContent::class; diff --git a/includes/content/JsonContentHandler.php b/includes/content/JsonContentHandler.php index 4e166a3c76ef..6810b2702647 100644 --- a/includes/content/JsonContentHandler.php +++ b/includes/content/JsonContentHandler.php @@ -45,7 +45,7 @@ class JsonContentHandler extends CodeContentHandler { } /** - * @return string + * @return class-string<JsonContent> */ protected function getContentClass() { return JsonContent::class; diff --git a/includes/content/TextContentHandler.php b/includes/content/TextContentHandler.php index 875ca81834e7..37cbbb20e23a 100644 --- a/includes/content/TextContentHandler.php +++ b/includes/content/TextContentHandler.php @@ -103,7 +103,7 @@ class TextContentHandler extends ContentHandler { * * @since 1.24 * - * @return string + * @return class-string<TextContent> */ protected function getContentClass() { return TextContent::class; diff --git a/includes/content/WikitextContentHandler.php b/includes/content/WikitextContentHandler.php index b4c64b92f6f3..5d9d16959b69 100644 --- a/includes/content/WikitextContentHandler.php +++ b/includes/content/WikitextContentHandler.php @@ -88,6 +88,9 @@ class WikitextContentHandler extends TextContentHandler { $this->parsoidParserFactory = $parsoidParserFactory; } + /** + * @return class-string<WikitextContent> + */ protected function getContentClass() { return WikitextContent::class; } |