WMDE-Fisch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/361633 )

Change subject: Fixes to address MW PHPCS 0.9
......................................................................

Fixes to address MW PHPCS 0.9

Change-Id: I9984345828eb9d9a497cd8d9f22be75919845ed4
---
M phpcs.xml
M src/ElectronPdfServiceHooks.php
M src/specials/SpecialElectronPdf.php
3 files changed, 12 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ElectronPdfService 
refs/changes/33/361633/1

diff --git a/phpcs.xml b/phpcs.xml
index a135168..1d01c0b 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,9 +2,6 @@
 <ruleset>
        <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" 
/>
-               <exclude name="MediaWiki.FunctionComment.Missing.Protected" />
-               <exclude name="MediaWiki.FunctionComment.Missing.Public" />
        </rule>
        <file>.</file>
        <arg name="extensions" value="php,php5,inc" />
diff --git a/src/ElectronPdfServiceHooks.php b/src/ElectronPdfServiceHooks.php
index 46b9db8..f00c636 100644
--- a/src/ElectronPdfServiceHooks.php
+++ b/src/ElectronPdfServiceHooks.php
@@ -11,13 +11,9 @@
 
 class ElectronPdfServiceHooks {
 
-       /*
-        * If present, make the "Download as PDF" link in the sidebar point to 
the selection screen,
-        * add a new link otherwise
-        *
+       /**
         * @param Skin $skin
-        * @param array &$bar
-        *
+        * @param mixed &$bar
         * @return bool
         */
        public static function onSidebarBeforeOutput( Skin $skin, &$bar ) {
@@ -63,6 +59,10 @@
                return true;
        }
 
+       /**
+        * @param OutputPage &$out
+        * @param Skin &$skin
+        */
        public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
                $userAgent = $out->getRequest()->getHeader( 'User-Agent' );
 
diff --git a/src/specials/SpecialElectronPdf.php 
b/src/specials/SpecialElectronPdf.php
index d389cac..193240b 100644
--- a/src/specials/SpecialElectronPdf.php
+++ b/src/specials/SpecialElectronPdf.php
@@ -199,11 +199,17 @@
                return $warning;
        }
 
+       /**
+        * Sets headers
+        */
        public function setHeaders() {
                parent::setHeaders();
                $this->addModules();
        }
 
+       /**
+        * Adds JS and CSS modules
+        */
        protected function addModules() {
                $out = $this->getOutput();
                $rl = $out->getResourceLoader();

-- 
To view, visit https://gerrit.wikimedia.org/r/361633
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9984345828eb9d9a497cd8d9f22be75919845ed4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ElectronPdfService
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to