@@ -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)  | 
                                                        
@@ -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;  | 
                                                        
@@ -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 |      { | 
                                                        
@@ -14,6 +14,7 @@ discard block  | 
                                                    ||
| 14 | 14 | |
| 15 | 15 | /**  | 
                                                        
| 16 | 16 | * Return the extension of the file associated with the document  | 
                                                        
| 17 | + * @return string  | 
                                                        |
| 17 | 18 | */  | 
                                                        
| 18 | 19 | public function getExtension();  | 
                                                        
| 19 | 20 | |
@@ -36,7 +37,7 @@ discard block  | 
                                                    ||
| 36 | 37 | * Takes a File object or a String (path to a file) and copies it into the DMS, replacing the original document file  | 
                                                        
| 37 | 38 | * but keeping the rest of the document unchanged.  | 
                                                        
| 38 | 39 | * @param $file File object, or String that is path to a file to store  | 
                                                        
| 39 | - * @return DMSDocumentInstance Document object that we replaced the file in  | 
                                                        |
| 40 | + * @return DMSDocument Document object that we replaced the file in  | 
                                                        |
| 40 | 41 | */  | 
                                                        
| 41 | 42 | public function replaceDocument($file);  | 
                                                        
| 42 | 43 | |
@@ -98,6 +98,9 @@ discard block  | 
                                                    ||
| 98 | 98 | 'permissions' => 'Permissions'  | 
                                                        
| 99 | 99 | );  | 
                                                        
| 100 | 100 | |
| 101 | + /**  | 
                                                        |
| 102 | + * @param DataObject $member  | 
                                                        |
| 103 | + */  | 
                                                        |
| 101 | 104 | public function canView($member = null)  | 
                                                        
| 102 | 105 |      { | 
                                                        
| 103 | 106 |          if (!$member || !(is_a($member, 'Member')) || is_numeric($member)) { | 
                                                        
@@ -656,7 +659,7 @@ discard block  | 
                                                    ||
| 656 | 659 | * DMS, replacing the original document file but keeping the rest of the  | 
                                                        
| 657 | 660 | * document unchanged.  | 
                                                        
| 658 | 661 | *  | 
                                                        
| 659 | - * @param File|string $file path to a file to store  | 
                                                        |
| 662 | + * @param File $file path to a file to store  | 
                                                        |
| 660 | 663 | *  | 
                                                        
| 661 | 664 | * @return DMSDocument object that we replaced the file in  | 
                                                        
| 662 | 665 | */  | 
                                                        
@@ -1043,7 +1046,7 @@ discard block  | 
                                                    ||
| 1043 | 1046 | /**  | 
                                                        
| 1044 | 1047 | * Return the size of the file associated with the document.  | 
                                                        
| 1045 | 1048 | *  | 
                                                        
| 1046 | - * @return string  | 
                                                        |
| 1049 | + * @return integer|null  | 
                                                        |
| 1047 | 1050 | */  | 
                                                        
| 1048 | 1051 | public function getAbsoluteSize()  | 
                                                        
| 1049 | 1052 |      { | 
                                                        
@@ -1062,6 +1065,7 @@ discard block  | 
                                                    ||
| 1062 | 1065 | |
| 1063 | 1066 | |
| 1064 | 1067 | /**  | 
                                                        
| 1068 | + * @param integer $relationListCount  | 
                                                        |
| 1065 | 1069 | * @return FieldList  | 
                                                        
| 1066 | 1070 | */  | 
                                                        
| 1067 | 1071 | protected function getFieldsForFile($relationListCount)  | 
                                                        
@@ -8,6 +8,10 @@  | 
                                                    ||
| 8 | 8 | */  | 
                                                        
| 9 | 9 | class DMSShortcodeHandler  | 
                                                        
| 10 | 10 |  { | 
                                                        
| 11 | + /**  | 
                                                        |
| 12 | + * @param string $content  | 
                                                        |
| 13 | + * @param string $tag  | 
                                                        |
| 14 | + */  | 
                                                        |
| 11 | 15 | public static function handle($arguments, $content, ShortcodeParser $parser, $tag, array $extra = array())  | 
                                                        
| 12 | 16 |      { | 
                                                        
| 13 | 17 |          if (!empty($arguments['id'])) { | 
                                                        
@@ -10,7 +10,7 @@  | 
                                                    ||
| 10 | 10 | * @param DataObject $record  | 
                                                        
| 11 | 11 | * @param string $columnName  | 
                                                        
| 12 | 12 | *  | 
                                                        
| 13 | - * @return string - the HTML for the column  | 
                                                        |
| 13 | + * @return HTMLText - the HTML for the column  | 
                                                        |
| 14 | 14 | */  | 
                                                        
| 15 | 15 | public function getColumnContent($gridField, $record, $columnName)  | 
                                                        
| 16 | 16 |      { |