Completed
Pull Request — master (#5433)
by Sam
11:25
created
dev/FunctionalTest.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	/**
69 69
 	 * Returns the {@link Session} object for this test
70 70
 	 *
71
-	 * @return Session
71
+	 * @return Session|null
72 72
 	 */
73 73
 	public function session() {
74 74
 		return $this->mainSession->session();
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	 * Find an attribute in a SimpleXMLElement object by name.
218 218
 	 * @param SimpleXMLElement $object
219 219
 	 * @param string $attribute Name of attribute to find
220
-	 * @return SimpleXMLElement object of the attribute
220
+	 * @return boolean object of the attribute
221 221
 	 */
222 222
 	public function findAttribute($object, $attribute) {
223 223
 		$found = false;
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 * Note:   characters are stripped from the content; make sure that your assertions take this into account.
248 248
 	 *
249 249
 	 * @param string $selector A basic CSS selector, e.g. 'li.jobs h3'
250
-	 * @param array|string $expectedMatches The content of at least one of the matched tags
250
+	 * @param string[] $expectedMatches The content of at least one of the matched tags
251 251
 	 * @throws PHPUnit_Framework_AssertionFailedError
252 252
 	 * @return boolean
253 253
 	 */
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 	 * @param string $selector A basic CSS selector, e.g. 'li.jobs h3'
345 345
 	 * @param array|string $expectedMatches The content of *all* matched tags as an array
346 346
 	 * @throws PHPUnit_Framework_AssertionFailedError
347
-	 * @return boolean
347
+	 * @return boolean|null
348 348
 	 */
349 349
 	public function assertExactHTMLMatchBySelector($selector, $expectedMatches) {
350 350
 		$items = $this->cssParser()->getBySelector($selector);
Please login to merge, or discard this patch.
forms/AssetField.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -151,7 +151,6 @@  discard block
 block discarded – undo
151 151
 	 *
152 152
 	 * @param string $name The internal field name, passed to forms.
153 153
 	 * @param string $title The field label.
154
-	 * @param Form $form Reference to the container form
155 154
 	 */
156 155
 	public function __construct($name, $title = null) {
157 156
 		$this->addExtraClass('ss-upload'); // class, used by js
@@ -263,6 +262,10 @@  discard block
 block discarded – undo
263 262
 		return $this->record;
264 263
 	}
265 264
 
265
+	/**
266
+	 * @param null|DataObject $value
267
+	 * @param DataObject $record
268
+	 */
266 269
 	public function setValue($value, $record = null) {
267 270
 		// Extract value from underlying record
268 271
 		if(empty($value) && $this->getName() && $record instanceof DataObject) {
@@ -700,7 +703,7 @@  discard block
 block discarded – undo
700 703
 	/**
701 704
 	 * Action to handle upload of a single file
702 705
 	 *
703
-	 * @param SS_HTTPRequest $request
706
+	 * @param HTTPRequest $request
704 707
 	 * @return HTTPResponse
705 708
 	 */
706 709
 	public function upload(HTTPRequest $request) {
Please login to merge, or discard this patch.
forms/UploadField.php 1 patch
Doc Comments   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -223,7 +223,6 @@  discard block
 block discarded – undo
223 223
 	 * @param string $title The field label.
224 224
 	 * @param SS_List $items If no items are defined, the field will try to auto-detect an existing relation on
225 225
 	 *                       @link $record}, with the same name as the field name.
226
-	 * @param Form $form Reference to the container form
227 226
 	 */
228 227
 	public function __construct($name, $title = null, SS_List $items = null) {
229 228
 
@@ -1073,7 +1072,7 @@  discard block
 block discarded – undo
1073 1072
 	}
1074 1073
 
1075 1074
 	/**
1076
-	 * @param SS_HTTPRequest $request
1075
+	 * @param HTTPRequest $request
1077 1076
 	 * @return UploadField_ItemHandler
1078 1077
 	 */
1079 1078
 	public function handleItem(HTTPRequest $request) {
@@ -1089,8 +1088,8 @@  discard block
 block discarded – undo
1089 1088
 	}
1090 1089
 
1091 1090
 	/**
1092
-	 * @param SS_HTTPRequest $request
1093
-	 * @return UploadField_ItemHandler
1091
+	 * @param HTTPRequest $request
1092
+	 * @return UploadField_SelectHandler
1094 1093
 	 */
1095 1094
 	public function handleSelect(HTTPRequest $request) {
1096 1095
 		if(!$this->canAttachExisting()) return $this->httpError(403);
@@ -1212,7 +1211,7 @@  discard block
 block discarded – undo
1212 1211
 	/**
1213 1212
 	 * Action to handle upload of a single file
1214 1213
 	 *
1215
-	 * @param SS_HTTPRequest $request
1214
+	 * @param HTTPRequest $request
1216 1215
 	 * @return HTTPResponse
1217 1216
 	 * @return HTTPResponse
1218 1217
 	 */
@@ -1255,7 +1254,7 @@  discard block
 block discarded – undo
1255 1254
 	 * Retrieves details for files that this field wishes to attache to the
1256 1255
 	 * client-side form
1257 1256
 	 *
1258
-	 * @param SS_HTTPRequest $request
1257
+	 * @param HTTPRequest $request
1259 1258
 	 * @return HTTPResponse
1260 1259
 	 */
1261 1260
 	public function attach(HTTPRequest $request) {
@@ -1297,7 +1296,7 @@  discard block
 block discarded – undo
1297 1296
 	/**
1298 1297
 	 * Determines if a specified file exists
1299 1298
 	 *
1300
-	 * @param SS_HTTPRequest $request
1299
+	 * @param HTTPRequest $request
1301 1300
 	 */
1302 1301
 	public function fileexists(HTTPRequest $request) {
1303 1302
 		// Assert that requested filename doesn't attempt to escape the directory
@@ -1425,7 +1424,7 @@  discard block
 block discarded – undo
1425 1424
 	/**
1426 1425
 	 * Action to handle deleting of a single file
1427 1426
 	 *
1428
-	 * @param SS_HTTPRequest $request
1427
+	 * @param HTTPRequest $request
1429 1428
 	 * @return HTTPResponse
1430 1429
 	 */
1431 1430
 	public function delete(HTTPRequest $request) {
@@ -1451,8 +1450,8 @@  discard block
 block discarded – undo
1451 1450
 	/**
1452 1451
 	 * Action to handle editing of a single file
1453 1452
 	 *
1454
-	 * @param SS_HTTPRequest $request
1455
-	 * @return ViewableData_Customised
1453
+	 * @param HTTPRequest $request
1454
+	 * @return DBField
1456 1455
 	 */
1457 1456
 	public function edit(HTTPRequest $request) {
1458 1457
 		// Check form field state
@@ -1500,7 +1499,7 @@  discard block
 block discarded – undo
1500 1499
 	/**
1501 1500
 	 * @param array $data
1502 1501
 	 * @param Form $form
1503
-	 * @param SS_HTTPRequest $request
1502
+	 * @param HTTPRequest $request
1504 1503
 	 */
1505 1504
 	public function doEdit(array $data, Form $form, HTTPRequest $request) {
1506 1505
 		// Check form field state
Please login to merge, or discard this patch.
model/versioning/VersionedGridFieldItemRequest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
      *
76 76
      * @param array $data
77 77
      * @param Form $form
78
-	 * @return HTTPResponse
78
+	 * @return SilverStripe\Control\HTTPResponse
79 79
      */
80 80
 	public function doArchive($data, $form) {
81 81
 		$record = $this->getRecord();
Please login to merge, or discard this patch.
forms/htmleditor/HtmlEditorField.php 1 patch
Doc Comments   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	/**
67 67
 	 * Assign a new configuration instance or identifier
68 68
 	 *
69
-	 * @param string|HtmlEditorConfig $config
69
+	 * @param string $config
70 70
 	 * @return $this
71 71
 	 */
72 72
 	public function setEditorConfig($config) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @param string $name The internal field name, passed to forms.
82 82
 	 * @param string $title The human-readable field label.
83
-	 * @param mixed $value The value of the field.
83
+	 * @param integer $value The value of the field.
84 84
 	 * @param string $config HtmlEditorConfig identifier to be used. Default to the active one.
85 85
 	 */
86 86
 	public function __construct($name, $title = null, $value = '', $config = null) {
@@ -121,6 +121,9 @@  discard block
 block discarded – undo
121 121
 		$record->{$this->name} = $htmlValue->getContent();
122 122
 	}
123 123
 
124
+	/**
125
+	 * @param string|null $value
126
+	 */
124 127
 	public function setValue($value) {
125 128
 		// Regenerate links prior to preview, so that the editor can see them.
126 129
 		$value = Image::regenerate_html_links($value);
@@ -188,6 +191,10 @@  discard block
 block discarded – undo
188 191
 
189 192
 	protected $controller, $name;
190 193
 
194
+	/**
195
+	 * @param Controller|null $controller
196
+	 * @param string $name
197
+	 */
191 198
 	public function __construct($controller, $name) {
192 199
 		parent::__construct();
193 200
 
@@ -206,7 +213,7 @@  discard block
 block discarded – undo
206 213
 	/**
207 214
 	 * Searches the SiteTree for display in the dropdown
208 215
 	 *
209
-	 * @return callback
216
+	 * @return DataList
210 217
 	 */
211 218
 	public function siteTreeSearchCallback($sourceObject, $labelField, $search) {
212 219
 		return DataObject::get($sourceObject)->filterAny(array(
@@ -491,7 +498,7 @@  discard block
 block discarded – undo
491 498
 	 *
492 499
 	 * @param string $message
493 500
 	 * @param int $code
494
-	 * @return SS_HTTPResponse_Exception
501
+	 * @return HTTPResponse_Exception
495 502
 	 */
496 503
 	protected function getErrorFor($message, $code = 400) {
497 504
 		$exception = new HTTPResponse_Exception($message, $code);
@@ -586,7 +593,7 @@  discard block
 block discarded – undo
586 593
 	/**
587 594
 	 * Find all anchors available on the given page.
588 595
 	 *
589
-	 * @return array
596
+	 * @return string
590 597
 	 * @throws SS_HTTPResponse_Exception
591 598
 	 */
592 599
 	public function getanchors() {
@@ -1145,7 +1152,7 @@  discard block
 block discarded – undo
1145 1152
 	/**
1146 1153
 	 * Get OEmbed type
1147 1154
 	 *
1148
-	 * @return string
1155
+	 * @return boolean
1149 1156
 	 */
1150 1157
 	public function getType() {
1151 1158
 		return $this->oembed->type;
Please login to merge, or discard this patch.