Completed
Pull Request — master (#5433)
by Sam
12:27
created
control/PjaxResponseNegotiator.php 1 patch
Doc Comments   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,6 @@  discard block
 block discarded – undo
49 49
 	protected $fragmentOverride = null;
50 50
 
51 51
 	/**
52
-	 * @param RequestHandler $controller
53 52
 	 * @param SS_HTTPResponse An existing response to reuse (optional)
54 53
 	 * @param Array $callbacks
55 54
 	 */
@@ -71,11 +70,10 @@  discard block
 block discarded – undo
71 70
 	 * Out of the box, the handler "CurrentForm" value, which will return the rendered form.
72 71
 	 * Non-Ajax calls will redirect back.
73 72
 	 *
74
-	 * @param SS_HTTPRequest $request
73
+	 * @param HTTPRequest $request
75 74
 	 * @param array $extraCallbacks List of anonymous functions or callables returning either a string
76 75
 	 * or SS_HTTPResponse, keyed by their fragment identifier. The 'default' key can
77 76
 	 * be used as a fallback for non-ajax responses.
78
-	 * @param array $fragmentOverride Change the response fragments.
79 77
 	 * @return HTTPResponse
80 78
 	 */
81 79
 	public function respond(HTTPRequest $request, $extraCallbacks = array()) {
@@ -123,7 +121,7 @@  discard block
 block discarded – undo
123 121
 	/**
124 122
 	 * Set up fragment overriding - will completely replace the incoming fragments.
125 123
 	 *
126
-	 * @param array $fragments Fragments to insert.
124
+	 * @param string[] $fragments Fragments to insert.
127 125
 	 */
128 126
 	public function setFragmentOverride($fragments) {
129 127
 		if (!is_array($fragments)) throw new InvalidArgumentException();
Please login to merge, or discard this patch.
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.