jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/341696 )
Change subject: Use consistent array styles
......................................................................
Use consistent array styles
Fix indenting
Remove unused variables
Change-Id: I7e899a46982e70f24d7a121b479ae0987caf20c4
---
M PerformanceInspector.hooks.php
1 file changed, 13 insertions(+), 18 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/PerformanceInspector.hooks.php b/PerformanceInspector.hooks.php
index 0ccb588..a5ea6d6 100644
--- a/PerformanceInspector.hooks.php
+++ b/PerformanceInspector.hooks.php
@@ -8,34 +8,29 @@
class PerformanceInspectorHooks {
public static function onBeforePageDisplay( OutputPage &$out, Skin
&$skin ) {
-
- $action = $out->getRequest()->getVal( 'action' );
- $isEdit = ( $action === 'edit' );
$title = $out->getTitle();
- if ( $title->inNamespace( NS_MAIN ) /*&& $isEdit*/ ) {
+ if ( $title->inNamespace( NS_MAIN ) ) {
$out->addModuleStyles( [
'ext.PerformanceInspector.noscript' ] );
- $out->addModules( array(
'ext.PerformanceInspector.startup' ) );
+ $out->addModules( [ 'ext.PerformanceInspector.startup'
] );
}
- return true;
}
public static function onBaseTemplateToolbox( BaseTemplate
$baseTemplate, array &$toolbox ) {
- $toolbox['performanceinspector'] = array(
- 'text' => $baseTemplate->getMsg(
'performanceinspector-portlet-link' )->text(),
- 'href' => '#',
- 'id' => 't-performanceinspector'
- );
- return true;
+ $toolbox['performanceinspector'] = [
+ 'text' => $baseTemplate->getMsg(
'performanceinspector-portlet-link' )->text(),
+ 'href' => '#',
+ 'id' => 't-performanceinspector'
+ ];
}
public static function onResourceLoaderTestModules( array &$testModules,
- ResourceLoader &$resourceLoader ) {
- $testModules['qunit']['ext.performanceInspector.tests'] = array(
- 'scripts' => array(
'tests/qunit/ext.performanceInspector.test.js' ),
- 'dependencies' => array(
'ext.PerformanceInspector.analyze' ),
+ ResourceLoader &$resourceLoader
+ ) {
+ $testModules['qunit']['ext.performanceInspector.tests'] = [
+ 'scripts' => [
'tests/qunit/ext.performanceInspector.test.js' ],
+ 'dependencies' => [ 'ext.PerformanceInspector.analyze'
],
'localBasePath' => __DIR__,
'remoteExtPath' => 'PerformanceInspector'
- );
- return true;
+ ];
}
}
--
To view, visit https://gerrit.wikimedia.org/r/341696
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7e899a46982e70f24d7a121b479ae0987caf20c4
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits