Completed
Pull Request — master (#4748)
by Michael
10:35
created
dev/FunctionalTest.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	 * Find an attribute in a SimpleXMLElement object by name.
216 216
 	 * @param SimpleXMLElement $object
217 217
 	 * @param string $attribute Name of attribute to find
218
-	 * @return SimpleXMLElement object of the attribute
218
+	 * @return boolean object of the attribute
219 219
 	 */
220 220
 	public function findAttribute($object, $attribute) {
221 221
 		$found = false;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 * Note:   characters are stripped from the content; make sure that your assertions take this into account.
246 246
 	 *
247 247
 	 * @param string $selector A basic CSS selector, e.g. 'li.jobs h3'
248
-	 * @param array|string $expectedMatches The content of at least one of the matched tags
248
+	 * @param string[] $expectedMatches The content of at least one of the matched tags
249 249
 	 * @throws PHPUnit_Framework_AssertionFailedError
250 250
 	 * @return boolean
251 251
 	 */
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 	 * @param string $selector A basic CSS selector, e.g. 'li.jobs h3'
343 343
 	 * @param array|string $expectedMatches The content of *all* matched tags as an array
344 344
 	 * @throws PHPUnit_Framework_AssertionFailedError
345
-	 * @return boolean
345
+	 * @return boolean|null
346 346
 	 */
347 347
 	public function assertExactHTMLMatchBySelector($selector, $expectedMatches) {
348 348
 		$items = $this->cssParser()->getBySelector($selector);
Please login to merge, or discard this patch.
dev/SapphireTest.php 1 patch
Doc Comments   +9 added lines, -7 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;
@@ -398,7 +399,7 @@  discard block
 block discarded – undo
398 399
 	/**
399 400
 	 * Get the ID of an object from the fixture.
400 401
 	 *
401
-	 * @param $className The data class, as specified in your fixture file.  Parent classes won't work
402
+	 * @param string $className The data class, as specified in your fixture file.  Parent classes won't work
402 403
 	 * @param $identifier The identifier string, as provided in your fixture file
403 404
 	 * @return int
404 405
 	 */
@@ -421,7 +422,7 @@  discard block
 block discarded – undo
421 422
 	 * Will collate all IDs form all fixtures if multiple fixtures are provided.
422 423
 	 *
423 424
 	 * @param string $className
424
-	 * @return array A map of fixture-identifier => object-id
425
+	 * @return A A map of fixture-identifier => object-id
425 426
 	 */
426 427
 	protected function allFixtureIDs($className) {
427 428
 		return $this->getFixtureFactory()->getIds($className);
@@ -578,7 +579,7 @@  discard block
 block discarded – undo
578 579
 	/**
579 580
 	 * Assert that the matching email was sent since the last call to clearEmails()
580 581
 	 * All of the parameters can either be a string, or, if they start with "/", a PREG-compatible regular expression.
581
-	 * @param $to
582
+	 * @param string $to
582 583
 	 * @param $from
583 584
 	 * @param $subject
584 585
 	 * @param $content
@@ -742,7 +743,7 @@  discard block
 block discarded – undo
742 743
 	 * @param string $expectedSQL
743 744
 	 * @param string $actualSQL
744 745
 	 * @param string $message
745
-	 * @param float $delta
746
+	 * @param integer $delta
746 747
 	 * @param integer $maxDepth
747 748
 	 * @param boolean $canonicalize
748 749
 	 * @param boolean $ignoreCase
@@ -941,6 +942,7 @@  discard block
 block discarded – undo
941 942
 	/**
942 943
 	 * Create a member and group with the given permission code, and log in with it.
943 944
 	 * Returns the member ID.
945
+	 * @return integer
944 946
 	 */
945 947
 	public function logInWithPermission($permCode = "ADMIN") {
946 948
 		if(!isset($this->cache_generatedMembers[$permCode])) {
@@ -980,9 +982,9 @@  discard block
 block discarded – undo
980 982
 	/**
981 983
 	 * Test against a theme.
982 984
 	 *
983
-	 * @param $themeBaseDir string - themes directory
984
-	 * @param $theme string - theme name
985
-	 * @param $callback Closure
985
+	 * @param string $themeBaseDir string - themes directory
986
+	 * @param string $theme string - theme name
987
+	 * @param Closure $callback Closure
986 988
 	 */
987 989
 	protected function useTestTheme($themeBaseDir, $theme, $callback) {
988 990
 		Config::nest();
Please login to merge, or discard this patch.
dev/SapphireTestReporter.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 	 * @access private
320 320
 	 * @param obj PHPUnit_Framework_Test, current test that is being run
321 321
 	 * @param obj PHPUnit_Framework_AssertationFailedError, PHPUnit error
322
-	 * @return array
322
+	 * @return string
323 323
 	 */
324 324
 	private function getTestException(PHPUnit_Framework_Test $test, Exception $e) {
325 325
 		// get the name of the testFile from the test
@@ -406,6 +406,9 @@  discard block
 block discarded – undo
406 406
 
407 407
 	}
408 408
 
409
+	/**
410
+	 * @param string $name
411
+	 */
409 412
 	protected function testNameToPhrase($name) {
410 413
 		return ucfirst(preg_replace("/([a-z])([A-Z])/", "$1 $2", $name));
411 414
 	}
Please login to merge, or discard this patch.
dev/TestListener.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -52,6 +52,7 @@
 block discarded – undo
52 52
 
53 53
 	/**
54 54
 	 * @param String Classname
55
+	 * @param string $name
55 56
 	 * @return boolean
56 57
 	 */
57 58
 	protected function isValidClass($name) {
Please login to merge, or discard this patch.
dev/TestRunner.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@
 block discarded – undo
264 264
 	/**
265 265
 	 * Find all test classes in a directory and return an array of them.
266 266
 	 * @param string $directory To search in
267
-	 * @param array $ignore Ignore these test classes if they are found.
267
+	 * @param string[] $ignore Ignore these test classes if they are found.
268 268
 	 * @return array
269 269
 	 */
270 270
 	protected function getTestsInDirectory($directory, $ignore = array()) {
Please login to merge, or discard this patch.
email/Email.php 1 patch
Doc Comments   +19 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,6 +150,12 @@  discard block
 block discarded – undo
150 150
 
151 151
 	/**
152 152
 	 * Create a new email.
153
+	 * @param string $from
154
+	 * @param string $to
155
+	 * @param string $subject
156
+	 * @param string $body
157
+	 * @param string $cc
158
+	 * @param string $bcc
153 159
 	 */
154 160
 	public function __construct($from = null, $to = null, $subject = null, $body = null, $bounceHandlerURL = null,
155 161
 			$cc = null, $bcc = null) {
@@ -168,6 +174,9 @@  discard block
 block discarded – undo
168 174
 		parent::__construct();
169 175
 	}
170 176
 
177
+	/**
178
+	 * @param string $data
179
+	 */
171 180
 	public function attachFileFromString($data, $filename, $mimetype = null) {
172 181
 		$this->attachments[] = array(
173 182
 			'contents' => $data,
@@ -184,6 +193,10 @@  discard block
 block discarded – undo
184 193
 		Deprecation::notice('4.0', 'Use "emailbouncehandler" module');
185 194
 	}
186 195
 
196
+	/**
197
+	 * @param string $filename
198
+	 * @param string $mimetype
199
+	 */
187 200
 	public function attachFile($filename, $attachedFilename = null, $mimetype = null) {
188 201
 		if(!$attachedFilename) $attachedFilename = basename($filename);
189 202
 		$absoluteFileName = Director::getAbsFile($filename);
@@ -311,6 +324,9 @@  discard block
 block discarded – undo
311 324
 		return $this->ss_template;
312 325
 	}
313 326
 
327
+	/**
328
+	 * @return ViewableData
329
+	 */
314 330
 	protected function templateData() {
315 331
 		if($this->template_data) {
316 332
 			return $this->template_data->customise(array(
@@ -390,6 +406,7 @@  discard block
 block discarded – undo
390 406
 
391 407
 	/**
392 408
 	 * Validates the email address. Returns true of false
409
+	 * @param string $address
393 410
 	 */
394 411
 	public static function validEmailAddress($address) {
395 412
 		if (function_exists('filter_var')) {
@@ -611,8 +628,8 @@  discard block
 block discarded – undo
611 628
 	/**
612 629
 	 * Checks for RFC822-valid email format.
613 630
 	 *
614
-	 * @param string $str
615
-	 * @return boolean
631
+	 * @param string $email
632
+	 * @return integer
616 633
 	 *
617 634
 	 * @copyright Cal Henderson <[email protected]>
618 635
 	 * 	This code is licensed under a Creative Commons Attribution-ShareAlike 2.5 License
Please login to merge, or discard this patch.
filesystem/File.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -922,6 +922,7 @@  discard block
 block discarded – undo
922 922
 	 *
923 923
 	 * @param String File extension, without dot prefix. Use an asterisk ('*')
924 924
 	 * to specify a generic fallback if no mapping is found for an extension.
925
+	 * @param string $ext
925 926
 	 * @return String Classname for a subclass of {@link File}
926 927
 	 */
927 928
 	public static function get_class_for_file_extension($ext) {
@@ -1055,7 +1056,6 @@  discard block
 block discarded – undo
1055 1056
 	 * Note that the result will not have a leading slash, and should not be used
1056 1057
 	 * with local file paths.
1057 1058
 	 *
1058
-	 * @param string $part,... Parts
1059 1059
 	 * @return string
1060 1060
 	 */
1061 1061
 	public static function join_paths() {
Please login to merge, or discard this patch.
filesystem/FileNameFilter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 	protected $transliterator;
100 100
 
101 101
 	/**
102
-	 * @return SS_Transliterator|NULL
102
+	 * @return SS_Transliterator
103 103
 	 */
104 104
 	public function getTransliterator() {
105 105
 		if($this->transliterator === null && $this->config()->default_use_transliterator) {
Please login to merge, or discard this patch.
filesystem/Folder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 	 * Find the given folder or create it as a database record
46 46
 	 *
47 47
 	 * @param string $folderPath Directory path relative to assets root
48
-	 * @return Folder|null
48
+	 * @return null|DataObject
49 49
 	 */
50 50
 	public static function find_or_make($folderPath) {
51 51
 		// replace leading and trailing slashes
Please login to merge, or discard this patch.