Anomie (Code Review)
2017-12-30 17:19:17 UTC
Anomie has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401089 )
Change subject: Add missing visibility declarations
......................................................................
Add missing visibility declarations
And re-enable Squiz.Scope.MethodScope.Missing
Change-Id: Ibafb0608942d195630355b4e6b69329a1f3b54ea
---
M .phpcs.xml
M SpecialTemplateSandbox.php
2 files changed, 5 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox refs/changes/89/401089/1
diff --git a/.phpcs.xml b/.phpcs.xml
index bcfe27a..198c91b 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,7 +6,6 @@
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
- <exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc"/>
diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index ee20ab7..43f8e5e 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -12,7 +12,7 @@
*/
private $output = null;
- function __construct() {
+ public function __construct() {
parent::__construct( 'TemplateSandbox' );
}
@@ -20,7 +20,7 @@
return 'wiki';
}
- function execute( $par ) {
+ public function execute( $par ) {
$this->setHeaders();
$this->checkPermissions();
@@ -115,7 +115,7 @@
* @param array $allData
* @return bool|String
*/
- function validatePageParam( $value, $allData ) {
+ public function validatePageParam( $value, $allData ) {
if ( $value === '' || $value === null ) {
return true;
}
@@ -134,7 +134,7 @@
* @param array $allData
* @return bool|String
*/
- function validateRevidParam( $value, $allData ) {
+ public function validateRevidParam( $value, $allData ) {
if ( $value === '' || $value === null ) {
return true;
}
@@ -150,7 +150,7 @@
* @param array $allData
* @return bool|String
*/
- function validatePrefixParam( $value, $allData ) {
+ public function validatePrefixParam( $value, $allData ) {
if ( $value === '' || $value === null ) {
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/401089
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibafb0608942d195630355b4e6b69329a1f3b54ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie <***@wikimedia.org>
Change subject: Add missing visibility declarations
......................................................................
Add missing visibility declarations
And re-enable Squiz.Scope.MethodScope.Missing
Change-Id: Ibafb0608942d195630355b4e6b69329a1f3b54ea
---
M .phpcs.xml
M SpecialTemplateSandbox.php
2 files changed, 5 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox refs/changes/89/401089/1
diff --git a/.phpcs.xml b/.phpcs.xml
index bcfe27a..198c91b 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,7 +6,6 @@
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
- <exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc"/>
diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index ee20ab7..43f8e5e 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -12,7 +12,7 @@
*/
private $output = null;
- function __construct() {
+ public function __construct() {
parent::__construct( 'TemplateSandbox' );
}
@@ -20,7 +20,7 @@
return 'wiki';
}
- function execute( $par ) {
+ public function execute( $par ) {
$this->setHeaders();
$this->checkPermissions();
@@ -115,7 +115,7 @@
* @param array $allData
* @return bool|String
*/
- function validatePageParam( $value, $allData ) {
+ public function validatePageParam( $value, $allData ) {
if ( $value === '' || $value === null ) {
return true;
}
@@ -134,7 +134,7 @@
* @param array $allData
* @return bool|String
*/
- function validateRevidParam( $value, $allData ) {
+ public function validateRevidParam( $value, $allData ) {
if ( $value === '' || $value === null ) {
return true;
}
@@ -150,7 +150,7 @@
* @param array $allData
* @return bool|String
*/
- function validatePrefixParam( $value, $allData ) {
+ public function validatePrefixParam( $value, $allData ) {
if ( $value === '' || $value === null ) {
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/401089
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibafb0608942d195630355b4e6b69329a1f3b54ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie <***@wikimedia.org>