Completed
Pull Request — 3 (#7927)
by Michael
08:40
created
model/DataQuery.php 1 patch
Doc Comments   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,6 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * Create a new DataQuery.
45 45
 	 *
46 46
 	 * @param string The name of the DataObject class that you wish to query
47
+	 * @param string $dataClass
47 48
 	 */
48 49
 	public function __construct($dataClass) {
49 50
 		$this->dataClass = $dataClass;
@@ -175,7 +176,7 @@  discard block
 block discarded – undo
175 176
 	/**
176 177
 	 * Ensure that the query is ready to execute.
177 178
 	 *
178
-	 * @param array|null $queriedColumns Any columns to filter the query by
179
+	 * @param string[] $queriedColumns Any columns to filter the query by
179 180
 	 * @return SQLQuery The finalised sql query
180 181
 	 */
181 182
 	public function getFinalisedQuery($queriedColumns = null) {
@@ -693,7 +694,7 @@  discard block
 block discarded – undo
693 694
 	 * mappings to the query object state. This has to be called
694 695
 	 * in any overloaded {@link SearchFilter->apply()} methods manually.
695 696
 	 *
696
-	 * @param string|array $relation The array/dot-syntax relation to follow
697
+	 * @param string $relation The array/dot-syntax relation to follow
697 698
 	 * @return string The model class of the related item
698 699
 	 */
699 700
 	public function applyRelation($relation) {
@@ -935,6 +936,9 @@  discard block
 block discarded – undo
935 936
 	 */
936 937
 	protected $whereQuery;
937 938
 
939
+	/**
940
+	 * @param string $connective
941
+	 */
938 942
 	public function __construct(DataQuery $base, $connective) {
939 943
 		$this->dataClass = $base->dataClass;
940 944
 		$this->query = $base->query;
@@ -944,6 +948,9 @@  discard block
 block discarded – undo
944 948
 		$base->where($this);
945 949
 	}
946 950
 
951
+	/**
952
+	 * @param string $filter
953
+	 */
947 954
 	public function where($filter) {
948 955
 		if($filter) {
949 956
 			$this->whereQuery->addWhere($filter);
Please login to merge, or discard this patch.
security/MemberAuthenticator.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 * @param Form $form Optional: If passed, better error messages can be
146 146
 	 *                             produced by using
147 147
 	 *                             {@link Form::sessionMessage()}
148
-	 * @return bool|Member Returns FALSE if authentication fails, otherwise
148
+	 * @return Member|null Returns FALSE if authentication fails, otherwise
149 149
 	 *                     the member object
150 150
 	 * @see Security::setDefaultAdmin()
151 151
 	 */
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	/**
187 187
 	 * Method that creates the login form for this authentication method
188 188
 	 *
189
-	 * @param Controller The parent controller, necessary to create the
189
+	 * @param Controller Controller parent controller, necessary to create the
190 190
 	 *                   appropriate form action tag
191 191
 	 * @return MemberLoginForm Returns the login form to use with this authentication
192 192
 	 *              method
Please login to merge, or discard this patch.
core/Object.php 1 patch
Doc Comments   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -125,8 +125,6 @@  discard block
 block discarded – undo
125 125
 	 *    $list = DataList::create('SiteTree');
126 126
 	 *	  $list = SiteTree::get();
127 127
 	 *
128
-	 * @param string $class the class name
129
-	 * @param mixed $arguments,... arguments to pass to the constructor
130 128
 	 * @return static
131 129
 	 */
132 130
 	public static function create() {
@@ -149,7 +147,6 @@  discard block
 block discarded – undo
149 147
 	 * way to access instance methods which don't rely on instance
150 148
 	 * data (e.g. the custom SilverStripe static handling).
151 149
 	 *
152
-	 * @param string $className Optional classname (if called on Object directly)
153 150
 	 * @return static The singleton instance
154 151
 	 */
155 152
 	public static function singleton() {
@@ -334,8 +331,6 @@  discard block
 block discarded – undo
334 331
 	 * Similar to {@link Object::create()}, except that classes are only overloaded if you set the $strong parameter to
335 332
 	 * TRUE when using {@link Object::useCustomClass()}
336 333
 	 *
337
-	 * @param string $class the class name
338
-	 * @param mixed $arguments,... arguments to pass to the constructor
339 334
 	 * @return static
340 335
 	 */
341 336
 	public static function strong_create() {
@@ -387,8 +382,8 @@  discard block
 block discarded – undo
387 382
 	 * without any inheritance, merging or parent lookup if it doesn't exist on the given class.
388 383
 	 *
389 384
 	 * @static
390
-	 * @param $class - The class to get the static from
391
-	 * @param $name - The property to get from the class
385
+	 * @param string $class - The class to get the static from
386
+	 * @param string $name - The property to get from the class
392 387
 	 * @param null $default - The value to return if property doesn't exist on class
393 388
 	 * @return any - The value of the static property $name on class $class, or $default if that property is not
394 389
 	 *               defined
@@ -956,6 +951,7 @@  discard block
 block discarded – undo
956 951
 
957 952
 	/**
958 953
 	 * @see SS_Object::get_static()
954
+	 * @param string $name
959 955
 	 */
960 956
 	public function stat($name, $uncached = false) {
961 957
 		return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::FIRST_SET);
@@ -963,6 +959,8 @@  discard block
 block discarded – undo
963 959
 
964 960
 	/**
965 961
 	 * @see SS_Object::set_static()
962
+	 * @param string $name
963
+	 * @param string $value
966 964
 	 */
967 965
 	public function set_stat($name, $value) {
968 966
 		Config::inst()->update(($this->class ? $this->class : get_class($this)), $name, $value);
@@ -970,6 +968,7 @@  discard block
 block discarded – undo
970 968
 
971 969
 	/**
972 970
 	 * @see SS_Object::uninherited_static()
971
+	 * @param string $name
973 972
 	 */
974 973
 	public function uninherited($name) {
975 974
 		return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::UNINHERITED);
@@ -1020,7 +1019,7 @@  discard block
 block discarded – undo
1020 1019
 	 * all results into an array
1021 1020
 	 *
1022 1021
 	 * @param string $method the method name to call
1023
-	 * @param mixed $argument a single argument to pass
1022
+	 * @param string $argument a single argument to pass
1024 1023
 	 * @return mixed
1025 1024
 	 * @todo integrate inheritance rules
1026 1025
 	 */
@@ -1043,7 +1042,7 @@  discard block
 block discarded – undo
1043 1042
 	 * The extension methods are defined during {@link __construct()} in {@link defineMethods()}.
1044 1043
 	 *
1045 1044
 	 * @param string $method the name of the method to call on each extension
1046
-	 * @param mixed $a1,... up to 7 arguments to be passed to the method
1045
+	 * @param DataObject $a4
1047 1046
 	 * @return array
1048 1047
 	 */
1049 1048
 	public function extend($method, &$a1=null, &$a2=null, &$a3=null, &$a4=null, &$a5=null, &$a6=null, &$a7=null) {
Please login to merge, or discard this patch.
dev/Backtrace.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 *
116 116
 	 * @param unknown_type $returnVal
117 117
 	 * @param unknown_type $ignoreAjax
118
-	 * @return unknown
118
+	 * @return string|null
119 119
 	 */
120 120
 	public static function backtrace($returnVal = false, $ignoreAjax = false, $ignoredFunctions = null) {
121 121
 		$plainText = Director::is_cli() || (Director::is_ajax() && !$ignoreAjax);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * shown
133 133
 	 *
134 134
 	 * @param SS_Object $item
135
-	 * @param boolean $showArg
135
+	 * @param boolean $showArgs
136 136
 	 * @param Int $argCharLimit
137 137
 	 * @return String
138 138
 	 */
Please login to merge, or discard this patch.
security/Security.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 	 * Combine the given forms into a formset with a tabbed interface
497 497
 	 *
498 498
 	 * @param array $forms List of LoginForm instances
499
-	 * @return string
499
+	 * @return HTMLText
500 500
 	 */
501 501
 	protected function generateLoginFormSet($forms) {
502 502
 		$viewData = new ArrayData(array(
@@ -676,7 +676,6 @@  discard block
 block discarded – undo
676 676
 	 * - t: plaintext token
677 677
 	 *
678 678
 	 * @param Member $member Member object associated with this link.
679
-	 * @param string $autoLoginHash The auto login token.
680 679
 	 */
681 680
 	public static function getPasswordResetLink($member, $autologinToken) {
682 681
 		$autologinToken      = urldecode($autologinToken);
@@ -767,7 +766,7 @@  discard block
 block discarded – undo
767 766
 	/**
768 767
 	 * Factory method for the lost password form
769 768
 	 *
770
-	 * @return Form Returns the lost password form
769
+	 * @return Security Returns the lost password form
771 770
 	 */
772 771
 	public function ChangePasswordForm() {
773 772
 		return SS_Object::create('ChangePasswordForm', $this, 'ChangePasswordForm');
@@ -951,7 +950,7 @@  discard block
 block discarded – undo
951 950
 	 * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead
952 951
 	 * @param string $algorithm One of the available password encryption
953 952
 	 *  algorithms determined by {@link Security::get_encryption_algorithms()}
954
-	 * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE.
953
+	 * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE.
955 954
 	 */
956 955
 	public static function set_password_encryption_algorithm($algorithm) {
957 956
 		Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead');
@@ -1106,7 +1105,7 @@  discard block
 block discarded – undo
1106 1105
 	/**
1107 1106
 	 * Set to true to ignore access to disallowed actions, rather than returning permission failure
1108 1107
 	 * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions()
1109
-	 * @param $flag True or false
1108
+	 * @param boolean $flag True or false
1110 1109
 	 */
1111 1110
 	public static function set_ignore_disallowed_actions($flag) {
1112 1111
 		self::$ignore_disallowed_actions = $flag;
Please login to merge, or discard this patch.
view/SSViewer.php 1 patch
Doc Comments   +18 added lines, -5 removed lines patch added patch discarded remove patch
@@ -365,7 +365,6 @@  discard block
 block discarded – undo
365 365
 	/**
366 366
 	 * Returns the modulus of the numerical position of the item in the data set.
367 367
 	 * The count starts from $startIndex, which defaults to 1.
368
-	 * @param int $Mod The number to perform Mod operation to.
369 368
 	 * @param int $startIndex Number to start count from.
370 369
 	 * @return int
371 370
 	 */
@@ -415,6 +414,10 @@  discard block
 block discarded – undo
415 414
 	 */
416 415
 	protected $underlay;
417 416
 
417
+	/**
418
+	 * @param SS_Object $item
419
+	 * @param SS_Object $inheritedScope
420
+	 */
418 421
 	public function __construct($item, $overlay = null, $underlay = null, $inheritedScope = null) {
419 422
 		parent::__construct($item, $inheritedScope);
420 423
 
@@ -439,6 +442,10 @@  discard block
 block discarded – undo
439 442
 		$this->underlay = $underlay ? $underlay : array();
440 443
 	}
441 444
 
445
+	/**
446
+	 * @param string $interfaceToQuery
447
+	 * @param string $variableMethod
448
+	 */
442 449
 	protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) {
443 450
 		$implementers = ClassInfo::implementorsOf($interfaceToQuery);
444 451
 		if($implementers) foreach($implementers as $implementer) {
@@ -851,7 +858,7 @@  discard block
 block discarded – undo
851 858
 	 *
852 859
 	 * @param $className string - valid class name
853 860
 	 * @param $suffix string
854
-	 * @param $baseClass string
861
+	 * @param string $baseClass string
855 862
 	 *
856 863
 	 * @return array
857 864
 	 */
@@ -1254,9 +1261,9 @@  discard block
 block discarded – undo
1254 1261
 	 * Used by the <% include %> template tag to process templates.
1255 1262
 	 *
1256 1263
 	 * @param string $template Template name
1257
-	 * @param mixed $data Data context
1264
+	 * @param SS_Object $data Data context
1258 1265
 	 * @param array $arguments Additional arguments
1259
-	 * @return string Evaluated result
1266
+	 * @return HTMLText Evaluated result
1260 1267
 	 */
1261 1268
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1262 1269
 		$v = new SSViewer($template);
@@ -1282,6 +1289,9 @@  discard block
 block discarded – undo
1282 1289
 		return $v->process($data, $arguments);
1283 1290
 	}
1284 1291
 
1292
+	/**
1293
+	 * @param string $content
1294
+	 */
1285 1295
 	public function parseTemplateContent($content, $template="") {
1286 1296
 		return $this->getParser()->compileString(
1287 1297
 			$content,
@@ -1310,7 +1320,7 @@  discard block
 block discarded – undo
1310 1320
 	 * Return an appropriate base tag for the given template.
1311 1321
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1312 1322
 	 *
1313
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1323
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1314 1324
 	 * the DOCTYPE declaration.
1315 1325
 	 */
1316 1326
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1351,6 +1361,9 @@  discard block
 block discarded – undo
1351 1361
 	 */
1352 1362
 	protected $cacheTemplate;
1353 1363
 
1364
+	/**
1365
+	 * @param string $content
1366
+	 */
1354 1367
 	public function __construct($content, TemplateParser $parser = null) {
1355 1368
 		if ($parser) {
1356 1369
 			$this->setParser($parser);
Please login to merge, or discard this patch.
api/RestfulService.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -335,8 +335,8 @@
 block discarded – undo
335 335
 	/**
336 336
 	 * Extracts the response body and headers from a full curl response
337 337
 	 *
338
-	 * @param curl_handle $ch The curl handle for the request
339
-	 * @param string $rawResponse The raw response text
338
+	 * @param resource $ch The curl handle for the request
339
+	 * @param string $rawHeaders
340 340
 	 *
341 341
 	 * @return RestfulService_Response The response object
342 342
 	 */
Please login to merge, or discard this patch.
control/CookieJar.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,13 +144,13 @@
 block discarded – undo
144 144
 	 * @see http://uk3.php.net/manual/en/function.setcookie.php
145 145
 	 *
146 146
 	 * @param string $name The name of the cookie
147
-	 * @param string|array|false $value The value for the cookie to hold
147
+	 * @param false|string $value The value for the cookie to hold
148 148
 	 * @param int $expiry The number of days until expiry
149 149
 	 * @param string $path The path to save the cookie on (falls back to site base)
150 150
 	 * @param string $domain The domain to make the cookie available on
151 151
 	 * @param boolean $secure Can the cookie only be sent over SSL?
152 152
 	 * @param boolean $httpOnly Prevent the cookie being accessible by JS
153
-	 * @return boolean If the cookie was set or not; doesn't mean it's accepted by the browser
153
+	 * @return boolean|null If the cookie was set or not; doesn't mean it's accepted by the browser
154 154
 	 */
155 155
 	protected function outputCookie(
156 156
 		$name, $value, $expiry = 90, $path = null, $domain = null, $secure = false, $httpOnly = true
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Doc Comments   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -385,6 +385,7 @@  discard block
 block discarded – undo
385 385
 	/**
386 386
 	 * Returns a list of all the composite if the given db field on the class is a composite field.
387 387
 	 * Will check all applicable ancestor classes and aggregate results.
388
+	 * @param string $class
388 389
 	 */
389 390
 	public static function composite_fields($class, $aggregated = true) {
390 391
 		if(!isset(DataObject::$_cache_composite_fields[$class])) self::cache_composite_fields($class);
@@ -552,7 +553,7 @@  discard block
 block discarded – undo
552 553
 	 * The destinationObject must be written to the database already and have an ID. Writing is performed
553 554
 	 * automatically when adding the new relations.
554 555
 	 *
555
-	 * @param $sourceObject the source object to duplicate from
556
+	 * @param DataObject $sourceObject the source object to duplicate from
556 557
 	 * @param $destinationObject the destination object to populate with the duplicated relations
557 558
 	 * @return DataObject with the new many_many relations copied in
558 559
 	 */
@@ -959,6 +960,7 @@  discard block
 block discarded – undo
959 960
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
960 961
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
961 962
 	 *                            Only applicable with $priority='right'. (optional)
963
+	 * @param DataObject|null $rightObj
962 964
 	 * @return Boolean
963 965
 	 */
964 966
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -1582,10 +1584,10 @@  discard block
 block discarded – undo
1582 1584
 	 *
1583 1585
 	 * @param string $componentName Name of the component
1584 1586
 	 * @param string|null $filter Deprecated. A filter to be inserted into the WHERE clause
1585
-	 * @param string|null|array $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1587
+	 * @param string $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1586 1588
 	 *                                the static field $default_sort on the component class will be used.
1587 1589
 	 * @param string $join Deprecated, use leftJoin($table, $joinClause) instead
1588
-	 * @param string|null|array $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1590
+	 * @param string $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1589 1591
 	 *
1590 1592
 	 * @return HasManyList The components of the one-to-many relationship.
1591 1593
 	 */
@@ -2211,6 +2213,7 @@  discard block
 block discarded – undo
2211 2213
 	 *
2212 2214
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2213 2215
 	 *
2216
+	 * @param string $class
2214 2217
 	 * @return array or false
2215 2218
 	 */
2216 2219
 	public function database_extensions($class){
@@ -2678,7 +2681,7 @@  discard block
 block discarded – undo
2678 2681
 	 * can be saved into the Image table.
2679 2682
 	 *
2680 2683
 	 * @param string $fieldName Name of the field
2681
-	 * @param mixed $value New field value
2684
+	 * @param mixed $val New field value
2682 2685
 	 * @return DataObject $this
2683 2686
 	 */
2684 2687
 	public function setCastedField($fieldName, $val) {
@@ -2698,6 +2701,7 @@  discard block
 block discarded – undo
2698 2701
 
2699 2702
 	/**
2700 2703
 	 * {@inheritdoc}
2704
+	 * @param string $field
2701 2705
 	 */
2702 2706
 	public function castingHelper($field) {
2703 2707
 		if ($fieldSpec = $this->db($field)) {
@@ -3062,6 +3066,7 @@  discard block
 block discarded – undo
3062 3066
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3063 3067
 	 *
3064 3068
 	 * @param $fieldPath string
3069
+	 * @param string $fieldName
3065 3070
 	 * @return string | null - will return null on a missing value
3066 3071
 	 */
3067 3072
 	public function relField($fieldName) {
@@ -3130,7 +3135,7 @@  discard block
 block discarded – undo
3130 3135
 	 * @param string $callerClass The class of objects to be returned
3131 3136
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3132 3137
 	 * Supports parameterised queries. See SQLQuery::addWhere() for syntax examples.
3133
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3138
+	 * @param string $sort A sort expression to be inserted into the ORDER
3134 3139
 	 * BY clause.  If omitted, self::$default_sort will be used.
3135 3140
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3136 3141
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
@@ -3181,6 +3186,7 @@  discard block
 block discarded – undo
3181 3186
 
3182 3187
 	/**
3183 3188
 	 * @deprecated
3189
+	 * @param string $class
3184 3190
 	 */
3185 3191
 	public function Aggregate($class = null) {
3186 3192
 		Deprecation::notice('4.0', 'Call aggregate methods on a DataList directly instead. In templates'
@@ -3202,6 +3208,7 @@  discard block
 block discarded – undo
3202 3208
 
3203 3209
 	/**
3204 3210
 	 * @deprecated
3211
+	 * @param string $relationship
3205 3212
 	 */
3206 3213
 	public function RelationshipAggregate($relationship) {
3207 3214
 		Deprecation::notice('4.0', 'Call aggregate methods on a relationship directly instead.');
@@ -3370,6 +3377,7 @@  discard block
 block discarded – undo
3370 3377
 
3371 3378
 	/**
3372 3379
 	 * @see $sourceQueryParams
3380
+	 * @param string $key
3373 3381
 	 * @return Mixed
3374 3382
 	 */
3375 3383
 	public function getSourceQueryParam($key) {
@@ -3433,7 +3441,7 @@  discard block
 block discarded – undo
3433 3441
 	 * Parses a specified column into a sort field and direction
3434 3442
 	 *
3435 3443
 	 * @param string $column String to parse containing the column name
3436
-	 * @return array Resolved table and column.
3444
+	 * @return string[] Resolved table and column.
3437 3445
 	 */
3438 3446
 	protected function parseSortColumn($column) {
3439 3447
 		// Parse column specification, considering possible ansi sql quoting
Please login to merge, or discard this patch.