mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-23 15:57:15 +00:00
Fix excluded phpcs rules
Change-Id: Ie0d0a00e2a12dc50bd2ed9ba00b8e7f339227a56
This commit is contained in:
parent
10a35cc513
commit
0744773321
|
@ -1,10 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset>
|
||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
|
||||
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
|
||||
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
|
||||
</rule>
|
||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
|
||||
<file>.</file>
|
||||
<arg name="extensions" value="php"/>
|
||||
<arg name="encoding" value="UTF-8"/>
|
||||
|
|
|
@ -10,8 +10,8 @@ use MediaWiki\MediaWikiServices;
|
|||
use WikimediaEvents\WikimediaEventsHooks;
|
||||
|
||||
class WikiEditorHooks {
|
||||
// ID used for grouping entries all of a session's entries together in
|
||||
// EventLogging.
|
||||
|
||||
/** @var string|bool ID used for grouping entries all of a session's entries together in EventLogging. */
|
||||
private static $statsId = false;
|
||||
|
||||
/* Static Methods */
|
||||
|
@ -64,7 +64,8 @@ class WikiEditorHooks {
|
|||
'version' => 1,
|
||||
'is_oversample' => !$inSample,
|
||||
'editor_interface' => 'wikitext',
|
||||
'platform' => 'desktop', // FIXME
|
||||
// @todo FIXME for other than 'desktop'. T249944
|
||||
'platform' => 'desktop',
|
||||
'integration' => 'page',
|
||||
'page_id' => $page->getId(),
|
||||
'page_title' => $title->getPrefixedText(),
|
||||
|
@ -115,7 +116,8 @@ class WikiEditorHooks {
|
|||
'feature' => $feature,
|
||||
'action' => $action,
|
||||
'editingSessionId' => $sessionId,
|
||||
'platform' => 'desktop', // FIXME T249944
|
||||
// @todo FIXME for other than 'desktop'. T249944
|
||||
'platform' => 'desktop',
|
||||
'integration' => 'page',
|
||||
'editor_interface' => 'wikitext',
|
||||
'user_id' => $user->getId(),
|
||||
|
@ -288,6 +290,11 @@ class WikiEditorHooks {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param MessageLocalizer $ml
|
||||
* @param bool $raw
|
||||
* @return string
|
||||
*/
|
||||
private static function getSignatureMessage( MessageLocalizer $ml, $raw = false ) {
|
||||
$msg = $ml->msg( 'sig-text' )->params( '~~~~' )->inContentLanguage();
|
||||
return $raw ? $msg->plain() : $msg->text();
|
||||
|
|
Loading…
Reference in a new issue