diff --git a/.phpcs.xml b/.phpcs.xml index 31ab3a1..eddb6dc 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,8 +1,6 @@ - - - + . diff --git a/extension.json b/extension.json index 6ea4f6b..b836e6f 100644 --- a/extension.json +++ b/extension.json @@ -12,7 +12,7 @@ "type": "other", "license-name": "MIT", "requires": { - "MediaWiki": ">= 1.35.0" + "MediaWiki": ">= 1.41.0" }, "MessagesDirs": { "CookieWarning": [ @@ -110,7 +110,7 @@ "scripts": "resources/ext.CookieWarning.geolocation/cookiePolicy.js", "dependencies": [ "ext.CookieWarning", - "jquery.cookie" + "mediawiki.cookie" ], "targets": [ "mobile", diff --git a/includes/Decisions.php b/includes/Decisions.php index d6b15cf..64c26b1 100644 --- a/includes/Decisions.php +++ b/includes/Decisions.php @@ -10,19 +10,13 @@ use MWException; use WANObjectCache; class Decisions { - private $config; - private $geoLocation; - private $cache; - private $userOptionsLookup; + private Config $config; + private GeoLocation $geoLocation; + private WANObjectCache $cache; + private UserOptionsLookup $userOptionsLookup; private const CACHE_KEY = 'cookieWarningIpLookupCache:'; - /** - * @param Config $config - * @param GeoLocation $geoLocation - * @param WANObjectCache $cache - * @param UserOptionsLookup $userOptionsLookup - */ public function __construct( Config $config, GeoLocation $geoLocation, diff --git a/includes/HttpGeoLocation.php b/includes/HttpGeoLocation.php index dfca26f..b75fc61 100644 --- a/includes/HttpGeoLocation.php +++ b/includes/HttpGeoLocation.php @@ -10,7 +10,9 @@ use Wikimedia\IPUtils; * Implements the GeoLocation class, which allows to locate the user based on the IP address. */ class HttpGeoLocation implements GeoLocation { + /** @var string */ private $geoIPServiceURL; + /** @var array */ private $locatedIPs = []; /** @var HttpRequestFactory */