Completed
Pull Request — master (#110)
by Franco
02:08
created
code/DMS.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@  discard block
 block discarded – undo
36 36
         return BASE_PATH . DIRECTORY_SEPARATOR . self::$dmsFolder;
37 37
     }
38 38
 
39
+    /**
40
+     * @return string
41
+     */
39 42
     public static function transform_file_to_file_path($file)
40 43
     {
41 44
         //confirm we have a file
@@ -110,7 +113,7 @@  discard block
 block discarded – undo
110 113
 
111 114
     /**
112 115
      * Creates a storage folder for the given path
113
-     * @param $path Path to create a folder for
116
+     * @param string $path Path to create a folder for
114 117
      */
115 118
     public static function create_storage_folder($path)
116 119
     {
@@ -121,6 +124,7 @@  discard block
 block discarded – undo
121 124
 
122 125
     /**
123 126
      * Calculates the storage path from a database DMSDocument ID
127
+     * @param integer $id
124 128
      */
125 129
     public static function get_storage_folder($id)
126 130
     {
Please login to merge, or discard this patch.
code/model/DMSDocument_versions.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
code/tools/ShortCodeRelationFinder.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -32,6 +32,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
tests/DMSEmbargoTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
code/cms/DMSDocumentAddExistingField.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -4,6 +4,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
code/cms/DMSUploadField.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,6 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
     protected $folderName = 'DMSTemporaryUploads';
22 22
 
23
+    /**
24
+     * @param string $name
25
+     * @param string $title
26
+     */
23 27
     public function __construct($name, $title = null, SS_List $items = null)
24 28
     {
25 29
         parent::__construct($name, $title, $items);
@@ -33,6 +37,7 @@  discard block
 block discarded – undo
33 37
      * Override the default behaviour of the UploadField and take the uploaded file (uploaded to assets) and
34 38
      * add it into the DMS storage, deleting the old/uploaded file.
35 39
      * @param File
40
+     * @param File $file
36 41
      */
37 42
     protected function attachFile($file)
38 43
     {
@@ -76,7 +81,7 @@  discard block
 block discarded – undo
76 81
      * Action to handle upload of a single file
77 82
      *
78 83
      * @param SS_HTTPRequest $request
79
-     * @return string json
84
+     * @return SS_HTTPResponse json
80 85
      */
81 86
     public function upload(SS_HTTPRequest $request)
82 87
     {
Please login to merge, or discard this patch.
code/interface/DMSDocumentInterface.php 1 patch
Doc Comments   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * not exist.
41 41
      * @abstract
42 42
      * @param $pageObject Page object to remove the association to
43
-     * @return mixed
43
+     * @return DMSDocument
44 44
      */
45 45
     public function removePage($pageObject);
46 46
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * same category can occur multiple times)
70 70
      * @abstract
71 71
      * @param $category String of a metadata category to add (required)
72
-     * @param $value String of a metadata value to add (required)
72
+     * @param string $value String of a metadata value to add (required)
73 73
      * @param bool $multiValue Boolean that determines if the category is multi-value or single-value (optional)
74 74
      * @return null
75 75
      */
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * tries to fetch that specific tag.
81 81
      * @abstract
82 82
      * @param $category String of the metadata category to get
83
-     * @param null $value String of the value of the tag to get
83
+     * @param string|null $value String of the value of the tag to get
84 84
      * @return array of Strings of all the tags or null if there is no match found
85 85
      */
86 86
     public function getTagsList($category, $value = null);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      * Nothing happens if the category or the value do not exist.
92 92
      * @abstract
93 93
      * @param $category Category to remove (required)
94
-     * @param null $value Value to remove (optional)
94
+     * @param string|null $value Value to remove (optional)
95 95
      * @return null
96 96
      */
97 97
     public function removeTag($category, $value = null);
@@ -112,6 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     /**
114 114
      * Return the extension of the file associated with the document
115
+     * @return string
115 116
      */
116 117
     public function getExtension();
117 118
 
@@ -134,7 +135,7 @@  discard block
 block discarded – undo
134 135
      * Takes a File object or a String (path to a file) and copies it into the DMS, replacing the original document file
135 136
      * but keeping the rest of the document unchanged.
136 137
      * @param $file File object, or String that is path to a file to store
137
-     * @return DMSDocumentInstance Document object that we replaced the file in
138
+     * @return DMSDocument Document object that we replaced the file in
138 139
      */
139 140
     public function replaceDocument($file);
140 141
 
Please login to merge, or discard this patch.
code/model/DMSDocument.php 1 patch
Doc Comments   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,6 +84,9 @@  discard block
 block discarded – undo
84 84
      */
85 85
     private static $default_download_behaviour = 'download';
86 86
 
87
+    /**
88
+     * @param DataObject $member
89
+     */
87 90
     public function canView($member = null)
88 91
     {
89 92
         if (!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
@@ -853,7 +856,7 @@  discard block
 block discarded – undo
853 856
      * DMS, replacing the original document file but keeping the rest of the
854 857
      * document unchanged.
855 858
      *
856
-     * @param File|string $file path to a file to store
859
+     * @param File $file path to a file to store
857 860
      *
858 861
      * @return DMSDocument object that we replaced the file in
859 862
      */
@@ -1222,7 +1225,7 @@  discard block
 block discarded – undo
1222 1225
     /**
1223 1226
      * Return the size of the file associated with the document.
1224 1227
      *
1225
-     * @return string
1228
+     * @return integer|null
1226 1229
      */
1227 1230
     public function getAbsoluteSize()
1228 1231
     {
@@ -1241,7 +1244,8 @@  discard block
 block discarded – undo
1241 1244
 
1242 1245
 
1243 1246
     /**
1244
-     * @return FieldList
1247
+     * @param integer $relationListCount
1248
+     * @return FieldGroup
1245 1249
      */
1246 1250
     protected function getFieldsForFile($relationListCount)
1247 1251
     {
Please login to merge, or discard this patch.