[MediaWiki-commits] [Gerrit] mediawiki...GraphViz[master]: Improve some parameter docs

2018-01-19 Thread Welterkj (Code Review)
Welterkj has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402651 )

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I3ff96ec363776a12be0cc5247b3de74d172c6bd9
---
M .phpcs.xml
M includes/GraphViz.php
M includes/UploadFromLocalFile.php
M includes/UploadLocalFile.php
4 files changed, 98 insertions(+), 54 deletions(-)

Approvals:
  Welterkj: Verified; Looks good to me, approved
  Samwilson: Looks good to me, but someone else must approve



diff --git a/.phpcs.xml b/.phpcs.xml
index f9408cd..6cbe822 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,8 +6,6 @@



-   
-   

.

diff --git a/includes/GraphViz.php b/includes/GraphViz.php
index c1f5d91..bcfc101 100644
--- a/includes/GraphViz.php
+++ b/includes/GraphViz.php
@@ -185,7 +185,8 @@
/**
 * Check if a given image type is probably allowed to be uploaded
 * (does not consult any file extension blacklists).
-* @param[in] string $imageType is the type of image (e.g. png) to 
check.
+* @param string $imageType is the type of image (e.g. png) to check.
+* @return bool
 * @author Keith Welter
 */
public static function imageTypeAllowed( $imageType ) {
@@ -201,6 +202,7 @@
/**
 * Set parser hook functions for supported graph types.
 * @author Keith Welter
+* @param Parser &$parser
 * @return true
 */
public static function onParserInit( Parser &$parser ) {
@@ -213,6 +215,10 @@
/**
 * When an article is deleted, delete all the associated graph files.
 * @author Keith Welter
+* @param Article &$article
+* @param User &$user
+* @param string $reason
+* @param int $id
 */
public static function onArticleDeleteComplete( &$article, User &$user, 
$reason, $id ) {
self::deleteArticleUploadedFiles( $article, self::getImageDir() 
);
@@ -223,6 +229,8 @@
/**
 * For a given title, get the corresponding graph file base name.
 * @author Keith Welter
+* @param Title $title
+* @return string
 */
public static function getGraphFileBaseNameFromTitle( $title ) {
$baseName = $title->getFulltext();
@@ -233,6 +241,8 @@
/**
 * Delete all the graph files associated with the given article and 
path.
 * @author Keith Welter
+* @param Article $article
+* @param string $path
 */
public static function deleteArticleFiles( $article, $path ) {
$title = $article->getTitle();
@@ -244,6 +254,8 @@
 
/**
 * Detect if the given title has associated graph files at the given 
path.
+* @param Title $title
+* @param string $path
 * @return True if the title has associated graph files.  Otherwise 
false.
 * @author Keith Welter
 */
@@ -262,6 +274,8 @@
/**
 * Delete all uploaded files associated with the given article and path.
 * @author Keith Welter
+* @param Article $article
+* @param string $path
 */
public static function deleteArticleUploadedFiles( $article, $path ) {
wfDebug( __METHOD__ . ": entering\n" );
@@ -280,6 +294,8 @@
/**
 * Delete all the graph files associated with the graph name and path.
 * @author Keith Welter
+* @param string $graphName
+* @param string $path
 */
public static function deleteGraphFiles( $graphName, $path ) {
$globPattern = $path . $graphName . "*.*";
@@ -293,6 +309,10 @@
 * the parser cache reflects the canceled edit rather than the saved 
graph so we must
 * reject it.
 * @author Keith Welter
+* @param ParserOutput $parserOutput
+* @param WikiPage $wikiPage
+* @param ParserOptions $parserOptions
+* @return bool
 */
public static function onRejectParserCacheValue( $parserOutput, 
$wikiPage, $parserOptions ) {
$title = $wikiPage->getTitle();
@@ -313,6 +333,16 @@
 * (graph images for which the source wiki text has been deleted).
 * Graph images for extant wiki source will be regenerated when parsed.
 * @author Keith Welter
+* @param \WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param bool $isMinor
+* @param bool $isWatch
+* @param string|int $section
+* @param int $flags
+* @param Status $status
+* @return true
 */
public static function onPageContentSave(
\WikiPage $wikiPage, $user, $content,
@@ -329,7 +359,7 @@
}
 
 

[MediaWiki-commits] [Gerrit] mediawiki...GraphViz[master]: Improve some parameter docs

2018-01-07 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402651 )

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I3ff96ec363776a12be0cc5247b3de74d172c6bd9
---
M .phpcs.xml
M includes/GraphViz.php
M includes/UploadFromLocalFile.php
M includes/UploadLocalFile.php
4 files changed, 98 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GraphViz 
refs/changes/51/402651/1

diff --git a/.phpcs.xml b/.phpcs.xml
index f9408cd..6cbe822 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,8 +6,6 @@



-   
-   

.

diff --git a/includes/GraphViz.php b/includes/GraphViz.php
index c1f5d91..d64c7cc 100644
--- a/includes/GraphViz.php
+++ b/includes/GraphViz.php
@@ -185,7 +185,8 @@
/**
 * Check if a given image type is probably allowed to be uploaded
 * (does not consult any file extension blacklists).
-* @param[in] string $imageType is the type of image (e.g. png) to 
check.
+* @param string $imageType is the type of image (e.g. png) to check.
+* @return bool
 * @author Keith Welter
 */
public static function imageTypeAllowed( $imageType ) {
@@ -201,6 +202,7 @@
/**
 * Set parser hook functions for supported graph types.
 * @author Keith Welter
+* @param Parser &$parser
 * @return true
 */
public static function onParserInit( Parser &$parser ) {
@@ -213,6 +215,10 @@
/**
 * When an article is deleted, delete all the associated graph files.
 * @author Keith Welter
+* @param Article &$article
+* @param User &$user
+* @param string $reason
+* @param int $id
 */
public static function onArticleDeleteComplete( &$article, User &$user, 
$reason, $id ) {
self::deleteArticleUploadedFiles( $article, self::getImageDir() 
);
@@ -223,6 +229,8 @@
/**
 * For a given title, get the corresponding graph file base name.
 * @author Keith Welter
+* @param Title $title
+* @return string
 */
public static function getGraphFileBaseNameFromTitle( $title ) {
$baseName = $title->getFulltext();
@@ -233,6 +241,8 @@
/**
 * Delete all the graph files associated with the given article and 
path.
 * @author Keith Welter
+* @param Article $article
+* @param string $path
 */
public static function deleteArticleFiles( $article, $path ) {
$title = $article->getTitle();
@@ -244,6 +254,8 @@
 
/**
 * Detect if the given title has associated graph files at the given 
path.
+* @param TItle $title
+* @param string $path
 * @return True if the title has associated graph files.  Otherwise 
false.
 * @author Keith Welter
 */
@@ -262,6 +274,8 @@
/**
 * Delete all uploaded files associated with the given article and path.
 * @author Keith Welter
+* @param Article $article
+* @param string $path
 */
public static function deleteArticleUploadedFiles( $article, $path ) {
wfDebug( __METHOD__ . ": entering\n" );
@@ -280,6 +294,8 @@
/**
 * Delete all the graph files associated with the graph name and path.
 * @author Keith Welter
+* @param string $graphName
+* @param string $path
 */
public static function deleteGraphFiles( $graphName, $path ) {
$globPattern = $path . $graphName . "*.*";
@@ -293,6 +309,10 @@
 * the parser cache reflects the canceled edit rather than the saved 
graph so we must
 * reject it.
 * @author Keith Welter
+* @param ParserOutput $parserOutput
+* @param WikiPage $wikiPage
+* @param ParserOptions $parserOptions
+* @return bool
 */
public static function onRejectParserCacheValue( $parserOutput, 
$wikiPage, $parserOptions ) {
$title = $wikiPage->getTitle();
@@ -313,6 +333,16 @@
 * (graph images for which the source wiki text has been deleted).
 * Graph images for extant wiki source will be regenerated when parsed.
 * @author Keith Welter
+* @param \WikiPage $wikiPage
+* @param User $user
+* @param Content $content
+* @param string $summary
+* @param bool $isMinor
+* @param bool $isWatch
+* @param string|int $section
+* @param int $flags
+* @param Status $status
+* @return true
 */
public static function onPageContentSave(
\WikiPage $wikiPage, $user, $content,
@@ -329,7 +359,7 @@
}
 
/**
-*