Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371396 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.11.0
......................................................................

build: Updating mediawiki/mediawiki-codesniffer to 0.11.0

Change-Id: I5e14829994100fd74c5a65a7e328148731af43f4
---
M composer.json
M includes/SmiteSpamAnalyzer.php
M includes/checkers/SmiteSpamExternalLinksChecker.php
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SmiteSpam 
refs/changes/96/371396/1

diff --git a/composer.json b/composer.json
index d42bf58..219b4d4 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,7 @@
        "license": "GPL-2.0",
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
-               "mediawiki/mediawiki-codesniffer": "0.10.1",
+               "mediawiki/mediawiki-codesniffer": "0.11.0",
                "jakub-onderka/php-console-highlighter": "0.3.2"
        },
        "scripts": {
diff --git a/includes/SmiteSpamAnalyzer.php b/includes/SmiteSpamAnalyzer.php
index de07335..5c12717 100644
--- a/includes/SmiteSpamAnalyzer.php
+++ b/includes/SmiteSpamAnalyzer.php
@@ -106,7 +106,7 @@
                                }
                        }
 
-                       $page->spamProbability = $value/$checkersUsed;
+                       $page->spamProbability = $value / $checkersUsed;
                        if ( $page->spamProbability >= 
$this->config['threshold'] ) {
                                $spamPages[] = $page;
                        }
diff --git a/includes/checkers/SmiteSpamExternalLinksChecker.php 
b/includes/checkers/SmiteSpamExternalLinksChecker.php
index 8eb7ee6..17fab1a 100644
--- a/includes/checkers/SmiteSpamExternalLinksChecker.php
+++ b/includes/checkers/SmiteSpamExternalLinksChecker.php
@@ -15,7 +15,7 @@
                if ( $numWords == 0 ) {
                        return false;
                }
-               $ratio = $numLinks/$numWords;
+               $ratio = $numLinks / $numWords;
 
                if ( $ratio < 0.02 ) {
                        return 0;
@@ -24,7 +24,7 @@
                } elseif ( $ratio < 0.04 ) {
                        return 0.5 + 0.5 * ( $ratio * 100 - 3 );
                } elseif ( $ratio < 0.1 ) {
-                       return 1 + 2 * ( $ratio * 100 - 4 )/6;
+                       return 1 + 2 * ( $ratio * 100 - 4 ) / 6;
                } else {
                        return 3;
                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e14829994100fd74c5a65a7e328148731af43f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SmiteSpam
Gerrit-Branch: master
Gerrit-Owner: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to