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"?>
|
<?xml version="1.0"?>
|
||||||
<ruleset>
|
<ruleset>
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
|
||||||
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
|
|
||||||
</rule>
|
|
||||||
<file>.</file>
|
<file>.</file>
|
||||||
<arg name="extensions" value="php" />
|
<arg name="extensions" value="php" />
|
||||||
<arg name="encoding" value="UTF-8" />
|
<arg name="encoding" value="UTF-8" />
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"type": "other",
|
"type": "other",
|
||||||
"license-name": "MIT",
|
"license-name": "MIT",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.35.0"
|
"MediaWiki": ">= 1.41.0"
|
||||||
},
|
},
|
||||||
"MessagesDirs": {
|
"MessagesDirs": {
|
||||||
"CookieWarning": [
|
"CookieWarning": [
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
"scripts": "resources/ext.CookieWarning.geolocation/cookiePolicy.js",
|
"scripts": "resources/ext.CookieWarning.geolocation/cookiePolicy.js",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"ext.CookieWarning",
|
"ext.CookieWarning",
|
||||||
"jquery.cookie"
|
"mediawiki.cookie"
|
||||||
],
|
],
|
||||||
"targets": [
|
"targets": [
|
||||||
"mobile",
|
"mobile",
|
||||||
|
|
|
@ -10,19 +10,13 @@ use MWException;
|
||||||
use WANObjectCache;
|
use WANObjectCache;
|
||||||
|
|
||||||
class Decisions {
|
class Decisions {
|
||||||
private $config;
|
private Config $config;
|
||||||
private $geoLocation;
|
private GeoLocation $geoLocation;
|
||||||
private $cache;
|
private WANObjectCache $cache;
|
||||||
private $userOptionsLookup;
|
private UserOptionsLookup $userOptionsLookup;
|
||||||
|
|
||||||
private const CACHE_KEY = 'cookieWarningIpLookupCache:';
|
private const CACHE_KEY = 'cookieWarningIpLookupCache:';
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Config $config
|
|
||||||
* @param GeoLocation $geoLocation
|
|
||||||
* @param WANObjectCache $cache
|
|
||||||
* @param UserOptionsLookup $userOptionsLookup
|
|
||||||
*/
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Config $config,
|
Config $config,
|
||||||
GeoLocation $geoLocation,
|
GeoLocation $geoLocation,
|
||||||
|
|
|
@ -10,7 +10,9 @@ use Wikimedia\IPUtils;
|
||||||
* Implements the GeoLocation class, which allows to locate the user based on the IP address.
|
* Implements the GeoLocation class, which allows to locate the user based on the IP address.
|
||||||
*/
|
*/
|
||||||
class HttpGeoLocation implements GeoLocation {
|
class HttpGeoLocation implements GeoLocation {
|
||||||
|
/** @var string */
|
||||||
private $geoIPServiceURL;
|
private $geoIPServiceURL;
|
||||||
|
/** @var array */
|
||||||
private $locatedIPs = [];
|
private $locatedIPs = [];
|
||||||
|
|
||||||
/** @var HttpRequestFactory */
|
/** @var HttpRequestFactory */
|
||||||
|
|
Loading…
Reference in a new issue