Enforce strict camel case for method names
authorAlexander Ebert <ebert@woltlab.com>
Tue, 15 Jun 2021 09:49:32 +0000 (11:49 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 15 Jun 2021 09:49:32 +0000 (11:49 +0200)
`ImageUtil::browserSupportsWebP()` was renamed to `ImageUtil::browserSupportsWebp()` for consistency with other methods.

wcfsetup/install/files/lib/data/style/Style.class.php
wcfsetup/install/files/lib/data/user/avatar/UserAvatar.class.php
wcfsetup/install/files/lib/data/user/cover/photo/UserCoverPhoto.class.php
wcfsetup/install/files/lib/util/ImageUtil.class.php

index 0fc15e650a749d38a738e92630abe44e099b78cf..229000bf590a3ee5b5a3d6fbc2080a70660fb1cb 100644 (file)
@@ -402,7 +402,7 @@ class Style extends DatabaseObject
             return false;
         }
 
-        return $forceWebP || ($forceWebP === null && ImageUtil::browserSupportsWebP());
+        return $forceWebP || ($forceWebP === null && ImageUtil::browserSupportsWebp());
     }
 
     /**
index b60e9596f3061981fcbf890b5664ab34ea537ce1..62cbe89e20e7065ae9c22caf23173faaeac64fa3 100644 (file)
@@ -76,7 +76,7 @@ class UserAvatar extends DatabaseObject implements IUserAvatar, ISafeFormatAvata
     {
         if (
             $forceWebP === true
-            || ($forceWebP === null && $this->hasWebP && ImageUtil::browserSupportsWebP())
+            || ($forceWebP === null && $this->hasWebP && ImageUtil::browserSupportsWebp())
         ) {
             $fileExtension = "webp";
         } else {
index 57f48dc4ccf00593eda5664fab5c845a7a274e68..30c68c9d75f23744c0e89d8b72a5bc998ce99d74 100644 (file)
@@ -96,7 +96,7 @@ class UserCoverPhoto implements IWebpUserCoverPhoto
      */
     public function getFilename(?bool $forceWebP = null): string
     {
-        $useWebP = $forceWebP || ($this->coverPhotoHasWebP && $forceWebP === null && ImageUtil::browserSupportsWebP());
+        $useWebP = $forceWebP || ($this->coverPhotoHasWebP && $forceWebP === null && ImageUtil::browserSupportsWebp());
 
         return \substr(
             $this->coverPhotoHash,
index 1df79ee89c88755acd83ed532fa064f09855959d..4749d88382dfa0b7b021835e082bc62616cbb325 100644 (file)
@@ -204,7 +204,7 @@ final class ImageUtil
      *
      * @since 5.4
      */
-    public static function browserSupportsWebP(): bool
+    public static function browserSupportsWebp(): bool
     {
         static $supportsWebP = null;