Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
hslater committed Feb 13, 2024
1 parent d43cf3f commit 14650f8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
return;
}

define( 'MWSTAKE_MEDIAWIKI_COMPONENT_NOTIFICATIONS_VERSION', '2.0.1' );
define( 'MWSTAKE_MEDIAWIKI_COMPONENT_NOTIFICATIONS_VERSION', '2.0.2' );

MWStake\MediaWiki\ComponentLoader\Bootstrapper::getInstance()
->register( 'notifications', function () {
->register( 'notifications', static function () {
$GLOBALS['wgMessagesDirs']['MWStakeMediaWikiComponentNotifications'] = __DIR__ . '/i18n';

$GLOBALS['mwsgNotificationsNotifierSpec'] = [
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"mwstake/mediawiki-componentloader": "~1"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "1.0.0",
"jakub-onderka/php-console-highlighter": "0.4.0",
"mediawiki/mediawiki-codesniffer": "29.0.0",
"mediawiki/minus-x": "1.0.0"
"mediawiki/mediawiki-codesniffer": "41.0.0",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "1.0.0",
"php-parallel-lint/php-parallel-lint": "1.3.2"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion includes/ServiceWiring.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use MWStake\MediaWiki\Component\Notifications\NullNotifier;

return [
'MWStakeNotificationsNotifier' => function ( MediaWikiServices $services ) {
'MWStakeNotificationsNotifier' => static function ( MediaWikiServices $services ) {
$spec = $GLOBALS['mwsgNotificationsNotifierSpec'];
$instance = $services->getObjectFactory()->createObject( $spec );
if ( !$instance instanceof INotifier ) {
Expand Down
6 changes: 3 additions & 3 deletions src/BaseNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class BaseNotification implements INotification {

/**
*
* @var boolean
* @var bool
*/
protected $immediateEmail = false;

/**
*
* @var boolean
* @var bool
*/
protected $useJobQueue = true;

Expand Down Expand Up @@ -252,7 +252,7 @@ private function getUserInGroups( $groups ) {
return $users;
}
foreach ( $res as $row ) {
$users [] = User::newFromId( $row->ug_user );
$users[] = User::newFromId( $row->ug_user );
}
return $users;
}
Expand Down
4 changes: 2 additions & 2 deletions src/INotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public function getSecondaryLinks();
* Whether mail for this notification should
* be sent immediately regardless of user settings
*
* @return boolean
* @return bool
*/
public function sendImmediateEmail();

/**
* Whether job queue should be used
* to send this notification
*
* @return boolean
* @return bool
*/
public function useJobQueue();

Expand Down
2 changes: 2 additions & 0 deletions src/NullNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* Generic empty notification
*/
class NullNotification implements INotification {

/** @var string */
protected $key;

/**
Expand Down

0 comments on commit 14650f8

Please sign in to comment.