PHPCS: Fix all excluded rules

Change-Id: I525345c7be91e83c6050870613eb08a6e8763238
This commit is contained in:
zoranzoki21 2024-06-04 09:28:46 +02:00 committed by Thiemo Kreuz (WMDE)
parent 7326d988c3
commit d1b64431e9
4 changed files with 9 additions and 15 deletions

View file

@ -1,8 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />

View file

@ -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",

View file

@ -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,

View file

@ -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 */