Completed
Pull Request — master (#119)
by Franco
02:40
created
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/DMS.php 1 patch
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,6 +57,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
code/interface/DMSDocumentInterface.php 1 patch
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      * Can could be implemented as a key/value store table (although it is more like category/value, because the
17 17
      * same category can occur multiple times)
18 18
      * @param $category String of a metadata category to add (required)
19
-     * @param $value String of a metadata value to add (required)
19
+     * @param string $value String of a metadata value to add (required)
20 20
      * @param bool $multiValue Boolean that determines if the category is multi-value or single-value (optional)
21 21
      * @return null
22 22
      */
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * Fetches all tags associated with this DMSDocument within a given category. If a value is specified this method
27 27
      * tries to fetch that specific tag.
28 28
      * @param $category String of the metadata category to get
29
-     * @param null $value String of the value of the tag to get
29
+     * @param string|null $value String of the value of the tag to get
30 30
      * @return array of Strings of all the tags or null if there is no match found
31 31
      */
32 32
     public function getTagsList($category, $value = null);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * If you specify both a category and a value, then only that single category/value pair is deleted.
37 37
      * Nothing happens if the category or the value do not exist.
38 38
      * @param $category Category to remove (required)
39
-     * @param null $value Value to remove (optional)
39
+     * @param string|null $value Value to remove (optional)
40 40
      * @return null
41 41
      */
42 42
     public function removeTag($category, $value = null);
@@ -55,6 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     /**
57 57
      * Return the extension of the file associated with the document
58
+     * @return string
58 59
      */
59 60
     public function getExtension();
60 61
 
@@ -77,7 +78,7 @@  discard block
 block discarded – undo
77 78
      * Takes a File object or a String (path to a file) and copies it into the DMS, replacing the original document file
78 79
      * but keeping the rest of the document unchanged.
79 80
      * @param $file File object, or String that is path to a file to store
80
-     * @return DMSDocumentInstance Document object that we replaced the file in
81
+     * @return DMSDocument Document object that we replaced the file in
81 82
      */
82 83
     public function replaceDocument($file);
83 84
 
Please login to merge, or discard this patch.
tests/Stub/StubRelatedDocumentExtension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
code/cms/DMSUploadField.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
code/tasks/MigrateToDocumentSetsTask.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -40,6 +40,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.