mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-28 00:50:28 +00:00
build: Updating mediawiki/mediawiki-phan-config to 0.8.0
Bug: T235049 Change-Id: I326457e7779882bcc945753b9406605e76302e8a
This commit is contained in:
parent
ca702fa6e2
commit
f287bf7950
|
@ -4,7 +4,7 @@
|
||||||
"jakub-onderka/php-console-highlighter": "0.3.2",
|
"jakub-onderka/php-console-highlighter": "0.3.2",
|
||||||
"mediawiki/mediawiki-codesniffer": "28.0.0",
|
"mediawiki/mediawiki-codesniffer": "28.0.0",
|
||||||
"mediawiki/minus-x": "0.3.2",
|
"mediawiki/minus-x": "0.3.2",
|
||||||
"mediawiki/mediawiki-phan-config": "0.6.1"
|
"mediawiki/mediawiki-phan-config": "0.8.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"fix": [
|
"fix": [
|
||||||
|
|
|
@ -68,11 +68,11 @@ abstract class BaseBlacklist {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $links
|
* @param array $links
|
||||||
* @param Title $title
|
* @param ?Title $title
|
||||||
* @param bool $preventLog
|
* @param bool $preventLog
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
abstract public function filter( array $links, Title $title, $preventLog = false );
|
abstract public function filter( array $links, ?Title $title, $preventLog = false );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a blacklist class to the registry
|
* Adds a blacklist class to the registry
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
class EmailBlacklist extends BaseBlacklist {
|
class EmailBlacklist extends BaseBlacklist {
|
||||||
/**
|
/**
|
||||||
* @param array $links
|
* @param array $links
|
||||||
* @param Title $title
|
* @param ?Title $title
|
||||||
* @param bool $preventLog
|
* @param bool $preventLog
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function filter( array $links, Title $title, $preventLog = false ) {
|
public function filter( array $links, ?Title $title, $preventLog = false ) {
|
||||||
throw new LogicException( __CLASS__ . ' cannot be used to filter links.' );
|
throw new LogicException( __CLASS__ . ' cannot be used to filter links.' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class SpamBlacklist extends BaseBlacklist {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $links An array of links to check against the blacklist
|
* @param string[] $links An array of links to check against the blacklist
|
||||||
* @param Title|null $title The title of the page to which the filter shall be applied.
|
* @param ?Title $title The title of the page to which the filter shall be applied.
|
||||||
* This is used to load the old links already on the page, so
|
* This is used to load the old links already on the page, so
|
||||||
* the filter is only applied to links that got added. If not given,
|
* the filter is only applied to links that got added. If not given,
|
||||||
* the filter is applied to all $links.
|
* the filter is applied to all $links.
|
||||||
|
@ -42,7 +42,7 @@ class SpamBlacklist extends BaseBlacklist {
|
||||||
*
|
*
|
||||||
* @return string[]|bool Matched text(s) if the edit should not be allowed; false otherwise
|
* @return string[]|bool Matched text(s) if the edit should not be allowed; false otherwise
|
||||||
*/
|
*/
|
||||||
public function filter( array $links, Title $title = null, $preventLog = false, $mode = 'check' ) {
|
public function filter( array $links, ?Title $title, $preventLog = false, $mode = 'check' ) {
|
||||||
$statsd = MediaWikiServices::getInstance()->getStatsdDataFactory();
|
$statsd = MediaWikiServices::getInstance()->getStatsdDataFactory();
|
||||||
$cache = ObjectCache::getLocalClusterInstance();
|
$cache = ObjectCache::getLocalClusterInstance();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue