Completed
Pull Request — 3 (#8086)
by Ingo
09:31 queued 34s
created
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
@@ -958,6 +953,7 @@  discard block
 block discarded – undo
958 953
 
959 954
 	/**
960 955
 	 * @see SS_Object::get_static()
956
+	 * @param string $name
961 957
 	 */
962 958
 	public function stat($name, $uncached = false) {
963 959
 		return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::FIRST_SET);
@@ -965,6 +961,8 @@  discard block
 block discarded – undo
965 961
 
966 962
 	/**
967 963
 	 * @see SS_Object::set_static()
964
+	 * @param string $name
965
+	 * @param string $value
968 966
 	 */
969 967
 	public function set_stat($name, $value) {
970 968
 		Config::inst()->update(($this->class ? $this->class : get_class($this)), $name, $value);
@@ -972,6 +970,7 @@  discard block
 block discarded – undo
972 970
 
973 971
 	/**
974 972
 	 * @see SS_Object::uninherited_static()
973
+	 * @param string $name
975 974
 	 */
976 975
 	public function uninherited($name) {
977 976
 		return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::UNINHERITED);
@@ -1022,7 +1021,7 @@  discard block
 block discarded – undo
1022 1021
 	 * all results into an array
1023 1022
 	 *
1024 1023
 	 * @param string $method the method name to call
1025
-	 * @param mixed $argument a single argument to pass
1024
+	 * @param string $argument a single argument to pass
1026 1025
 	 * @return mixed
1027 1026
 	 * @todo integrate inheritance rules
1028 1027
 	 */
@@ -1048,7 +1047,7 @@  discard block
 block discarded – undo
1048 1047
 	 * @param mixed $a1
1049 1048
 	 * @param mixed $a2
1050 1049
 	 * @param mixed $a3
1051
-	 * @param mixed $a4
1050
+	 * @param DataObject $a4
1052 1051
 	 * @param mixed $a5
1053 1052
 	 * @param mixed $a6
1054 1053
 	 * @param mixed $a7
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.
control/RequestHandler.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,6 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
 	/**
131 131
 	 * Set the DataModel for this request.
132
+	 * @param DataModel $model
132 133
 	 */
133 134
 	public function setDataModel($model) {
134 135
 		$this->model = $model;
@@ -246,6 +247,9 @@  discard block
 block discarded – undo
246 247
 		return $this;
247 248
 	}
248 249
 
250
+	/**
251
+	 * @param SS_HTTPRequest $request
252
+	 */
249 253
 	protected function findAction($request) {
250 254
 		$handlerClass = ($this->class) ? $this->class : get_class($this);
251 255
 
@@ -392,6 +396,7 @@  discard block
 block discarded – undo
392 396
 
393 397
 	/**
394 398
 	 * Return the class that defines the given action, so that we know where to check allowed_actions.
399
+	 * @return string|null
395 400
 	 */
396 401
 	protected function definingClassForAction($actionOrigCasing) {
397 402
 		$action = strtolower($actionOrigCasing);
@@ -500,6 +505,7 @@  discard block
 block discarded – undo
500 505
 	 * or {@link handleRequest()}, but in some based we want to set it manually.
501 506
 	 *
502 507
 	 * @param SS_HTTPRequest
508
+	 * @param SS_HTTPRequest $request
503 509
 	 */
504 510
 	public function setRequest($request) {
505 511
 		$this->request = $request;
@@ -508,7 +514,6 @@  discard block
 block discarded – undo
508 514
 	/**
509 515
 	 * Returns a link to this controller.  Overload with your own Link rules if they exist.
510 516
 	 *
511
-	 * @param string $action Optional action (soft-supported via func_get_args)
512 517
 	 * @return string
513 518
 	 */
514 519
 	public function Link() {
Please login to merge, or discard this patch.
dev/SapphireTest.php 1 patch
Doc Comments   +10 added lines, -9 removed lines patch added patch discarded remove patch
@@ -142,6 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 	/**
144 144
 	 * Set the manifest to be used to look up test classes by helper functions
145
+	 * @param SS_ClassManifest $manifest
145 146
 	 */
146 147
 	public static function set_test_class_manifest($manifest) {
147 148
 		self::$test_class_manifest = $manifest;
@@ -399,7 +400,7 @@  discard block
 block discarded – undo
399 400
 	/**
400 401
 	 * Get the ID of an object from the fixture.
401 402
 	 *
402
-	 * @param $className The data class, as specified in your fixture file.  Parent classes won't work
403
+	 * @param string $className The data class, as specified in your fixture file.  Parent classes won't work
403 404
 	 * @param $identifier The identifier string, as provided in your fixture file
404 405
 	 * @return int
405 406
 	 */
@@ -422,7 +423,7 @@  discard block
 block discarded – undo
422 423
 	 * Will collate all IDs form all fixtures if multiple fixtures are provided.
423 424
 	 *
424 425
 	 * @param string $className
425
-	 * @return array A map of fixture-identifier => object-id
426
+	 * @return A A map of fixture-identifier => object-id
426 427
 	 */
427 428
 	protected function allFixtureIDs($className) {
428 429
 		return $this->getFixtureFactory()->getIds($className);
@@ -580,10 +581,10 @@  discard block
 block discarded – undo
580 581
 	/**
581 582
 	 * Assert that the matching email was sent since the last call to clearEmails()
582 583
 	 * All of the parameters can either be a string, or, if they start with "/", a PREG-compatible regular expression.
583
-	 * @param $to
584
+	 * @param string $to
584 585
 	 * @param $from
585
-	 * @param $subject
586
-	 * @param $content
586
+	 * @param string $subject
587
+	 * @param string $content
587 588
 	 * @return array Contains the keys: 'type', 'to', 'from', 'subject', 'content', 'plainContent', 'attachedFiles',
588 589
 	 *               'customHeaders', 'htmlContent', inlineImages'
589 590
 	 */
@@ -744,7 +745,7 @@  discard block
 block discarded – undo
744 745
 	 * @param string $expectedSQL
745 746
 	 * @param string $actualSQL
746 747
 	 * @param string $message
747
-	 * @param float $delta
748
+	 * @param integer $delta
748 749
 	 * @param integer $maxDepth
749 750
 	 * @param boolean $canonicalize
750 751
 	 * @param boolean $ignoreCase
@@ -982,9 +983,9 @@  discard block
 block discarded – undo
982 983
 	/**
983 984
 	 * Test against a theme.
984 985
 	 *
985
-	 * @param $themeBaseDir string - themes directory
986
-	 * @param $theme string - theme name
987
-	 * @param $callback Closure
986
+	 * @param string $themeBaseDir string - themes directory
987
+	 * @param string $theme string - theme name
988
+	 * @param Closure $callback Closure
988 989
 	 */
989 990
 	protected function useTestTheme($themeBaseDir, $theme, $callback) {
990 991
 		Config::nest();
Please login to merge, or discard this patch.
control/HTTP.php 1 patch
Doc Comments   +12 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @param string|callable $code Either a string that can evaluate to an expression
100 100
 	 * to rewrite links (depreciated), or a callable that takes a single
101 101
 	 * parameter and returns the rewritten URL
102
-	 * @return The content with all links rewritten as per the logic specified in $code
102
+	 * @return string content with all links rewritten as per the logic specified in $code
103 103
 	 */
104 104
 	public static function urlRewriter($content, $code) {
105 105
 		if(!is_callable($code)) {
@@ -243,6 +243,9 @@  discard block
 block discarded – undo
243 243
 		return count($result) ? $result : null;
244 244
 	}
245 245
 
246
+	/**
247
+	 * @param string $content
248
+	 */
246 249
 	public static function getLinksIn($content) {
247 250
 		return self::findByTagAndAttribute($content, array("a" => "href"));
248 251
 	}
@@ -285,6 +288,7 @@  discard block
 block discarded – undo
285 288
 
286 289
 	/**
287 290
 	 * Set the maximum age of this page in web caches, in seconds
291
+	 * @param integer $age
288 292
 	 */
289 293
 	public static function set_cache_age($age) {
290 294
 		self::$cache_age = $age;
@@ -297,11 +301,17 @@  discard block
 block discarded – undo
297 301
 			self::$modification_date = $timestamp;
298 302
 	}
299 303
 
304
+	/**
305
+	 * @param integer $timestamp
306
+	 */
300 307
 	public static function register_modification_timestamp($timestamp) {
301 308
 		if($timestamp > self::$modification_date)
302 309
 			self::$modification_date = $timestamp;
303 310
 	}
304 311
 
312
+	/**
313
+	 * @param string $etag
314
+	 */
305 315
 	public static function register_etag($etag) {
306 316
 		if (0 !== strpos($etag, '"')) {
307 317
 			$etag = sprintf('"%s"', $etag);
@@ -473,7 +483,7 @@  discard block
 block discarded – undo
473 483
 	}
474 484
 
475 485
 	/**
476
-	 * @param SS_HTTPResponse|string $response
486
+	 * @param null|SS_HTTPResponse $response
477 487
 	 *
478 488
 	 * @return string|false
479 489
 	 */
Please login to merge, or discard this patch.