@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | * Creates a new filename for the current Document's file when replacing the |
198 | 198 | * current file with a new file. |
199 | 199 | * |
200 | - * @param DMSDocument $filename The original filename |
|
201 | 200 | * |
201 | + * @param integer $versionCounter |
|
202 | 202 | * @return string The new filename |
203 | 203 | */ |
204 | 204 | protected function generateVersionedFilename(DMSDocument $doc, $versionCounter) |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | /** |
243 | 243 | * Return the size of the file associated with the document. |
244 | 244 | * |
245 | - * @return string |
|
245 | + * @return integer |
|
246 | 246 | */ |
247 | 247 | public function getAbsoluteSize() |
248 | 248 | { |
@@ -32,6 +32,9 @@ discard block |
||
32 | 32 | return $found; |
33 | 33 | } |
34 | 34 | |
35 | + /** |
|
36 | + * @param integer $number |
|
37 | + */ |
|
35 | 38 | public function findPageCount($number) |
36 | 39 | { |
37 | 40 | $list = $this->getList($number); |
@@ -63,6 +66,7 @@ discard block |
||
63 | 66 | * Returns a filtered list of fields which could contain shortcodes. |
64 | 67 | * |
65 | 68 | * @param String |
69 | + * @param string $class |
|
66 | 70 | * @return Array Map of class names to an array of field names on these classes. |
67 | 71 | */ |
68 | 72 | public function getShortcodeFields($class) |
@@ -20,6 +20,9 @@ |
||
20 | 20 | self::$is_running_test = $this->originalIsRunningTest; |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param integer $id |
|
25 | + */ |
|
23 | 26 | public function createFakeHTTPRequest($id) |
24 | 27 | { |
25 | 28 | $r = new SS_HTTPRequest('GET', 'index/'.$id); |
@@ -4,6 +4,10 @@ |
||
4 | 4 | { |
5 | 5 | public $useFieldContext = true; |
6 | 6 | |
7 | + /** |
|
8 | + * @param string $name |
|
9 | + * @param string $title |
|
10 | + */ |
|
7 | 11 | public function __construct($name, $title = null) |
8 | 12 | { |
9 | 13 | $this->name = $name; |
@@ -57,6 +57,9 @@ discard block |
||
57 | 57 | return BASE_PATH . DIRECTORY_SEPARATOR . self::$dmsFolder; |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @return string |
|
62 | + */ |
|
60 | 63 | public static function transform_file_to_file_path($file) |
61 | 64 | { |
62 | 65 | //confirm we have a file |
@@ -77,7 +80,7 @@ discard block |
||
77 | 80 | /** |
78 | 81 | * Takes a File object or a String (path to a file) and copies it into the DMS. The original file remains unchanged. |
79 | 82 | * When storing a document, sets the fields on the File has "tag" metadata. |
80 | - * @param $file File object, or String that is path to a file to store, |
|
83 | + * @param string $file File object, or String that is path to a file to store, |
|
81 | 84 | * e.g. "assets/documents/industry/supplied-v1-0.pdf" |
82 | 85 | * @return DMSDocument |
83 | 86 | */ |
@@ -149,7 +152,7 @@ discard block |
||
149 | 152 | |
150 | 153 | /** |
151 | 154 | * Creates a storage folder for the given path |
152 | - * @param $path Path to create a folder for |
|
155 | + * @param string $path Path to create a folder for |
|
153 | 156 | */ |
154 | 157 | public static function create_storage_folder($path) |
155 | 158 | { |
@@ -160,6 +163,7 @@ discard block |
||
160 | 163 | |
161 | 164 | /** |
162 | 165 | * Calculates the storage path from a database DMSDocument ID |
166 | + * @param integer $id |
|
163 | 167 | */ |
164 | 168 | public static function get_storage_folder($id) |
165 | 169 | { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * For method {@link DMSDocumentSet::getDocuments} |
19 | 19 | * |
20 | - * @param ArrayList $relatedDocuments |
|
20 | + * @param ArrayList $documents |
|
21 | 21 | * @return ArrayList |
22 | 22 | */ |
23 | 23 | public function updateDocuments($documents) |
@@ -28,6 +28,7 @@ discard block |
||
28 | 28 | * Override the default behaviour of the UploadField and take the uploaded file (uploaded to assets) and |
29 | 29 | * add it into the DMS storage, deleting the old/uploaded file. |
30 | 30 | * @param File |
31 | + * @param File $file |
|
31 | 32 | */ |
32 | 33 | protected function attachFile($file) |
33 | 34 | { |
@@ -54,6 +55,9 @@ discard block |
||
54 | 55 | return $doc; |
55 | 56 | } |
56 | 57 | |
58 | + /** |
|
59 | + * @param string $validator |
|
60 | + */ |
|
57 | 61 | public function validate($validator) |
58 | 62 | { |
59 | 63 | return true; |
@@ -63,7 +67,7 @@ discard block |
||
63 | 67 | * Action to handle upload of a single file |
64 | 68 | * |
65 | 69 | * @param SS_HTTPRequest $request |
66 | - * @return string json |
|
70 | + * @return SS_HTTPResponse json |
|
67 | 71 | */ |
68 | 72 | public function upload(SS_HTTPRequest $request) |
69 | 73 | { |
@@ -40,6 +40,9 @@ |
||
40 | 40 | */ |
41 | 41 | protected $results = array(); |
42 | 42 | |
43 | + /** |
|
44 | + * @param SS_HTTPRequest $request |
|
45 | + */ |
|
43 | 46 | public function run($request) |
44 | 47 | { |
45 | 48 | $this->request = $request; |
@@ -103,6 +103,9 @@ discard block |
||
103 | 103 | 'permissions' => 'Permissions' |
104 | 104 | ); |
105 | 105 | |
106 | + /** |
|
107 | + * @param DataObject $member |
|
108 | + */ |
|
106 | 109 | public function canView($member = null) |
107 | 110 | { |
108 | 111 | if (!$member || !(is_a($member, 'Member')) || is_numeric($member)) { |
@@ -1185,7 +1188,7 @@ discard block |
||
1185 | 1188 | /** |
1186 | 1189 | * Return the size of the file associated with the document. |
1187 | 1190 | * |
1188 | - * @return string |
|
1191 | + * @return integer|null |
|
1189 | 1192 | */ |
1190 | 1193 | public function getAbsoluteSize() |
1191 | 1194 | { |
@@ -1204,7 +1207,8 @@ discard block |
||
1204 | 1207 | |
1205 | 1208 | |
1206 | 1209 | /** |
1207 | - * @return FieldList |
|
1210 | + * @param integer $relationListCount |
|
1211 | + * @return FieldGroup |
|
1208 | 1212 | */ |
1209 | 1213 | protected function getFieldsForFile($relationListCount) |
1210 | 1214 | { |