Completed
Push — namespace-model ( 9b3f38...c67c40 )
by Sam
16:21 queued 05:15
created
tests/view/SSViewerTest.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -112,6 +112,10 @@  discard block
 block discarded – undo
112 112
 		));
113 113
 	}
114 114
 
115
+	/**
116
+	 * @param DBField $result
117
+	 * @param string[] $expected
118
+	 */
115 119
 	private function assertExpectedStrings($result, $expected) {
116 120
 		foreach ($expected as $expectedStr) {
117 121
 			$this->assertTrue(
@@ -718,6 +722,10 @@  discard block
 block discarded – undo
718 722
 		$this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult);
719 723
 	}
720 724
 
725
+	/**
726
+	 * @param string $a
727
+	 * @param string $b
728
+	 */
721 729
 	public function assertEqualIgnoringWhitespace($a, $b) {
722 730
 		$this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b));
723 731
 	}
@@ -1328,6 +1336,11 @@  discard block
 block discarded – undo
1328 1336
 		Config::inst()->update('SSViewer', 'source_file_comments', false);
1329 1337
 		Config::inst()->update('Director', 'environment_type', $origEnv);
1330 1338
 	}
1339
+
1340
+	/**
1341
+	 * @param string $name
1342
+	 * @param string $expected
1343
+	 */
1331 1344
 	private function _renderWithSourceFileComments($name, $expected) {
1332 1345
 		$viewer = new SSViewer(array($name));
1333 1346
 		$data = new ArrayData(array());
Please login to merge, or discard this patch.
forms/gridfield/GridFieldDetailForm.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -185,6 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
 	/**
187 187
 	 * @param String
188
+	 * @param string $class
188 189
 	 */
189 190
 	public function setItemRequestClass($class) {
190 191
 		$this->itemRequestClass = $class;
@@ -292,6 +293,9 @@  discard block
 block discarded – undo
292 293
 		parent::__construct();
293 294
 	}
294 295
 
296
+	/**
297
+	 * @param string $action
298
+	 */
295 299
 	public function Link($action = null) {
296 300
 		return Controller::join_links($this->gridField->Link('item'),
297 301
 			$this->record->ID ? $this->record->ID : 'new', $action);
@@ -320,6 +324,9 @@  discard block
 block discarded – undo
320 324
 		}
321 325
 	}
322 326
 
327
+	/**
328
+	 * @param SS_HTTPRequest $request
329
+	 */
323 330
 	public function edit($request) {
324 331
 		$controller = $this->getToplevelController();
325 332
 		$form = $this->ItemEditForm($this->gridField, $request);
@@ -517,6 +524,9 @@  discard block
 block discarded – undo
517 524
 		return $c;
518 525
 	}
519 526
 
527
+	/**
528
+	 * @return string
529
+	 */
520 530
 	protected function getBackLink(){
521 531
 		// TODO Coupling with CMS
522 532
 		$backlink = '';
@@ -618,6 +628,9 @@  discard block
 block discarded – undo
618 628
 		}
619 629
 	}
620 630
 
631
+	/**
632
+	 * @param integer $errorCode
633
+	 */
621 634
 	public function httpError($errorCode, $errorMessage = null) {
622 635
 		$controller = $this->getToplevelController();
623 636
 		return $controller->httpError($errorCode, $errorMessage);
Please login to merge, or discard this patch.
security/Member.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -770,7 +770,7 @@
 block discarded – undo
770 770
 	/**
771 771
 	 * Returns the current logged in user
772 772
 	 *
773
-	 * @return Member|null
773
+	 * @return DataObject|null
774 774
 	 */
775 775
 	public static function currentUser() {
776 776
 		$id = Member::currentUserID();
Please login to merge, or discard this patch.
security/RememberLoginHash.php 1 patch
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,6 +76,9 @@  discard block
 block discarded – undo
76 76
 		return $this->token;
77 77
 	}
78 78
 
79
+	/**
80
+	 * @param string $token
81
+	 */
79 82
 	public function setToken($token) {
80 83
 		$this->token = $token;
81 84
 	}
@@ -92,7 +95,7 @@  discard block
 block discarded – undo
92 95
 	/**
93 96
 	 * Creates a new random token and hashes it using the
94 97
 	 * member information
95
-	 * @param Member The logged in user
98
+	 * @param Member Member logged in user
96 99
 	 * @return string The hash to be stored in the database
97 100
 	 */
98 101
 	public function getNewHash(Member $member){
@@ -106,7 +109,7 @@  discard block
 block discarded – undo
106 109
 	 * The device is assigned a globally unique device ID
107 110
 	 * The returned login hash stores the hashed token in the
108 111
 	 * database, for this device and this member
109
-	 * @param Member The logged in user
112
+	 * @param Member Member logged in user
110 113
 	 * @return RememberLoginHash The generated login hash
111 114
 	 */
112 115
 	public static function generate(Member $member) {
@@ -149,6 +152,7 @@  discard block
 block discarded – undo
149 152
 	 * Deletes existing tokens for this member
150 153
 	 * if logout_across_devices is true, all tokens are deleted, otherwise
151 154
 	 * only the token for the provided device ID will be removed
155
+	 * @param string $alcDevice
152 156
 	 */
153 157
 	public static function clear(Member $member, $alcDevice = null) {
154 158
 		if(!$member->exists()) { return; }
Please login to merge, or discard this patch.
filesystem/File.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 *
249 249
 	 * @param array $args Array of input shortcode arguments
250 250
 	 * @param int $errorCode If the file is not found, or is inaccessible, this will be assigned to a HTTP error code.
251
-	 * @return File|null The File DataObject, if it can be found.
251
+	 * @return null|DataObject The File DataObject, if it can be found.
252 252
 	 */
253 253
 	public static function find_shortcode_record($args, &$errorCode = null) {
254 254
 		// Validate shortcode
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 	 *
618 618
 	 * @param string $condition The PHP condition to be evaluated.  The page will be called $item
619 619
 	 * @param array $collator An array, passed by reference, to collect all of the matching descendants.
620
-	 * @return true|null
620
+	 * @return boolean|null
621 621
 	 */
622 622
 	public function collateDescendants($condition, &$collator) {
623 623
 		if($children = $this->Children()) {
@@ -978,6 +978,7 @@  discard block
 block discarded – undo
978 978
 	 *
979 979
 	 * @param String File extension, without dot prefix. Use an asterisk ('*')
980 980
 	 * to specify a generic fallback if no mapping is found for an extension.
981
+	 * @param string $ext
981 982
 	 * @return String Classname for a subclass of {@link File}
982 983
 	 */
983 984
 	public static function get_class_for_file_extension($ext) {
@@ -1115,7 +1116,6 @@  discard block
 block discarded – undo
1115 1116
 	 * Note that the result will not have a leading slash, and should not be used
1116 1117
 	 * with local file paths.
1117 1118
 	 *
1118
-	 * @param string $part,... Parts
1119 1119
 	 * @return string
1120 1120
 	 */
1121 1121
 	public static function join_paths() {
Please login to merge, or discard this patch.
forms/htmleditor/HtmlEditorField.php 1 patch
Doc Comments   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	/**
50 50
 	 * Assign a new configuration instance or identifier
51 51
 	 *
52
-	 * @param string|HtmlEditorConfig $config
52
+	 * @param string $config
53 53
 	 * @return $this
54 54
 	 */
55 55
 	public function setEditorConfig($config) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @param string $name The internal field name, passed to forms.
65 65
 	 * @param string $title The human-readable field label.
66
-	 * @param mixed $value The value of the field.
66
+	 * @param integer $value The value of the field.
67 67
 	 * @param string $config HtmlEditorConfig identifier to be used. Default to the active one.
68 68
 	 */
69 69
 	public function __construct($name, $title = null, $value = '', $config = null) {
@@ -104,6 +104,9 @@  discard block
 block discarded – undo
104 104
 		$record->{$this->name} = $htmlValue->getContent();
105 105
 	}
106 106
 
107
+	/**
108
+	 * @param string|null $value
109
+	 */
107 110
 	public function setValue($value) {
108 111
 		// Regenerate links prior to preview, so that the editor can see them.
109 112
 		$value = Image::regenerate_html_links($value);
@@ -171,6 +174,10 @@  discard block
 block discarded – undo
171 174
 
172 175
 	protected $controller, $name;
173 176
 
177
+	/**
178
+	 * @param Controller $controller
179
+	 * @param string $name
180
+	 */
174 181
 	public function __construct($controller, $name) {
175 182
 		parent::__construct();
176 183
 
@@ -189,7 +196,7 @@  discard block
 block discarded – undo
189 196
 	/**
190 197
 	 * Searches the SiteTree for display in the dropdown
191 198
 	 *
192
-	 * @return callback
199
+	 * @return DataList
193 200
 	 */
194 201
 	public function siteTreeSearchCallback($sourceObject, $labelField, $search) {
195 202
 		return DataObject::get($sourceObject)->filterAny(array(
@@ -467,7 +474,7 @@  discard block
 block discarded – undo
467 474
 	/**
468 475
 	 * Find all anchors available on the given page.
469 476
 	 *
470
-	 * @return array
477
+	 * @return string
471 478
 	 */
472 479
 	public function getanchors() {
473 480
 		$id = (int)$this->getRequest()->getVar('PageID');
@@ -1025,7 +1032,7 @@  discard block
 block discarded – undo
1025 1032
 	/**
1026 1033
 	 * Get OEmbed type
1027 1034
 	 *
1028
-	 * @return string
1035
+	 * @return boolean
1029 1036
 	 */
1030 1037
 	public function getType() {
1031 1038
 		return $this->oembed->type;
Please login to merge, or discard this patch.
forms/FormField.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -587,6 +587,7 @@  discard block
 block discarded – undo
587 587
 	 *
588 588
 	 * Caution: this doesn't work on all fields, see {@link setAttribute()}.
589 589
 	 *
590
+	 * @param string $name
590 591
 	 * @return null|string
591 592
 	 */
592 593
 	public function getAttribute($name) {
@@ -698,7 +699,6 @@  discard block
 block discarded – undo
698 699
 	 * Set the field value.
699 700
 	 *
700 701
 	 * @param mixed $value
701
-	 * @param null|array|DataObject $data {@see Form::loadDataFrom}
702 702
 	 *
703 703
 	 * @return $this
704 704
 	 */
@@ -1179,6 +1179,7 @@  discard block
 block discarded – undo
1179 1179
 	 * @todo Make this abstract.
1180 1180
 	 *
1181 1181
 	 * @param Validator
1182
+	 * @param RequiredFields $validator
1182 1183
 	 *
1183 1184
 	 * @return bool
1184 1185
 	 */
@@ -1248,7 +1249,7 @@  discard block
 block discarded – undo
1248 1249
 	 *
1249 1250
 	 * @param FieldList $containerFieldList
1250 1251
 	 *
1251
-	 * @return FieldList
1252
+	 * @return FormField
1252 1253
 	 */
1253 1254
 	public function setContainerFieldList($containerFieldList) {
1254 1255
 		$this->containerFieldList = $containerFieldList;
@@ -1433,7 +1434,7 @@  discard block
 block discarded – undo
1433 1434
 	 * Any passed keys that are not defined in {@link getSchemaDataDefaults()} are ignored.
1434 1435
 	 * If you want to pass around ad hoc data use the `data` array e.g. pass `['data' => ['myCustomKey' => 'yolo']]`.
1435 1436
 	 *
1436
-	 * @param array $schemaData - The data to be merged with $this->schemaData.
1437
+	 * @param array $schemaState - The data to be merged with $this->schemaData.
1437 1438
 	 * @return FormField
1438 1439
 	 *
1439 1440
 	 * @todo Add deep merging of arrays like `data` and `attributes`.
Please login to merge, or discard this patch.
admin/code/CampaignAdmin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -332,7 +332,7 @@
 block discarded – undo
332 332
 	/**
333 333
 	 * Gets viewable list of campaigns
334 334
 	 *
335
-	 * @return SS_List
335
+	 * @return SilverStripe\Model\ArrayList
336 336
 	 */
337 337
 	protected function getListItems() {
338 338
 		return ChangeSet::get()
Please login to merge, or discard this patch.
forms/gridfield/GridField.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	}
194 194
 
195 195
 	/**
196
-	 * @return ArrayList
196
+	 * @return SilverStripe\Model\ArrayList
197 197
 	 */
198 198
 	public function getComponents() {
199 199
 		return $this->config->getComponents();
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	 *
205 205
 	 * @todo refactor this into GridFieldComponent
206 206
 	 *
207
-	 * @param mixed $value
207
+	 * @param string $value
208 208
 	 * @param string|array $castingDefinition
209 209
 	 *
210 210
 	 * @return mixed
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	 *
292 292
 	 * @param array $properties
293 293
 	 *
294
-	 * @return HTMLText
294
+	 * @return DBField
295 295
 	 */
296 296
 	public function FieldHolder($properties = array()) {
297 297
 		Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 	 * @param int $index
576 576
 	 * @param DataObject $record
577 577
 	 *
578
-	 * @return array
578
+	 * @return string[]
579 579
 	 */
580 580
 	protected function newRowClasses($total, $index, $record) {
581 581
 		$classes = array('ss-gridfield-item');
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 	/**
601 601
 	 * @param array $properties
602 602
 	 *
603
-	 * @return HTMLText
603
+	 * @return DBField
604 604
 	 */
605 605
 	public function Field($properties = array()) {
606 606
 		return $this->FieldHolder($properties);
Please login to merge, or discard this patch.