@@ -30,7 +30,6 @@ |
||
30 | 30 | public $swimline_id = self::FAKE_SWIMLINE_ID_FOR_TRACKER_RENDERER; |
31 | 31 | |
32 | 32 | /** |
33 | - * @param string $title |
|
34 | 33 | * @param array $cells |
35 | 34 | */ |
36 | 35 | public function __construct(array $cells) { |
@@ -74,14 +74,24 @@ |
||
74 | 74 | $this->assertNotIn($column); |
75 | 75 | } |
76 | 76 | |
77 | + /** |
|
78 | + * @param Cardwall_Column $column |
|
79 | + */ |
|
77 | 80 | private function assertIn($column) { |
78 | 81 | $this->assertTrue($this->config->isInColumn($this->artifact, $this->field_provider, $column)); |
79 | 82 | } |
80 | 83 | |
84 | + /** |
|
85 | + * @param Cardwall_Column $column |
|
86 | + */ |
|
81 | 87 | private function assertNotIn($column) { |
82 | 88 | $this->assertFalse($this->config->isInColumn($this->artifact, $this->field_provider, $column)); |
83 | 89 | } |
84 | 90 | |
91 | + /** |
|
92 | + * @param integer $id |
|
93 | + * @param string $label |
|
94 | + */ |
|
85 | 95 | public function newCardwall_Column($id, $label) { |
86 | 96 | $bgcolor = $fgcolor = 0; |
87 | 97 | return new Cardwall_Column($id, $label, $bgcolor, $fgcolor); |
@@ -117,6 +117,9 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | + /** |
|
121 | + * @param DOMElement $mdNode |
|
122 | + */ |
|
120 | 123 | protected function getNodeForMetadataValues($mdValues, $mdNode) { |
121 | 124 | foreach($mdValues as $val) { |
122 | 125 | if($val->getId() != 100) { |
@@ -223,6 +226,9 @@ discard block |
||
223 | 226 | return $this->userCache[$userId]; |
224 | 227 | } |
225 | 228 | |
229 | + /** |
|
230 | + * @param integer $statusId |
|
231 | + */ |
|
226 | 232 | protected function getNormalizedStatus($statusId) { |
227 | 233 | switch($statusId) { |
228 | 234 | case PLUGIN_DOCMAN_ITEM_STATUS_NONE: |
@@ -242,6 +248,9 @@ discard block |
||
242 | 248 | } |
243 | 249 | } |
244 | 250 | |
251 | + /** |
|
252 | + * @param string $label |
|
253 | + */ |
|
245 | 254 | protected function appendChild(DOMElement $node, $label, $value) { |
246 | 255 | if($value != '') { |
247 | 256 | $subNode = $this->doc->createElement($label); |
@@ -61,6 +61,9 @@ |
||
61 | 61 | return $doc; |
62 | 62 | } |
63 | 63 | |
64 | + /** |
|
65 | + * @param DOMDocument $doc |
|
66 | + */ |
|
64 | 67 | public function appendDocman($doc) { |
65 | 68 | $docmanExport = new Docman_XMLExport($this->logger); |
66 | 69 | $docmanExport->setGroupId($this->groupId); |
@@ -94,6 +94,9 @@ |
||
94 | 94 | ); |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @param integer $folder_id |
|
99 | + */ |
|
97 | 100 | private function importDump(Project $project, $folder_id) { |
98 | 101 | $xml_import = new XMLDocmanImport( |
99 | 102 | 'import:', |
@@ -117,6 +117,7 @@ |
||
117 | 117 | |
118 | 118 | /** |
119 | 119 | * Set recursively the given tag to all nodes of the tree |
120 | + * @param string $tag |
|
120 | 121 | */ |
121 | 122 | private static function tagTree(&$tree, $tag) { |
122 | 123 | $tree['tag'] = $tag; |
@@ -98,10 +98,17 @@ discard block |
||
98 | 98 | /** |
99 | 99 | * XMLDocmanImport constructor |
100 | 100 | * |
101 | - * @param int $groupId Group ID |
|
102 | 101 | * @param string $wsdl WSDL location |
103 | 102 | * @param string $login Login |
104 | 103 | * @param string $password Password |
104 | + * @param string $command |
|
105 | + * @param string $project |
|
106 | + * @param integer $projectId |
|
107 | + * @param boolean $force |
|
108 | + * @param boolean $reorder |
|
109 | + * @param string $importMessageMetadata |
|
110 | + * @param boolean $autoRetry |
|
111 | + * @param boolean $log |
|
105 | 112 | */ |
106 | 113 | public function __construct($command, $project, $projectId, $wsdl, $login, $password, $force, $reorder, $importMessageMetadata, $autoRetry, $log) { |
107 | 114 | |
@@ -150,6 +157,8 @@ discard block |
||
150 | 157 | /** |
151 | 158 | * Search the next file name that can be used |
152 | 159 | * If the file "name" exists in the folder, the next name to use is "name (2)", then "name (3)", etc. |
160 | + * @param string $folder |
|
161 | + * @param string $fileName |
|
153 | 162 | */ |
154 | 163 | private function searchNextFreeFileName($folder, $fileName) { |
155 | 164 | |
@@ -245,6 +254,8 @@ discard block |
||
245 | 254 | |
246 | 255 | /** |
247 | 256 | * Import an item to the specified parent folder |
257 | + * @param string $xmlDoc |
|
258 | + * @param string $path |
|
248 | 259 | */ |
249 | 260 | public function importPath($xmlDoc, $parentId, $path) { |
250 | 261 | |
@@ -679,6 +690,7 @@ discard block |
||
679 | 690 | |
680 | 691 | /** |
681 | 692 | * Converts a string to a type code |
693 | + * @param string $type |
|
682 | 694 | */ |
683 | 695 | private static function typeStringToCode($type) { |
684 | 696 | switch ($type) { |
@@ -692,6 +704,7 @@ discard block |
||
692 | 704 | |
693 | 705 | /** |
694 | 706 | * Displays an error and terminates execution of the script |
707 | + * @param string $error |
|
695 | 708 | */ |
696 | 709 | protected function exitError($error) { |
697 | 710 | exit (PHP_EOL."Fatal error: ".PHP_EOL.$error.PHP_EOL); |
@@ -754,6 +767,7 @@ discard block |
||
754 | 767 | |
755 | 768 | /** |
756 | 769 | * Parse a date given as an ISO8601 date or a timestamp |
770 | + * @param string $s |
|
757 | 771 | * @return The corresponding timestamp |
758 | 772 | */ |
759 | 773 | private function parseDate($s) { |
@@ -956,6 +970,9 @@ discard block |
||
956 | 970 | |
957 | 971 | } |
958 | 972 | |
973 | + /** |
|
974 | + * @param Exception $e |
|
975 | + */ |
|
959 | 976 | protected function askWhatToDo($e) { |
960 | 977 | self::printException($e); |
961 | 978 | |
@@ -994,6 +1011,8 @@ discard block |
||
994 | 1011 | |
995 | 1012 | /** |
996 | 1013 | * Creates a folder |
1014 | + * @param integer $parentId |
|
1015 | + * @param string $ordering |
|
997 | 1016 | */ |
998 | 1017 | private function createFolder($parentId, $title, $description, $ordering, $status, array $permissions, array $metadata, $owner, $createDate, $updateDate) { |
999 | 1018 | $this->initRetryCounter(); |
@@ -1014,6 +1033,8 @@ discard block |
||
1014 | 1033 | |
1015 | 1034 | /** |
1016 | 1035 | * Creates an empty document |
1036 | + * @param integer $parentId |
|
1037 | + * @param string $ordering |
|
1017 | 1038 | */ |
1018 | 1039 | private function createEmpty($parentId, $title, $description, $ordering, $status, $obsolescenceDate, array $permissions, array $metadata, $owner, $createDate, $updateDate) { |
1019 | 1040 | $this->initRetryCounter(); |
@@ -1034,6 +1055,9 @@ discard block |
||
1034 | 1055 | |
1035 | 1056 | /** |
1036 | 1057 | * Creates a wiki page |
1058 | + * @param integer $parentId |
|
1059 | + * @param string $ordering |
|
1060 | + * @param string $pagename |
|
1037 | 1061 | */ |
1038 | 1062 | private function createWiki($parentId, $title, $description, $ordering, $status, $obsolescenceDate, array $permissions, array $metadata, $pagename, $owner, $createDate, $updateDate) { |
1039 | 1063 | $this->initRetryCounter(); |
@@ -1054,6 +1078,9 @@ discard block |
||
1054 | 1078 | |
1055 | 1079 | /** |
1056 | 1080 | * Creates a link |
1081 | + * @param integer $parentId |
|
1082 | + * @param string $ordering |
|
1083 | + * @param string $url |
|
1057 | 1084 | */ |
1058 | 1085 | private function createLink($parentId, $title, $description, $ordering, $status, $obsolescenceDate, array $permissions, array $metadata, $url, $owner, $createDate, $updateDate) { |
1059 | 1086 | $this->initRetryCounter(); |
@@ -1074,6 +1101,10 @@ discard block |
||
1074 | 1101 | |
1075 | 1102 | /** |
1076 | 1103 | * Creates an embedded file |
1104 | + * @param integer $parentId |
|
1105 | + * @param string $ordering |
|
1106 | + * @param string $file |
|
1107 | + * @param string $author |
|
1077 | 1108 | */ |
1078 | 1109 | private function createEmbeddedFile($parentId, $title, $description, $ordering, $status, $obsolescenceDate, array $permissions, array $metadata, $file, $author, $date, $owner, $createDate, $updateDate) { |
1079 | 1110 | $this->initRetryCounter(); |
@@ -1096,6 +1127,12 @@ discard block |
||
1096 | 1127 | |
1097 | 1128 | /** |
1098 | 1129 | * Creates a file |
1130 | + * @param integer $parentId |
|
1131 | + * @param string $ordering |
|
1132 | + * @param string $file |
|
1133 | + * @param string $fileName |
|
1134 | + * @param string $fileType |
|
1135 | + * @param string $author |
|
1099 | 1136 | */ |
1100 | 1137 | private function createFile($parentId, $title, $description, $ordering, $status, $obsolescenceDate, array $permissions, array $metadata, $file, $fileName, $fileType, $author, $date, $owner, $createDate, $updateDate) { |
1101 | 1138 | $infoStr = "Creating file '$title' ($file, $fileName, $fileType)"; |
@@ -1157,7 +1194,8 @@ discard block |
||
1157 | 1194 | /** |
1158 | 1195 | * Compares the local and the distant checksums |
1159 | 1196 | * |
1160 | - * @return true if they are the same |
|
1197 | + * @param string $filename |
|
1198 | + * @return boolean if they are the same |
|
1161 | 1199 | */ |
1162 | 1200 | private function checkChecksum($item_id, $filename) { |
1163 | 1201 | |
@@ -1178,6 +1216,12 @@ discard block |
||
1178 | 1216 | |
1179 | 1217 | /** |
1180 | 1218 | * Create a new file version |
1219 | + * @param string $label |
|
1220 | + * @param string $changeLog |
|
1221 | + * @param string $file |
|
1222 | + * @param string $fileName |
|
1223 | + * @param string $fileType |
|
1224 | + * @param string $author |
|
1181 | 1225 | */ |
1182 | 1226 | protected function createFileVersion($itemId, $label, $changeLog, $file, $fileName, $fileType, $author, $date) { |
1183 | 1227 | $infoStr = " Version '$label' ($file, $fileName, $fileType)"; |
@@ -1232,6 +1276,12 @@ discard block |
||
1232 | 1276 | } |
1233 | 1277 | } |
1234 | 1278 | |
1279 | + /** |
|
1280 | + * @param string $label |
|
1281 | + * @param string $changeLog |
|
1282 | + * @param string $file |
|
1283 | + * @param string $author |
|
1284 | + */ |
|
1235 | 1285 | protected function createEmbeddedFileVersion($itemId, $label, $changeLog, $file, $author, $date) { |
1236 | 1286 | $this->initRetryCounter(); |
1237 | 1287 | do { |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | /** |
295 | 295 | * Compares the version checksums in order to decide what to do. |
296 | 296 | * For each version of the item, the checksum of the local file and the remote file are compared |
297 | - * @return true if we just have to send the new versions to the server |
|
297 | + * @return boolean if we just have to send the new versions to the server |
|
298 | 298 | * false if some versions have been created server-side (so we will need to delete and recreate the whole item) |
299 | 299 | */ |
300 | 300 | private function checkVersionChecksums($itemId, $node) { |
@@ -510,6 +510,7 @@ discard block |
||
510 | 510 | |
511 | 511 | /** |
512 | 512 | * Updates a wiki document |
513 | + * @param string $pageName |
|
513 | 514 | */ |
514 | 515 | private function updateWiki($itemId, $itemInfo, $pageName) { |
515 | 516 | // Assign variables |
@@ -542,6 +543,7 @@ discard block |
||
542 | 543 | |
543 | 544 | /** |
544 | 545 | * Updates a link |
546 | + * @param string $url |
|
545 | 547 | */ |
546 | 548 | private function updateLink($itemId, $itemInfo, $url) { |
547 | 549 | // Assign variables |
@@ -172,6 +172,10 @@ |
||
172 | 172 | |
173 | 173 | // Reviewers management |
174 | 174 | // Should be managed with SplObjectStorage in Php 5 |
175 | + |
|
176 | + /** |
|
177 | + * @param Docman_ApprovalReviewer $reviewer |
|
178 | + */ |
|
175 | 179 | function addReviewer($reviewer) { |
176 | 180 | $this->reviewers[$reviewer->getId()] = $reviewer; |
177 | 181 | } |