@@ -36,6 +36,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -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; |
@@ -20,6 +20,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -40,7 +40,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | * DMS, replacing the original document file but keeping the rest of the |
| 838 | 838 | * document unchanged. |
| 839 | 839 | * |
| 840 | - * @param File|string $file path to a file to store |
|
| 840 | + * @param File $file path to a file to store |
|
| 841 | 841 | * |
| 842 | 842 | * @return DMSDocument object that we replaced the file in |
| 843 | 843 | */ |
@@ -1198,7 +1198,7 @@ discard block |
||
| 1198 | 1198 | /** |
| 1199 | 1199 | * Return the size of the file associated with the document. |
| 1200 | 1200 | * |
| 1201 | - * @return string |
|
| 1201 | + * @return integer|null |
|
| 1202 | 1202 | */ |
| 1203 | 1203 | public function getAbsoluteSize() |
| 1204 | 1204 | { |
@@ -1217,7 +1217,8 @@ discard block |
||
| 1217 | 1217 | |
| 1218 | 1218 | |
| 1219 | 1219 | /** |
| 1220 | - * @return FieldList |
|
| 1220 | + * @param integer $relationListCount |
|
| 1221 | + * @return FieldGroup |
|
| 1221 | 1222 | */ |
| 1222 | 1223 | protected function getFieldsForFile($relationListCount) |
| 1223 | 1224 | { |