diff --git a/bootstrap.php b/bootstrap.php index d7cf7ac..74890e4 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -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'] = [ diff --git a/composer.json b/composer.json index 9c53000..1f9c9c0 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 7559398..bd62539 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -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 ) { diff --git a/src/BaseNotification.php b/src/BaseNotification.php index 851dc51..f4ba90d 100644 --- a/src/BaseNotification.php +++ b/src/BaseNotification.php @@ -40,13 +40,13 @@ class BaseNotification implements INotification { /** * - * @var boolean + * @var bool */ protected $immediateEmail = false; /** * - * @var boolean + * @var bool */ protected $useJobQueue = true; @@ -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; } diff --git a/src/INotification.php b/src/INotification.php index 70b34f7..d515066 100644 --- a/src/INotification.php +++ b/src/INotification.php @@ -35,7 +35,7 @@ public function getSecondaryLinks(); * Whether mail for this notification should * be sent immediately regardless of user settings * - * @return boolean + * @return bool */ public function sendImmediateEmail(); @@ -43,7 +43,7 @@ public function sendImmediateEmail(); * Whether job queue should be used * to send this notification * - * @return boolean + * @return bool */ public function useJobQueue(); diff --git a/src/NullNotification.php b/src/NullNotification.php index b894079..1e81375 100644 --- a/src/NullNotification.php +++ b/src/NullNotification.php @@ -9,6 +9,8 @@ * Generic empty notification */ class NullNotification implements INotification { + + /** @var string */ protected $key; /**