Update the comments to PHPDoc style guidelines.

This commit is contained in:
jgen 2014-04-24 19:02:43 -04:00
parent ab3f9850e4
commit 4cc31df737

View file

@ -15,9 +15,9 @@ class DataUploadEvent extends Event {
/** /**
* Some data is being uploaded. * Some data is being uploaded.
* This should be caught by a file handler. * This should be caught by a file handler.
* @param $user The user uploading the data. * -- Removed: param $user The user uploading the data.
* @param $tmpname The temporary file used for upload. * @param $tmpname string The temporary file used for upload.
* @param $metadata Info about the file, should contain at least "filename", "extension", "tags" and "source". * @param $metadata array Info about the file, should contain at least "filename", "extension", "tags" and "source".
*/ */
public function __construct(/*string*/ $tmpname, /*array*/ $metadata) { public function __construct(/*string*/ $tmpname, /*array*/ $metadata) {
assert(file_exists($tmpname)); assert(file_exists($tmpname));
@ -59,7 +59,6 @@ class Upload extends Extension {
else { else {
$this->is_full = $free_num < MIN_FREE_SPACE; $this->is_full = $free_num < MIN_FREE_SPACE;
} }
} }
public function onPostListBuilding(PostListBuildingEvent $event) { public function onPostListBuilding(PostListBuildingEvent $event) {
@ -235,8 +234,8 @@ class Upload extends Extension {
* *
* TODO: Make these messages user/admin editable * TODO: Make these messages user/admin editable
* *
* @param $error_code PHP error code (int) * @param $error_code integer PHP error code
* @retval String * @return String
*/ */
private function upload_error_message($error_code) { private function upload_error_message($error_code) {
switch ($error_code) { switch ($error_code) {
@ -261,7 +260,11 @@ class Upload extends Extension {
/** /**
* Handle an upload. * Handle an upload.
* @retval bool TRUE on upload successful. * @param $file
* @param $tags
* @param $source
* @param string $replace
* @return bool TRUE on upload successful.
*/ */
private function try_upload($file, $tags, $source, $replace='') { private function try_upload($file, $tags, $source, $replace='') {
global $page, $config, $user; global $page, $config, $user;
@ -310,7 +313,11 @@ class Upload extends Extension {
/** /**
* Handle an transload. * Handle an transload.
* @retval bool TRUE on transload successful. * @param $url
* @param $tags
* @param $source
* @param string $replace
* @return bool TRUE on transload successful.
*/ */
private function try_transload($url, $tags, $source, $replace='') { private function try_transload($url, $tags, $source, $replace='') {
global $page, $config, $user; global $page, $config, $user;