Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382958 )
Change subject: Improve some parameter docs ...................................................................... Improve some parameter docs Change-Id: I5aa413baa65a368fe4a3c3d100188e21ab727c0c --- M SpecialUrlShortener.php M UrlShortener.hooks.php M UrlShortener.utils.php M phpcs.xml 4 files changed, 10 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UrlShortener refs/changes/58/382958/1 diff --git a/SpecialUrlShortener.php b/SpecialUrlShortener.php index bf429ff..d1efe0e 100644 --- a/SpecialUrlShortener.php +++ b/SpecialUrlShortener.php @@ -70,8 +70,8 @@ /** * Validate the URL to ensure that we are allowed to create a shorturl for this. * - * @param $url String The URL to validate - * @param $allData Array All the form fields! + * @param string $url The URL to validate + * @param array $allData All the form fields! * @return bool|string true if url is valid, error message otherwise */ public function validateURL( $url, $allData ) { diff --git a/UrlShortener.hooks.php b/UrlShortener.hooks.php index c4fd079..aa08a34 100644 --- a/UrlShortener.hooks.php +++ b/UrlShortener.hooks.php @@ -10,7 +10,7 @@ class UrlShortenerHooks { /** - * @param $router PathRouter + * @param PathRouter $router * @return bool * * Adds UrlShortener rules to the URL router. @@ -38,7 +38,7 @@ * Adds a link to the toolbox to Special:UrlShortener * * @param BaseTemplate $template - * @param array $toolbox + * @param array &$toolbox */ public static function onBaseTemplateToolbox( BaseTemplate $template, array &$toolbox ) { global $wgUrlShortenerReadOnly; @@ -67,7 +67,7 @@ } /** - * @param $du DatabaseUpdater + * @param DatabaseUpdater $du * @return bool */ public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $du ) { diff --git a/UrlShortener.utils.php b/UrlShortener.utils.php index 90277c6..9e6c629 100644 --- a/UrlShortener.utils.php +++ b/UrlShortener.utils.php @@ -172,8 +172,8 @@ /** * Create a fully qualified short URL for the given shortcode. * - * @param $shortCode String base64 shortcode to generate URL For. - * @return String The fully qualified URL + * @param string $shortCode base64 shortcode to generate URL For. + * @return string The fully qualified URL */ public static function makeUrl( $shortCode ) { global $wgUrlShortenerTemplate, $wgUrlShortenerServer, $wgServer; @@ -217,7 +217,7 @@ /** * Validates a given URL to see if it is allowed to be used to create a short URL * - * @param $url String Url to Validate + * @param string $url Url to Validate * @return bool|Message true if it is valid, or error Message object if invalid */ public static function validateUrl( $url ) { @@ -253,7 +253,7 @@ * Encode an integer into a compact string representation. This is basically * a generalisation of base_convert(). * - * @param $x integer + * @param int $x * @return string */ public static function encodeId( $x ) { @@ -272,7 +272,7 @@ /** * Decode a compact string to produce an integer, or false if the input is invalid. * - * @param $s string + * @param string $s * @return int|false */ public static function decodeId( $s ) { diff --git a/phpcs.xml b/phpcs.xml index 66c930b..b1f2755 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.MissingParamName" /> - <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" /> - <exclude name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" /> <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" /> <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" /> @@ -14,6 +11,4 @@ <file>.</file> <arg name="extensions" value="php,php5,inc" /> <arg name="encoding" value="UTF-8" /> - <exclude-pattern>vendor</exclude-pattern> - <exclude-pattern>node_modules</exclude-pattern> </ruleset> -- To view, visit https://gerrit.wikimedia.org/r/382958 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5aa413baa65a368fe4a3c3d100188e21ab727c0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UrlShortener Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits