jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403690 )

Change subject: Improve some parameter docs
......................................................................


Improve some parameter docs

Change-Id: I73943d1ea3e186cec896a1ca1030a1e87e5939f6
---
M .phpcs.xml
M Akismet.class.php
M AkismetKlik_body.php
3 files changed, 15 insertions(+), 18 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.phpcs.xml b/.phpcs.xml
index 1c65831..7813849 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -3,14 +3,11 @@
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <exclude 
name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
                <exclude name="Squiz.Scope.MethodScope.Missing" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
        </rule>
        <file>.</file>
        <arg name="extensions" value="php,php5,inc" />
-       <arg name="encoding" value="utf8" />
-       <exclude-pattern>vendor</exclude-pattern>
+       <arg name="encoding" value="UTF-8" />
 </ruleset>
diff --git a/Akismet.class.php b/Akismet.class.php
index 3eb12ac..3d2d307 100644
--- a/Akismet.class.php
+++ b/Akismet.class.php
@@ -150,9 +150,9 @@
 
        /**
         * makes a request to the Akismet service
-        * @param $request
-        * @param $host
-        * @param $path
+        * @param string $request
+        * @param string $host
+        * @param string $path
         * @return array
         */
        private function sendRequest( $request, $host, $path ) {
@@ -275,7 +275,7 @@
         * The type of comment being submitted.
         *
         * May be blank, comment, trackback, pingback, or a made up value like 
"registration" or "wiki".
-        * @param $commentType
+        * @param string $commentType
         */
        public function setCommentType( $commentType ) {
                $this->comment['comment_type'] = $commentType;
@@ -283,7 +283,7 @@
 
        /**
         * The name that the author submitted with the comment.
-        * @param $commentAuthor
+        * @param string $commentAuthor
         */
        public function setCommentAuthor( $commentAuthor ) {
                $this->comment['comment_author'] = $commentAuthor;
@@ -293,7 +293,7 @@
         * The email address that the author submitted with the comment.
         *
         * The address is assumed to be valid.
-        * @param $authorEmail string
+        * @param string $authorEmail
         */
        public function setCommentAuthorEmail( $authorEmail ) {
                $this->comment['comment_author_email'] = $authorEmail;
@@ -301,7 +301,7 @@
 
        /**
         * The URL that the author submitted with the comment.
-        * @param $authorURL
+        * @param string $authorURL
         */
        public function setCommentAuthorURL( $authorURL ) {
                $this->comment['comment_author_url'] = $authorURL;
@@ -309,7 +309,7 @@
 
        /**
         * The comment's body text.
-        * @param $commentBody
+        * @param string $commentBody
         */
        public function setCommentContent( $commentBody ) {
                $this->comment['comment_content'] = $commentBody;
@@ -319,7 +319,7 @@
         * Lets you override the user agent used to submit the comment.
         * you may wish to do this when submitting ham/spam.
         * Defaults to $_SERVER['HTTP_USER_AGENT']
-        * @param $userAgent
+        * @param string $userAgent
         */
        public function setCommentUserAgent( $userAgent ) {
                $this->comment['user_agent'] = $userAgent;
@@ -327,7 +327,7 @@
 
        /**
         * Defaults to 80
-        * @param $apiPort
+        * @param string $apiPort
         */
        public function setAPIPort( $apiPort ) {
                $this->apiPort = $apiPort;
@@ -335,7 +335,7 @@
 
        /**
         * Defaults to rest.akismet.com
-        * @param $akismetServer
+        * @param string $akismetServer
         */
        public function setAkismetServer( $akismetServer ) {
                $this->akismetServer = $akismetServer;
diff --git a/AkismetKlik_body.php b/AkismetKlik_body.php
index 125a4ec..e498dba 100644
--- a/AkismetKlik_body.php
+++ b/AkismetKlik_body.php
@@ -6,7 +6,7 @@
        public $previousFilter;
 
        /**
-        * @param $settings array
+        * @param array $settings
         */
        function __construct( $settings = [] ) {
                foreach ( $settings as $name => $value ) {
@@ -16,8 +16,8 @@
 
        /**
         * Hook function for EditFilterMergedContent, replaces wfAkismetFilter
-        * @param $context IContextSource
-        * @param $content Content
+        * @param IContextSource $context
+        * @param Content $content
         * @return bool
         */
        public static function onAkismetFilterMergedContent( $context, $content 
) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73943d1ea3e186cec896a1ca1030a1e87e5939f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AkismetKlik
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to