aboutsummaryrefslogtreecommitdiffstats
path: root/includes/site/Site.php
diff options
context:
space:
mode:
authorAryeh Gregor <ayg@aryeh.name>2022-04-25 22:05:56 +0300
committerKevin Israel <pleasestand@live.com>2022-06-13 04:42:20 -0400
commitc43521226011bd10381c9077b7c3ee14e4b21e89 (patch)
tree48600c15172ac9731c765bbda2841fe7383a009f /includes/site/Site.php
parent89518d5024fab41fa6a153e6539ae0a6597d249d (diff)
downloadmediawikicore-c43521226011bd10381c9077b7c3ee14e4b21e89.tar.gz
mediawikicore-c43521226011bd10381c9077b7c3ee14e4b21e89.zip
Get rid of warnings on PHP 8.1
This is mostly about adding return types to methods that implement PHP interfaces, and not passing null to core functions that want a string. After this patch, and an update to return types in RemexHtml, tests/phpunit/integration/ has no more errors than in PHP 8.0. Bug: T289879 Bug: T289926 Change-Id: Ia424f5cc897070f4188ae126b5bf6a1f552db0e1
Diffstat (limited to 'includes/site/Site.php')
-rw-r--r--includes/site/Site.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/site/Site.php b/includes/site/Site.php
index 5c640613fc69..e84f1c7ce1ea 100644
--- a/includes/site/Site.php
+++ b/includes/site/Site.php
@@ -672,7 +672,7 @@ class Site implements Serializable {
*
* @return string
*/
- public function serialize() {
+ public function serialize(): string {
return serialize( $this->__serialize() );
}
@@ -705,7 +705,7 @@ class Site implements Serializable {
*
* @param string $serialized
*/
- public function unserialize( $serialized ) {
+ public function unserialize( $serialized ): void {
$this->__unserialize( unserialize( $serialized ) );
}