mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 13:56:53 +00:00
PHPCS: Fix all excluded rules
Change-Id: I525345c7be91e83c6050870613eb08a6e8763238
This commit is contained in:
parent
7326d988c3
commit
d1b64431e9
|
@ -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" />
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue