Completed
Push — ss3-php74 ( f30a6a )
by Sam
05:37
created
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
 	 */
@@ -972,6 +973,7 @@  discard block
 block discarded – undo
972 973
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
973 974
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
974 975
 	 *                            Only applicable with $priority='right'. (optional)
976
+	 * @param DataObject|null $rightObj
975 977
 	 * @return Boolean
976 978
 	 */
977 979
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -1595,10 +1597,10 @@  discard block
 block discarded – undo
1595 1597
 	 *
1596 1598
 	 * @param string $componentName Name of the component
1597 1599
 	 * @param string|null $filter Deprecated. A filter to be inserted into the WHERE clause
1598
-	 * @param string|null|array $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1600
+	 * @param string $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1599 1601
 	 *                                the static field $default_sort on the component class will be used.
1600 1602
 	 * @param string $join Deprecated, use leftJoin($table, $joinClause) instead
1601
-	 * @param string|null|array $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1603
+	 * @param string $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1602 1604
 	 *
1603 1605
 	 * @return HasManyList The components of the one-to-many relationship.
1604 1606
 	 */
@@ -2229,6 +2231,7 @@  discard block
 block discarded – undo
2229 2231
 	 *
2230 2232
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2231 2233
 	 *
2234
+	 * @param string $class
2232 2235
 	 * @return array or false
2233 2236
 	 */
2234 2237
 	public function database_extensions($class){
@@ -2696,7 +2699,7 @@  discard block
 block discarded – undo
2696 2699
 	 * can be saved into the Image table.
2697 2700
 	 *
2698 2701
 	 * @param string $fieldName Name of the field
2699
-	 * @param mixed $value New field value
2702
+	 * @param mixed $val New field value
2700 2703
 	 * @return DataObject $this
2701 2704
 	 */
2702 2705
 	public function setCastedField($fieldName, $val) {
@@ -2716,6 +2719,7 @@  discard block
 block discarded – undo
2716 2719
 
2717 2720
 	/**
2718 2721
 	 * {@inheritdoc}
2722
+	 * @param string $field
2719 2723
 	 */
2720 2724
 	public function castingHelper($field) {
2721 2725
 		if ($fieldSpec = $this->db($field)) {
@@ -3080,6 +3084,7 @@  discard block
 block discarded – undo
3080 3084
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3081 3085
 	 *
3082 3086
 	 * @param $fieldPath string
3087
+	 * @param string $fieldName
3083 3088
 	 * @return string | null - will return null on a missing value
3084 3089
 	 */
3085 3090
 	public function relField($fieldName) {
@@ -3151,7 +3156,7 @@  discard block
 block discarded – undo
3151 3156
 	 * @param string $callerClass The class of objects to be returned
3152 3157
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3153 3158
 	 * Supports parameterised queries. See SQLQuery::addWhere() for syntax examples.
3154
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3159
+	 * @param string $sort A sort expression to be inserted into the ORDER
3155 3160
 	 * BY clause.  If omitted, self::$default_sort will be used.
3156 3161
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3157 3162
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
@@ -3202,6 +3207,7 @@  discard block
 block discarded – undo
3202 3207
 
3203 3208
 	/**
3204 3209
 	 * @deprecated
3210
+	 * @param string $class
3205 3211
 	 */
3206 3212
 	public function Aggregate($class = null) {
3207 3213
 		Deprecation::notice('4.0', 'Call aggregate methods on a DataList directly instead. In templates'
@@ -3223,6 +3229,7 @@  discard block
 block discarded – undo
3223 3229
 
3224 3230
 	/**
3225 3231
 	 * @deprecated
3232
+	 * @param string $relationship
3226 3233
 	 */
3227 3234
 	public function RelationshipAggregate($relationship) {
3228 3235
 		Deprecation::notice('4.0', 'Call aggregate methods on a relationship directly instead.');
@@ -3391,6 +3398,7 @@  discard block
 block discarded – undo
3391 3398
 
3392 3399
 	/**
3393 3400
 	 * @see $sourceQueryParams
3401
+	 * @param string $key
3394 3402
 	 * @return Mixed
3395 3403
 	 */
3396 3404
 	public function getSourceQueryParam($key) {
@@ -3467,7 +3475,7 @@  discard block
 block discarded – undo
3467 3475
 	 * Parses a specified column into a sort field and direction
3468 3476
 	 *
3469 3477
 	 * @param string $column String to parse containing the column name
3470
-	 * @return array Resolved table and column.
3478
+	 * @return string[] Resolved table and column.
3471 3479
 	 */
3472 3480
 	protected function parseSortColumn($column) {
3473 3481
 		// Parse column specification, considering possible ansi sql quoting
Please login to merge, or discard this patch.
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) {
@@ -694,7 +695,7 @@  discard block
 block discarded – undo
694 695
 	 * mappings to the query object state. This has to be called
695 696
 	 * in any overloaded {@link SearchFilter->apply()} methods manually.
696 697
 	 *
697
-	 * @param string|array $relation The array/dot-syntax relation to follow
698
+	 * @param string $relation The array/dot-syntax relation to follow
698 699
 	 * @return string The model class of the related item
699 700
 	 */
700 701
 	public function applyRelation($relation) {
@@ -936,6 +937,9 @@  discard block
 block discarded – undo
936 937
 	 */
937 938
 	protected $whereQuery;
938 939
 
940
+	/**
941
+	 * @param string $connective
942
+	 */
939 943
 	public function __construct(DataQuery $base, $connective) {
940 944
 		$this->dataClass = $base->dataClass;
941 945
 		$this->query = $base->query;
@@ -945,6 +949,9 @@  discard block
 block discarded – undo
945 949
 		$base->where($this);
946 950
 	}
947 951
 
952
+	/**
953
+	 * @param string $filter
954
+	 */
948 955
 	public function where($filter) {
949 956
 		if($filter) {
950 957
 			$this->whereQuery->addWhere($filter);
Please login to merge, or discard this patch.
security/CMSSecurity.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -42,6 +42,9 @@  discard block
 block discarded – undo
42 42
 		);
43 43
 	}
44 44
 
45
+	/**
46
+	 * @param string $action
47
+	 */
45 48
 	public function Link($action = null) {
46 49
 		$link = Controller::join_links(Director::baseURL(), "CMSSecurity", $action);
47 50
 		// Give extensions the chance to modify by reference
@@ -60,6 +63,9 @@  discard block
 block discarded – undo
60 63
 		}
61 64
 	}
62 65
 
66
+	/**
67
+	 * @param string $title
68
+	 */
63 69
 	public function getResponseController($title) {
64 70
 		// Use $this to prevent use of Page to render underlying templates
65 71
 		return $this;
@@ -175,6 +181,9 @@  discard block
 block discarded – undo
175 181
 		user_error('Passed invalid authentication method', E_USER_ERROR);
176 182
 	}
177 183
 
184
+	/**
185
+	 * @param string $action
186
+	 */
178 187
 	public function getTemplatesFor($action) {
179 188
 		return array("CMSSecurity_{$action}", "CMSSecurity")
180 189
 			+ parent::getTemplatesFor($action);
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.
security/PasswordEncryptor.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -85,6 +85,10 @@  discard block
 block discarded – undo
85 85
 	 * but is necessary for retain compatibility with password hashed
86 86
 	 * with flawed algorithms - see {@link PasswordEncryptor_LegacyPHPHash} and
87 87
 	 * {@link PasswordEncryptor_Blowfish}
88
+	 * @param string $hash
89
+	 * @param string $password
90
+	 * @param string $salt
91
+	 * @param Member $member
88 92
 	 */
89 93
 	public function check($hash, $password, $salt = null, $member = null) {
90 94
 		return $hash === $this->encrypt($password, $salt, $member);
@@ -241,6 +245,7 @@  discard block
 block discarded – undo
241 245
 
242 246
 	/**
243 247
 	 * self::$cost param is forced to be two digits with leading zeroes for ints 4-9
248
+	 * @param string $password
244 249
 	 */
245 250
 	public function salt($password, $member = null) {
246 251
 		$generator = new RandomGenerator();
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
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 	 * Combine the given forms into a formset with a tabbed interface
504 504
 	 *
505 505
 	 * @param array $forms List of LoginForm instances
506
-	 * @return string
506
+	 * @return HTMLText
507 507
 	 */
508 508
 	protected function generateLoginFormSet($forms) {
509 509
 		$viewData = new ArrayData(array(
@@ -683,7 +683,6 @@  discard block
 block discarded – undo
683 683
 	 * - t: plaintext token
684 684
 	 *
685 685
 	 * @param Member $member Member object associated with this link.
686
-	 * @param string $autoLoginHash The auto login token.
687 686
 	 */
688 687
 	public static function getPasswordResetLink($member, $autologinToken) {
689 688
 		$autologinToken      = urldecode($autologinToken);
@@ -774,7 +773,7 @@  discard block
 block discarded – undo
774 773
 	/**
775 774
 	 * Factory method for the lost password form
776 775
 	 *
777
-	 * @return Form Returns the lost password form
776
+	 * @return Security Returns the lost password form
778 777
 	 */
779 778
 	public function ChangePasswordForm() {
780 779
 		return SS_Object::create('ChangePasswordForm', $this, 'ChangePasswordForm');
@@ -958,7 +957,7 @@  discard block
 block discarded – undo
958 957
 	 * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead
959 958
 	 * @param string $algorithm One of the available password encryption
960 959
 	 *  algorithms determined by {@link Security::get_encryption_algorithms()}
961
-	 * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE.
960
+	 * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE.
962 961
 	 */
963 962
 	public static function set_password_encryption_algorithm($algorithm) {
964 963
 		Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead');
@@ -1113,7 +1112,7 @@  discard block
 block discarded – undo
1113 1112
 	/**
1114 1113
 	 * Set to true to ignore access to disallowed actions, rather than returning permission failure
1115 1114
 	 * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions()
1116
-	 * @param $flag True or false
1115
+	 * @param boolean $flag True or false
1117 1116
 	 */
1118 1117
 	public static function set_ignore_disallowed_actions($flag) {
1119 1118
 		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
 	 */
@@ -1262,9 +1269,9 @@  discard block
 block discarded – undo
1262 1269
 	 * Used by the <% include %> template tag to process templates.
1263 1270
 	 *
1264 1271
 	 * @param string $template Template name
1265
-	 * @param mixed $data Data context
1272
+	 * @param SS_Object $data Data context
1266 1273
 	 * @param array $arguments Additional arguments
1267
-	 * @return string Evaluated result
1274
+	 * @return HTMLText Evaluated result
1268 1275
 	 */
1269 1276
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1270 1277
 		$v = new SSViewer($template);
@@ -1290,6 +1297,9 @@  discard block
 block discarded – undo
1290 1297
 		return $v->process($data, $arguments);
1291 1298
 	}
1292 1299
 
1300
+	/**
1301
+	 * @param string $content
1302
+	 */
1293 1303
 	public function parseTemplateContent($content, $template="") {
1294 1304
 		return $this->getParser()->compileString(
1295 1305
 			$content,
@@ -1318,7 +1328,7 @@  discard block
 block discarded – undo
1318 1328
 	 * Return an appropriate base tag for the given template.
1319 1329
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1320 1330
 	 *
1321
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1331
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1322 1332
 	 * the DOCTYPE declaration.
1323 1333
 	 */
1324 1334
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1359,6 +1369,9 @@  discard block
 block discarded – undo
1359 1369
 	 */
1360 1370
 	protected $cacheTemplate;
1361 1371
 
1372
+	/**
1373
+	 * @param string $content
1374
+	 */
1362 1375
 	public function __construct($content, TemplateParser $parser = null) {
1363 1376
 		if ($parser) {
1364 1377
 			$this->setParser($parser);
Please login to merge, or discard this patch.