Completed
Pull Request — master (#5830)
by Damian
11:27
created
core/Config.php 1 patch
Doc Comments   +27 added lines, -11 removed lines patch added patch discarded remove patch
@@ -470,11 +470,17 @@  discard block
 block discarded – undo
470 470
 
471 471
 	protected $extraConfigSources = array();
472 472
 
473
+	/**
474
+	 * @param string $class
475
+	 */
473 476
 	public function extraConfigSourcesChanged($class) {
474 477
 		unset($this->extraConfigSources[$class]);
475 478
 		$this->cache->clean("__{$class}");
476 479
 	}
477 480
 
481
+	/**
482
+	 * @param integer $sourceOptions
483
+	 */
478 484
 	protected function getUncached($class, $name, $sourceOptions, &$result, $suppress, &$tags) {
479 485
 		$tags[] = "__{$class}";
480 486
 		$tags[] = "__{$class}__{$name}";
@@ -603,7 +609,7 @@  discard block
 block discarded – undo
603 609
 	 * replace the current array value, you'll need to call remove first.
604 610
 	 *
605 611
 	 * @param $class string - The class to update a configuration value for
606
-	 * @param $name string - The configuration property name to update
612
+	 * @param string $name string - The configuration property name to update
607 613
 	 * @param $value any - The value to update with
608 614
 	 *
609 615
 	 * Arrays are recursively merged into current configuration as "latest" - for associative arrays the passed value
@@ -648,15 +654,6 @@  discard block
 block discarded – undo
648 654
 	 *
649 655
 	 * @param string $class The class to remove a configuration value from
650 656
 	 * @param string $name The configuration name
651
-	 * @param mixed $key An optional key to filter against.
652
-	 *   If referenced config value is an array, only members of that array that match this key will be removed
653
-	 *   Must also match value if provided to be removed
654
-	 * @param mixed $value And optional value to filter against.
655
-	 *   If referenced config value is an array, only members of that array that match this value will be removed
656
-	 *   If referenced config value is not an array, value will be removed only if it matches this argument
657
-	 *   Must also match key if provided and referenced config value is an array to be removed
658
-	 *
659
-	 * Matching is always by "==", not by "==="
660 657
 	 */
661 658
 	public function remove($class, $name /*,$key = null*/ /*,$value = null*/) {
662 659
 		$argc = func_num_args();
@@ -735,6 +732,10 @@  discard block
 block discarded – undo
735 732
 		$this->cache = $cloned;
736 733
 	}
737 734
 
735
+	/**
736
+	 * @param integer $key
737
+	 * @param integer $val
738
+	 */
738 739
 	public function set($key, $val, $tags = array()) {
739 740
 		// Find an index to set at
740 741
 		$replacing = null;
@@ -775,7 +776,7 @@  discard block
 block discarded – undo
775 776
 	 * For a more robust cache checking, use {@link checkAndGet()}
776 777
 	 *
777 778
 	 * @param  string $key The cache key
778
-	 * @return variant     Cached value, if hit. False otherwise
779
+	 * @return boolean     Cached value, if hit. False otherwise
779 780
 	 */
780 781
 	public function get($key) {
781 782
 		list($hit, $result) = $this->checkAndGet($key);
@@ -803,6 +804,9 @@  discard block
 block discarded – undo
803 804
 		}
804 805
 	}
805 806
 
807
+	/**
808
+	 * @param string $tag
809
+	 */
806 810
 	public function clean($tag = null) {
807 811
 		if ($tag) {
808 812
 			foreach ($this->cache as $i => $v) {
@@ -841,6 +845,10 @@  discard block
 block discarded – undo
841 845
 		$this->cache = array();
842 846
 	}
843 847
 
848
+	/**
849
+	 * @param integer $key
850
+	 * @param integer $val
851
+	 */
844 852
 	public function set($key, $val, $tags = array()) {
845 853
 		foreach($tags as $t) {
846 854
 			if(!isset($this->tags[$t])) {
@@ -859,6 +867,11 @@  discard block
 block discarded – undo
859 867
 		return $this->miss ? ($this->hit / $this->miss) : 0;
860 868
 	}
861 869
 
870
+	/**
871
+	 * @param integer $key
872
+	 *
873
+	 * @return boolean
874
+	 */
862 875
 	public function get($key) {
863 876
 		list($hit, $result) = $this->checkAndGet($key);
864 877
 		return $hit ? $result : false;
@@ -878,6 +891,9 @@  discard block
 block discarded – undo
878 891
 		}
879 892
 	}
880 893
 
894
+	/**
895
+	 * @param string $tag
896
+	 */
881 897
 	public function clean($tag = null) {
882 898
 		if($tag) {
883 899
 			if(isset($this->tags[$tag])) {
Please login to merge, or discard this patch.
email/Email.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -224,42 +224,42 @@
 block discarded – undo
224 224
 	}
225 225
 
226 226
 	/**
227
-	 * @return string|null
227
+	 * @return string
228 228
 	 */
229 229
 	public function Subject() {
230 230
 		return $this->subject;
231 231
 	}
232 232
 
233 233
 	/**
234
-	 * @return string|null
234
+	 * @return string
235 235
 	 */
236 236
 	public function Body() {
237 237
 		return $this->body;
238 238
 	}
239 239
 
240 240
 	/**
241
-	 * @return string|null
241
+	 * @return string
242 242
 	 */
243 243
 	public function To() {
244 244
 		return $this->to;
245 245
 	}
246 246
 
247 247
 	/**
248
-	 * @return string|null
248
+	 * @return string
249 249
 	 */
250 250
 	public function From() {
251 251
 		return $this->from;
252 252
 	}
253 253
 
254 254
 	/**
255
-	 * @return string|null
255
+	 * @return string
256 256
 	 */
257 257
 	public function Cc() {
258 258
 		return $this->cc;
259 259
 	}
260 260
 
261 261
 	/**
262
-	 * @return string|null
262
+	 * @return string
263 263
 	 */
264 264
 	public function Bcc() {
265 265
 		return $this->bcc;
Please login to merge, or discard this patch.
core/manifest/ManifestCache.php 1 patch
Doc Comments   +18 added lines patch added patch discarded remove patch
@@ -7,9 +7,27 @@
 block discarded – undo
7 7
  * @subpackage manifest
8 8
  */
9 9
 interface ManifestCache {
10
+
11
+	/**
12
+	 * @return void
13
+	 */
10 14
 	public function __construct($name);
15
+
16
+	/**
17
+	 * @param string $key
18
+	 */
11 19
 	public function load($key);
20
+
21
+	/**
22
+	 * @param string $key
23
+	 *
24
+	 * @return void
25
+	 */
12 26
 	public function save($data, $key);
27
+
28
+	/**
29
+	 * @return void
30
+	 */
13 31
 	public function clear();
14 32
 }
15 33
 
Please login to merge, or discard this patch.
view/ThemeResourceLoader.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -30,6 +30,9 @@
 block discarded – undo
30 30
 		self::$instance = $instance;
31 31
 	}
32 32
 
33
+	/**
34
+	 * @param string $base
35
+	 */
33 36
 	public function __construct($base = null) {
34 37
 		$this->base = $base ? $base : BASE_PATH;
35 38
 	}
Please login to merge, or discard this patch.
view/SSViewer.php 1 patch
Doc Comments   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -370,7 +370,6 @@  discard block
 block discarded – undo
370 370
 	/**
371 371
 	 * Returns the modulus of the numerical position of the item in the data set.
372 372
 	 * The count starts from $startIndex, which defaults to 1.
373
-	 * @param int $Mod The number to perform Mod operation to.
374 373
 	 * @param int $startIndex Number to start count from.
375 374
 	 * @return int
376 375
 	 */
@@ -444,6 +443,10 @@  discard block
 block discarded – undo
444 443
 		$this->underlay = $underlay ? $underlay : array();
445 444
 	}
446 445
 
446
+	/**
447
+	 * @param string $interfaceToQuery
448
+	 * @param string $variableMethod
449
+	 */
447 450
 	protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) {
448 451
 		$implementers = ClassInfo::implementorsOf($interfaceToQuery);
449 452
 		if($implementers) foreach($implementers as $implementer) {
@@ -818,7 +821,7 @@  discard block
 block discarded – undo
818 821
 	 * Assign the list of active themes to apply.
819 822
 	 * If default themes should be included add $default as the last entry.
820 823
 	 *
821
-	 * @param array $themes
824
+	 * @param string[] $themes
822 825
 	 */
823 826
 	public static function set_themes($themes = []) {
824 827
 		Config::inst()->remove('SSViewer', 'themes');
@@ -863,7 +866,7 @@  discard block
 block discarded – undo
863 866
 	 *
864 867
 	 * @param $className string - valid class name
865 868
 	 * @param $suffix string
866
-	 * @param $baseClass string
869
+	 * @param string $baseClass string
867 870
 	 *
868 871
 	 * @return array
869 872
 	 */
@@ -893,7 +896,7 @@  discard block
 block discarded – undo
893 896
 	}
894 897
 
895 898
 	/**
896
-	 * @param string|array $templateList If passed as a string with .ss extension, used as the "main" template.
899
+	 * @param string|array $templates If passed as a string with .ss extension, used as the "main" template.
897 900
 	 *  If passed as an array, it can be used for template inheritance (first found template "wins").
898 901
 	 *  Usually the array values are PHP class names, which directly correlate to template names.
899 902
 	 *  <code>
@@ -1246,7 +1249,7 @@  discard block
 block discarded – undo
1246 1249
 	 * @param string $template Template name
1247 1250
 	 * @param mixed $data Data context
1248 1251
 	 * @param array $arguments Additional arguments
1249
-	 * @return string Evaluated result
1252
+	 * @return DBHTMLText Evaluated result
1250 1253
 	 */
1251 1254
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1252 1255
 		$v = new SSViewer($template);
@@ -1272,6 +1275,9 @@  discard block
 block discarded – undo
1272 1275
 		return $v->process($data, $arguments);
1273 1276
 	}
1274 1277
 
1278
+	/**
1279
+	 * @param string $content
1280
+	 */
1275 1281
 	public function parseTemplateContent($content, $template="") {
1276 1282
 		return $this->getParser()->compileString(
1277 1283
 			$content,
@@ -1301,7 +1307,7 @@  discard block
 block discarded – undo
1301 1307
 	 * Return an appropriate base tag for the given template.
1302 1308
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1303 1309
 	 *
1304
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1310
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1305 1311
 	 * the DOCTYPE declaration.
1306 1312
 	 */
1307 1313
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1342,6 +1348,9 @@  discard block
 block discarded – undo
1342 1348
 	 */
1343 1349
 	protected $cacheTemplate;
1344 1350
 
1351
+	/**
1352
+	 * @param string $content
1353
+	 */
1345 1354
 	public function __construct($content, TemplateParser $parser = null) {
1346 1355
 		if ($parser) {
1347 1356
 			$this->setParser($parser);
Please login to merge, or discard this patch.