jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382948 )
Change subject: Improve some parameter docs ...................................................................... Improve some parameter docs Change-Id: Ic2e6025ed564506469f38db911ea638fd49d7390 --- M Score.body.php M Score.hooks.php M ScoreException.php M phpcs.xml 4 files changed, 39 insertions(+), 44 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/Score.body.php b/Score.body.php index b7e8342..54d77c2 100644 --- a/Score.body.php +++ b/Score.body.php @@ -55,9 +55,9 @@ /** * Throws proper ScoreException in case of failed shell executions. * - * @param $message Message to display. - * @param $output string collected output from wfShellExec(). - * @param $factoryDir string|bool The factory directory to replace with "..." + * @param Message $message Message to display. + * @param string $output collected output from wfShellExec(). + * @param string|bool $factoryDir The factory directory to replace with "..." * * @throws ScoreException always. */ @@ -119,8 +119,8 @@ * Creates the specified local directory if it does not exist yet. * Otherwise does nothing. * - * @param $path string Local path to directory to be created. - * @param $mode integer Chmod value of the new directory. + * @param string $path Local path to directory to be created. + * @param int $mode Chmod value of the new directory. * * @throws ScoreException if the directory does not exist and could not * be created. @@ -179,10 +179,10 @@ /** * Renders the score code (LilyPond, ABC, etc.) in a <score>…</score> tag. * - * @param $code string score code. - * @param $args array of score tag attributes. - * @param $parser Parser of Mediawiki. - * @param $frame PPFrame expansion frame, not used by this extension. + * @param string $code score code. + * @param array $args array of score tag attributes. + * @param Parser $parser Parser of Mediawiki. + * @param PPFrame $frame expansion frame, not used by this extension. * * @throws ScoreException * @return string Image link HTML, and possibly anchor to MIDI file. @@ -304,9 +304,9 @@ /** * Generates the HTML code for a score tag. * - * @param $parser Parser MediaWiki parser. - * @param $code string Score code. - * @param $options array of rendering options. + * @param Parser $parser MediaWiki parser. + * @param string $code Score code. + * @param array $options array of rendering options. * The options keys are: * - factory_directory: string Path to directory in which files * may be generated without stepping on someone else's @@ -499,10 +499,10 @@ /** * Generates score PNG file(s) and a MIDI file. * - * @param $code string Score code. - * @param $options array Rendering options. They are the same as for + * @param string $code Score code. + * @param array $options Rendering options. They are the same as for * Score::generateHTML(). - * @parma $metaData array to hold information about images + * @parma array $metaData array to hold information about images * * @return array of file names placed in the remote dest dir, with the * file names in each key. @@ -693,7 +693,7 @@ /** * Embeds simple LilyPond code in a score block. * - * @param $lilypondCode string Simple LilyPond code. + * @param string $lilypondCode Simple LilyPond code. * * @return string Raw lilypond code. * @@ -739,10 +739,10 @@ /** * Generates an Ogg/Vorbis file from a MIDI file using timidity. * - * @param $sourceFile string The local filename of the MIDI file - * @param $options array of rendering options. - * @param $remoteDest string The backend storage path to upload the Ogg file to - * @param $metaData array Array with metadata information + * @param string $sourceFile The local filename of the MIDI file + * @param array $options array of rendering options. + * @param string $remoteDest The backend storage path to upload the Ogg file to + * @param array $metaData Array with metadata information * * @throws ScoreException if an error occurs. */ @@ -796,8 +796,8 @@ /** * Generates LilyPond code. * - * @param $code string Score code. - * @param $options array Rendering options. They are the same as for + * @param string $code Score code. + * @param array $options Rendering options. They are the same as for * Score::generateHTML(), with the following addition: * * lilypond_path: local path to the LilyPond file that is to be * generated. @@ -826,9 +826,9 @@ /** * Runs abc2ly, creating the LilyPond input file. * - * @param $code string ABC code. - * @param $factoryDirectory string Local temporary directory - * @param $destFile string Local destination path + * @param string $code ABC code. + * @param string $factoryDirectory Local temporary directory + * @param string $destFile Local destination path * * @throws ScoreException if the conversion fails. */ @@ -893,8 +893,8 @@ /** * Trims an image with ImageMagick. * - * @param $source string Local path to the source image. - * @param $dest string Local path to the target (trimmed) image. + * @param string $source Local path to the source image. + * @param string $dest Local path to the target (trimmed) image. * * @throws ScoreException on error. */ @@ -915,9 +915,9 @@ /** * Deletes a local directory with no subdirectories with all files in it. * - * @param $dir string Local path to the directory that is to be deleted. + * @param string $dir Local path to the directory that is to be deleted. * - * @return Bool true on success, false on error + * @return bool true on success, false on error */ private static function eraseFactory( $dir ) { if ( file_exists( $dir ) ) { @@ -937,7 +937,7 @@ /** * Deletes a local file if it exists. * - * @param $path string Local path to the file to be deleted. + * @param string $path Local path to the file to be deleted. * * @throws ScoreException if the file specified by $path exists but * could not be deleted. @@ -954,7 +954,7 @@ /** * Writes the specified message to the Score debug log. * - * @param $msg string message to log. + * @param string $msg message to log. */ private static function debug( $msg ) { wfDebugLog( 'Score', $msg ); diff --git a/Score.hooks.php b/Score.hooks.php index 855a7b4..94d00a3 100644 --- a/Score.hooks.php +++ b/Score.hooks.php @@ -1,10 +1,10 @@ <?php class ScoreHooks { /** - * @param Parser $parser - * - * @return bool Returns true - */ + * @param Parser &$parser + * + * @return bool Returns true + */ public static function onParserFirstCallInit( Parser &$parser ) { global $wgUseImageMagick, $wgScoreTrim; if ( $wgScoreTrim === null ) { diff --git a/ScoreException.php b/ScoreException.php index 5e9587d..00ac398 100644 --- a/ScoreException.php +++ b/ScoreException.php @@ -31,9 +31,9 @@ /** * Constructor. * - * @param $message Message to create error message from. Should have one $1 parameter. - * @param $code int optionally, an error code. - * @param $previous Exception that caused this exception. + * @param Message $message Message to create error message from. Should have one $1 parameter. + * @param int $code optionally, an error code. + * @param Exception $previous Exception that caused this exception. */ public function __construct( $message, $code = 0, Exception $previous = null ) { parent::__construct( $message->inContentLanguage()->parse(), $code, $previous ); diff --git a/phpcs.xml b/phpcs.xml index 23fe89a..d81f486 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,16 +2,11 @@ <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.Commenting.FunctionComment.MissingDocumentationPublic" /> <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" /> </rule> <file>.</file> <arg name="extensions" value="php,php5,inc" /> - <arg name="encoding" value="utf8" /> - <exclude-pattern>vendor</exclude-pattern> - <exclude-pattern>node_modules</exclude-pattern> + <arg name="encoding" value="UTF-8" /> </ruleset> -- To view, visit https://gerrit.wikimedia.org/r/382948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2e6025ed564506469f38db911ea638fd49d7390 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits