@@ -27,7 +27,7 @@ |
||
27 | 27 | /** |
28 | 28 | * Search for data in the index, filter them with permissions |
29 | 29 | * |
30 | - * @param String $term terms |
|
30 | + * @param String $terms terms |
|
31 | 31 | * @param array $facets submitted by user for faceted navigation |
32 | 32 | * @param int $offset The offset of the search |
33 | 33 | * @param PFUser $user The user which do the request |
@@ -182,7 +182,6 @@ discard block |
||
182 | 182 | * Update document approval comments |
183 | 183 | * |
184 | 184 | * @param Docman_Item $item |
185 | - * @param Docman_Version $version |
|
186 | 185 | */ |
187 | 186 | public function indexDocumentApprovalComment(Docman_Item $item) { |
188 | 187 | $this->logger->debug('index new document approval comment #' . $item->getId()); |
@@ -227,7 +226,7 @@ discard block |
||
227 | 226 | * Index a new document with permissions |
228 | 227 | * |
229 | 228 | * @param Docman_Item $item The docman item |
230 | - * @param Docman_Version $version The version to index |
|
229 | + * @param Docman_LinkVersion $version The version to index |
|
231 | 230 | */ |
232 | 231 | public function indexNewLinkVersion(Docman_Item $item, Docman_LinkVersion $version) { |
233 | 232 | try { |
@@ -245,7 +244,6 @@ discard block |
||
245 | 244 | * Index a new wiki document with permissions |
246 | 245 | * |
247 | 246 | * @param Docman_Item $item The docman item |
248 | - * @param Docman_Version $version The version to index |
|
249 | 247 | * @param array $wiki_page_metadata WikiPage metadata |
250 | 248 | */ |
251 | 249 | public function indexNewWikiVersion(Docman_Item $item, array $wiki_page_metadata) { |
@@ -411,6 +409,9 @@ discard block |
||
411 | 409 | |
412 | 410 | } |
413 | 411 | |
412 | + /** |
|
413 | + * @param integer $project_id |
|
414 | + */ |
|
414 | 415 | public function reIndexProjectDocuments( |
415 | 416 | Docman_ProjectItemsBatchIterator $document_iterator, |
416 | 417 | $project_id, |
@@ -24,6 +24,9 @@ |
||
24 | 24 | |
25 | 25 | class FulltextsearchPluginInfo extends PluginFileInfo { |
26 | 26 | |
27 | + /** |
|
28 | + * @param fulltextsearchPlugin $plugin |
|
29 | + */ |
|
27 | 30 | public function __construct($plugin) { |
28 | 31 | parent::__construct($plugin, 'fulltextsearch'); |
29 | 32 | $this->setPluginDescriptor(new FulltextsearchPluginDescriptor()); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @param FullTextSearch_IIndexDocuments $client Search client |
45 | 45 | * |
46 | - * @return Void |
|
46 | + * @return FullTextSearchTrackerActions |
|
47 | 47 | */ |
48 | 48 | public function __construct(FullTextSearch_IIndexDocuments $client, ElasticSearch_1_2_RequestTrackerDataFactory $tracker_data_factory, Logger $logger) { |
49 | 49 | $this->client = $client; |
@@ -77,6 +77,9 @@ discard block |
||
77 | 77 | $this->indexAllArtifacts($tracker); |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param Tracker $tracker |
|
82 | + */ |
|
80 | 83 | private function deleteTracker($tracker) { |
81 | 84 | $tracker_id = $tracker->getId(); |
82 | 85 |
@@ -44,6 +44,10 @@ discard block |
||
44 | 44 | $this->logger = $logger; |
45 | 45 | } |
46 | 46 | |
47 | + /** |
|
48 | + * @param integer $project_id |
|
49 | + * @param integer $wiki_page_id |
|
50 | + */ |
|
47 | 51 | private function indexOrUpdate($project_id, $wiki_page_id, $data) { |
48 | 52 | try { |
49 | 53 | $this->client->getIndexedElement($project_id, $wiki_page_id); |
@@ -113,6 +117,9 @@ discard block |
||
113 | 117 | } |
114 | 118 | } |
115 | 119 | |
120 | + /** |
|
121 | + * @param integer $project_id |
|
122 | + */ |
|
116 | 123 | private function deleteForProject($project_id) { |
117 | 124 | $this->logger->debug('[Wiki] ElasticSearch: deleting all project wiki pages #' . $project_id); |
118 | 125 | |
@@ -143,6 +150,9 @@ discard block |
||
143 | 150 | $this->indexOrUpdate($wiki_page->getGid(), $wiki_page->getId(), $update_data); |
144 | 151 | } |
145 | 152 | |
153 | + /** |
|
154 | + * @param integer $project_id |
|
155 | + */ |
|
146 | 156 | private function indexAllProjectWikiPages($project_id) { |
147 | 157 | $indexable_pages = $this->getAllIndexablePagesForProject($project_id); |
148 | 158 |
@@ -98,6 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
101 | + * @param integer $version_number |
|
101 | 102 | * @return Docman_Version |
102 | 103 | */ |
103 | 104 | protected function getVersion(Docman_Item $item, $version_number) { |
@@ -120,6 +121,11 @@ discard block |
||
120 | 121 | return $txt; |
121 | 122 | } |
122 | 123 | |
124 | + /** |
|
125 | + * @param integer $group_id |
|
126 | + * @param integer $item_id |
|
127 | + * @param boolean $with_link |
|
128 | + */ |
|
123 | 129 | private function verbalizeDocmanItemId($group_id, $item_id, $with_link) { |
124 | 130 | $txt = '#'. $item_id; |
125 | 131 | if ($with_link) { |
@@ -33,7 +33,8 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | - * @return Docman_Version |
|
36 | + * @param integer $version_number |
|
37 | + * @return null|Docman_LinkVersion |
|
37 | 38 | */ |
38 | 39 | private function getLinkVersion(Docman_Link $item, $version_number) { |
39 | 40 | return $this->link_version_factory->getSpecificVersion($item, $version_number); |
@@ -55,6 +55,10 @@ discard block |
||
55 | 55 | return false; |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param integer $group_id |
|
60 | + * @param string $wiki_page_name |
|
61 | + */ |
|
58 | 62 | protected function getWikiPage($group_id, $wiki_page_name) { |
59 | 63 | return new WikiPage($group_id, $wiki_page_name); |
60 | 64 | } |
@@ -65,6 +69,7 @@ discard block |
||
65 | 69 | * @see process() |
66 | 70 | * |
67 | 71 | * @param WikiPage $wiki_page The wiki page |
72 | + * @param integer $group_id |
|
68 | 73 | * |
69 | 74 | * @return bool true if success (means status=done), false otherwise |
70 | 75 | */ |
@@ -82,6 +87,11 @@ discard block |
||
82 | 87 | return $txt; |
83 | 88 | } |
84 | 89 | |
90 | + /** |
|
91 | + * @param integer $group_id |
|
92 | + * @param string $wiki_page_name |
|
93 | + * @param boolean $with_link |
|
94 | + */ |
|
85 | 95 | private function verbalizeWikiPageId($group_id, $wiki_page_name, $with_link) { |
86 | 96 | if ($with_link) { |
87 | 97 | $txt = '<a href="/wiki/index.php?group_id='. $group_id .'&pagename='. $wiki_page_name.'">'. $wiki_page_name .'</a>'; |
@@ -45,26 +45,41 @@ |
||
45 | 45 | return $docman_file; |
46 | 46 | } |
47 | 47 | |
48 | + /** |
|
49 | + * @param integer $item_id |
|
50 | + */ |
|
48 | 51 | public function withId($item_id) { |
49 | 52 | $this->item_id = $item_id; |
50 | 53 | return $this; |
51 | 54 | } |
52 | 55 | |
56 | + /** |
|
57 | + * @param integer $group_id |
|
58 | + */ |
|
53 | 59 | public function withGroupId($group_id) { |
54 | 60 | $this->group_id = $group_id; |
55 | 61 | return $this; |
56 | 62 | } |
57 | 63 | |
64 | + /** |
|
65 | + * @param integer $owner_id |
|
66 | + */ |
|
58 | 67 | public function withOwnerId($owner_id) { |
59 | 68 | $this->owner_id = $owner_id; |
60 | 69 | return $this; |
61 | 70 | } |
62 | 71 | |
72 | + /** |
|
73 | + * @param string $title |
|
74 | + */ |
|
63 | 75 | public function withTitle($title) { |
64 | 76 | $this->title = $title; |
65 | 77 | return $this; |
66 | 78 | } |
67 | 79 | |
80 | + /** |
|
81 | + * @param string $description |
|
82 | + */ |
|
68 | 83 | public function withDescription($description) { |
69 | 84 | $this->description = $description; |
70 | 85 | return $this; |