Legoktm has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/360178 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
......................................................................
build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.FunctionComment.Missing.Public
Change-Id: I0a8066cd0b137e4f30ca1c4d2e53d8522a339f0b
---
M GeoGebra.body.php
M composer.json
M phpcs.xml
3 files changed, 14 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoGebra
refs/changes/78/360178/1
diff --git a/GeoGebra.body.php b/GeoGebra.body.php
index 898a5d7..be360f9 100644
--- a/GeoGebra.body.php
+++ b/GeoGebra.body.php
@@ -1,16 +1,15 @@
<?php
-class ExtGeoGebra{
+class ExtGeoGebra {
static $divs = [];
public static function geogebraTag( $input, $args, $parser ) {
-
global $wgGeoGebraTechnology;
$CRLF = "\r\n";
if ( !isset( $args['width'] ) || !isset( $args['height'] ) ||
- ( !isset( $args['id'] ) && !isset( $args['filename'] )
&& !isset( $args['ggbbase64'] ) ) ){
+ ( !isset( $args['id'] ) && !isset( $args['filename'] )
&& !isset( $args['ggbbase64'] ) ) ) {
$error_message = wfMessage(
'geogebra-missing-parameter' )->escaped();
return wfMessage( 'geogebra-error' )->rawParams(
$error_message )->parseAsBlock() . $CRLF;
}
@@ -29,14 +28,14 @@
'enableRightClick'=>'enableRightClick'
];
- foreach ( $args as $key => $value ){
- if ( $key == "filename" ){
+ foreach ( $args as $key => $value ) {
+ if ( $key == "filename" ) {
$ggbFile = wfLocalFile( $value );
if ( !( $ggbFile->exists() ) ) {
return wfMessage(
'geogebra-file-not-found' )->rawParams( $ggbBinary )->escaped();
} else {
$fc = file_get_contents(
$ggbFile->getLocalRefPath() );
- $parameters .=
',ggbBase64:"'.base64_encode( $fc ).'"';
+ $parameters .=
',ggbBase64:"'.base64_encode( $fc ).'"';
}
continue;
}
@@ -53,7 +52,6 @@
}
static function injectJS( $out ) {
-
$technology = isset( $wgGeoGebraTechnology ) ?
htmlspecialchars( strip_tags( $wgGeoGebraTechnology ) ) : "preferhtml5";
$deployGGBUrl = isset( $wgGeoGebraDeployURL ) ?
htmlspecialchars( strip_tags( $wgGeoGebraDeployURL ) ) :
"//tube-beta.geogebra.org/scripts/deployggb.js";
diff --git a/composer.json b/composer.json
index 3e676f3..858a1ef 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
- "mediawiki/mediawiki-codesniffer": "0.7.2",
+ "mediawiki/mediawiki-codesniffer": "0.9.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 504fc66..3f9e7f2 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,12 +1,15 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
- <exclude name="Generic.Files.LineLength"/>
- <exclude
name="MediaWiki.VariableAnalysis.UnusedGlobalVariables"/>
- <exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing"/>
+ <exclude name="Generic.Files.LineLength" />
+ <exclude
name="MediaWiki.VariableAnalysis.UnusedGlobalVariables" />
+ <exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing"
/>
+ <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+ <exclude name="MediaWiki.FunctionComment.Missing.Public" />
</rule>
<file>.</file>
- <arg name="extensions" value="php,php5,inc"/>
- <arg name="encoding" value="utf8"/>
+ <arg name="extensions" value="php,php5,inc" />
+ <arg name="encoding" value="utf8" />
<exclude-pattern>vendor</exclude-pattern>
</ruleset>
--
To view, visit https://gerrit.wikimedia.org/r/360178
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a8066cd0b137e4f30ca1c4d2e53d8522a339f0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoGebra
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits