From 073ff8fdb4c893a2279de58f5e05a713f8f6b3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Thu, 14 Dec 2017 18:27:26 +0800 Subject: [PATCH] * Format code --- module/bug/control.php | 152 ++++++++++++++++----------------- module/productplan/control.php | 94 ++++++++++++-------- 2 files changed, 135 insertions(+), 111 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 428b3c4b45..ad93f9e2a3 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -15,7 +15,7 @@ class bug extends control /** * Construct function, load some modules auto. - * + * * @access public * @return void */ @@ -43,7 +43,7 @@ class bug extends control /** * The index page, locate to browse. - * + * * @access public * @return void */ @@ -54,15 +54,15 @@ class bug extends control /** * Browse bugs. - * - * @param int $productID + * + * @param int $productID * @param string $branch - * @param string $browseType - * @param int $param - * @param string $orderBy - * @param int $recTotal - * @param int $recPerPage - * @param int $pageID + * @param string $browseType + * @param int $param + * @param string $orderBy + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ @@ -171,11 +171,11 @@ class bug extends control /** * The report page. - * - * @param int $productID - * @param string $browseType + * + * @param int $productID + * @param string $browseType * @param int $branchID - * @param int $moduleID + * @param int $moduleID * @access public * @return void */ @@ -211,8 +211,8 @@ class bug extends control /** * Create a bug. - * - * @param int $productID + * + * @param int $productID * @param string $extras others params, forexample, projectID=10,moduleID=10 * @access public * @return void @@ -375,11 +375,11 @@ class bug extends control } /** - * Batch create. - * - * @param int $productID - * @param int $projectID - * @param int $moduleID + * Batch create. + * + * @param int $productID + * @param int $projectID + * @param int $moduleID * @access public * @return void */ @@ -456,8 +456,8 @@ class bug extends control /** * View a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -484,7 +484,7 @@ class bug extends control /* Get product info. */ $productID = $bug->product; $productName = $this->products[$productID]; - + /* Header and positon. */ $this->view->title = "BUG #$bug->id $bug->title - " . $this->products[$productID]; $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName); @@ -506,8 +506,8 @@ class bug extends control /** * Edit a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -628,11 +628,11 @@ class bug extends control $this->bug->sendmail($bugID, $actionID); $bug = $this->bug->getById($bugID); - if($bug->toTask != 0) + if($bug->toTask != 0) { foreach($changes as $change) { - if($change['field'] == 'status') + if($change['field'] == 'status') { $confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask"); $cancelURL = $this->server->HTTP_REFERER; @@ -730,7 +730,7 @@ class bug extends control } /** - * Update assign of bug. + * Update assign of bug. * * @param int $bugID * @access public @@ -768,8 +768,8 @@ class bug extends control /** * Batch change branch. - * - * @param int $branchID + * + * @param int $branchID * @access public * @return void */ @@ -823,9 +823,9 @@ class bug extends control } /** - * Batch update assign of bug. - * - * @param int $projectID + * Batch update assign of bug. + * + * @param int $projectID * @access public * @return void */ @@ -854,8 +854,8 @@ class bug extends control /** * confirm a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -887,8 +887,8 @@ class bug extends control } /** - * Batch confirm bugs. - * + * Batch confirm bugs. + * * @access public * @return void */ @@ -906,11 +906,11 @@ class bug extends control $this->loadModel('score')->create('ajax', 'batchOther'); die(js::locate($this->session->bugList, 'parent')); } - + /** * Resolve a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -927,7 +927,7 @@ class bug extends control $this->bug->sendmail($bugID, $actionID); $bug = $this->bug->getById($bugID); - if($bug->toTask != 0) + if($bug->toTask != 0) { /* If task is not finished, update it's status. */ $task = $this->task->getById($bug->toTask); @@ -938,7 +938,7 @@ class bug extends control $cancelURL = $this->createLink('bug', 'view', "bugID=$bugID"); die(js::confirm(sprintf($this->lang->bug->remindTask, $bug->toTask), $confirmURL, $cancelURL, 'parent', 'parent.parent')); } - } + } if(isonlybody()) die(js::closeModal('parent.parent')); die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } @@ -967,9 +967,9 @@ class bug extends control /** * Batch resolve bugs. - * - * @param string $resolution - * @param string $resolvedBuild + * + * @param string $resolution + * @param string $resolvedBuild * @access public * @return void */ @@ -1026,8 +1026,8 @@ class bug extends control /** * Close a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -1144,8 +1144,8 @@ class bug extends control } /** - * Batch close bugs. - * + * Batch close bugs. + * * @access public * @return void */ @@ -1256,7 +1256,7 @@ class bug extends control /** * Save current template. - * + * * @access public * @return string */ @@ -1269,7 +1269,7 @@ class bug extends control /** * Build the user templates selection code. - * + * * @access public * @return void */ @@ -1281,8 +1281,8 @@ class bug extends control /** * Delete a user template. - * - * @param int $templateID + * + * @param int $templateID * @access public * @return void */ @@ -1294,8 +1294,8 @@ class bug extends control /** * AJAX: get bugs of a user in html select. - * - * @param string $account + * + * @param string $account * @param string $id the id of the select control. * @access public * @return string @@ -1311,9 +1311,9 @@ class bug extends control /** * AJAX: Get bug owner of a module. - * - * @param int $moduleID - * @param int $productID + * + * @param int $moduleID + * @param int $productID * @access public * @return string */ @@ -1325,32 +1325,32 @@ class bug extends control /** * AJAX: get team members of the project as assignedTo list. - * - * @param int $projectID - * @param string $selectedUser + * + * @param int $projectID + * @param string $selectedUser * @access public * @return string */ public function ajaxLoadAssignedTo($projectID, $selectedUser = '') { $projectMembers = $this->loadModel('project')->getTeamMemberPairs($projectID); - + die(html::select('assignedTo', $projectMembers, $selectedUser, 'class="form-control"')); } /** * AJAX: get team members of the latest project of a product as assignedTo list. - * - * @param int $productID + * + * @param int $productID * x - * @param string $selectedUser + * @param string $selectedUser * @access public * @return string */ public function ajaxLoadProjectTeamMembers($productID, $selectedUser = '') { $latestProject = $this->product->getLatestProject($productID); - if(!empty($latestProject)) + if(!empty($latestProject)) { $projectMembers = $this->loadModel('project')->getTeamMemberPairs($latestProject->id, 'nodeleted'); } @@ -1377,9 +1377,9 @@ class bug extends control } /** - * AJAX: get actions of a bug. for web app. - * - * @param int $bugID + * AJAX: get actions of a bug. for web app. + * + * @param int $bugID * @access public * @return void */ @@ -1390,10 +1390,10 @@ class bug extends control } /** - * Get data to export - * - * @param string $productID - * @param string $orderBy + * Get data to export + * + * @param string $productID + * @param string $orderBy * @access public * @return void */ @@ -1581,8 +1581,8 @@ class bug extends control /** * Ajax get bug by ID. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ diff --git a/module/productplan/control.php b/module/productplan/control.php index 638860fbce..48d00493ea 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -13,8 +13,10 @@ class productplan extends control { /** * Common actions - * - * @param int $productID + * + * @param int $productID + * @param int $branch + * * @access public * @return void */ @@ -33,8 +35,10 @@ class productplan extends control /** * Create a plan. - * - * @param int $product + * + * @param string $product + * @param int $branch + * * @access public * @return void */ @@ -70,8 +74,9 @@ class productplan extends control /** * Edit a plan. - * - * @param int $planID + * + * @param int $planID + * * @access public * @return void */ @@ -99,8 +104,10 @@ class productplan extends control /** * Batch edit plan. - * - * @param int $productID + * + * @param int $productID + * @param int $branch + * * @access public * @return void */ @@ -130,11 +137,11 @@ class productplan extends control } die(js::locate('back')); } - + /** * Delete a plan. - * - * @param int $planID + * + * @param int $planID * @param string $confirm yes|no * @access public * @return void @@ -171,11 +178,12 @@ class productplan extends control /** * Browse plans. - * - * @param int $product - * @param string $orderBy + * + * @param int $productID + * @param int $branch + * @param string $orderBy * @param string $browseType - * @param int $recTotal + * @param int $recTotal * @param int $recPerPage * @param int $pageID * @access public @@ -209,6 +217,9 @@ class productplan extends control * @param int $planID * @param string $type * @param string $orderBy + * @param string $link + * @param string $param + * * @access public * @return void */ @@ -248,10 +259,12 @@ class productplan extends control } /** - * Ajax: Get product plans. - * - * @param int $productID + * Ajax: Get product plans. + * + * @param int $productID + * @param int $branch * @param string $number + * * @access public * @return void */ @@ -267,7 +280,11 @@ class productplan extends control /** * Link stories. * - * @param int $planID + * @param int $planID + * @param string $browseType + * @param int $param + * @param string $orderBy + * * @access public * @return void */ @@ -340,9 +357,10 @@ class productplan extends control } /** - * Unlink story - * - * @param int $storyID + * Unlink story + * + * @param int $storyID + * @param int $planID * @param string $confirm yes|no * @access public * @return void @@ -377,9 +395,11 @@ class productplan extends control } /** - * Batch unlink story. - * - * @param string $confirm + * Batch unlink story. + * + * @param int $planID + * @param string $orderBy + * * @access public * @return void */ @@ -391,10 +411,12 @@ class productplan extends control /** * Link bugs. - * - * @param int $planID - * @param string $browseType - * @param int $param + * + * @param int $planID + * @param string $browseType + * @param int $param + * @param string $orderBy + * * @access public * @return void */ @@ -469,9 +491,9 @@ class productplan extends control } /** - * Unlink story - * - * @param int $bugID + * Unlink story + * + * @param int $bugID * @param string $confirm yes|no * @access public * @return void @@ -506,9 +528,11 @@ class productplan extends control } /** - * Batch unlink story. - * - * @param string $confirm + * Batch unlink story. + * + * @param $planID + * @param string $orderBy + * * @access public * @return void */