@@ -2395,7 +2395,6 @@ |
||
2395 | 2395 | } |
2396 | 2396 | |
2397 | 2397 | /** |
2398 | - * @param mixed $value, ... |
|
2399 | 2398 | * |
2400 | 2399 | * @return PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls |
2401 | 2400 | * |
@@ -101,7 +101,7 @@ |
||
101 | 101 | * @param string $description Additional information about the test |
102 | 102 | * @param bool $returnResult Whether to return a result or throw an exception |
103 | 103 | * |
104 | - * @return mixed |
|
104 | + * @return boolean |
|
105 | 105 | * |
106 | 106 | * @throws PHPUnit_Framework_ExpectationFailedException |
107 | 107 | */ |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | } |
454 | 454 | |
455 | 455 | /** |
456 | - * @param mixed $exceptionName |
|
456 | + * @param string $exceptionName |
|
457 | 457 | * @param string $exceptionMessage |
458 | 458 | * @param int $exceptionCode |
459 | 459 | * |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |
470 | - * @param mixed $exceptionName |
|
470 | + * @param string $exceptionName |
|
471 | 471 | * @param string $exceptionMessageRegExp |
472 | 472 | * @param int $exceptionCode |
473 | 473 | * |
@@ -1028,6 +1028,7 @@ discard block |
||
1028 | 1028 | * Sets the name of a TestCase. |
1029 | 1029 | * |
1030 | 1030 | * @param string |
1031 | + * @param string $name |
|
1031 | 1032 | */ |
1032 | 1033 | public function setName($name) |
1033 | 1034 | { |
@@ -1262,8 +1263,6 @@ discard block |
||
1262 | 1263 | * This method is a wrapper for the setlocale() function that automatically |
1263 | 1264 | * resets the locale to its original value after the test is run. |
1264 | 1265 | * |
1265 | - * @param int $category |
|
1266 | - * @param string $locale |
|
1267 | 1266 | * |
1268 | 1267 | * @throws PHPUnit_Framework_Exception |
1269 | 1268 | * |
@@ -1774,7 +1773,6 @@ discard block |
||
1774 | 1773 | } |
1775 | 1774 | |
1776 | 1775 | /** |
1777 | - * @param mixed $value, ... |
|
1778 | 1776 | * |
1779 | 1777 | * @return PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls |
1780 | 1778 | * |
@@ -652,11 +652,11 @@ |
||
652 | 652 | $iniSettings = ''; |
653 | 653 | } |
654 | 654 | |
655 | - $coverage = $result->getCollectCodeCoverageInformation() ? 'true' : 'false'; |
|
655 | + $coverage = $result->getCollectCodeCoverageInformation() ? 'true' : 'false'; |
|
656 | 656 | $isStrictAboutTestsThatDoNotTestAnything = $result->isStrictAboutTestsThatDoNotTestAnything() ? 'true' : 'false'; |
657 | - $isStrictAboutOutputDuringTests = $result->isStrictAboutOutputDuringTests() ? 'true' : 'false'; |
|
658 | - $isStrictAboutTestSize = $result->isStrictAboutTestSize() ? 'true' : 'false'; |
|
659 | - $isStrictAboutTodoAnnotatedTests = $result->isStrictAboutTodoAnnotatedTests() ? 'true' : 'false'; |
|
657 | + $isStrictAboutOutputDuringTests = $result->isStrictAboutOutputDuringTests() ? 'true' : 'false'; |
|
658 | + $isStrictAboutTestSize = $result->isStrictAboutTestSize() ? 'true' : 'false'; |
|
659 | + $isStrictAboutTodoAnnotatedTests = $result->isStrictAboutTodoAnnotatedTests() ? 'true' : 'false'; |
|
660 | 660 | |
661 | 661 | if (defined('PHPUNIT_COMPOSER_INSTALL')) { |
662 | 662 | $composerAutoload = var_export(PHPUNIT_COMPOSER_INSTALL, true); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | /** |
27 | 27 | * Returns the loader to be used. |
28 | 28 | * |
29 | - * @return PHPUnit_Runner_TestSuiteLoader |
|
29 | + * @return string |
|
30 | 30 | */ |
31 | 31 | public function getLoader() |
32 | 32 | { |
@@ -1004,6 +1004,7 @@ |
||
1004 | 1004 | } |
1005 | 1005 | |
1006 | 1006 | /** |
1007 | + * @param string $message |
|
1007 | 1008 | */ |
1008 | 1009 | private function showError($message) |
1009 | 1010 | { |
@@ -601,11 +601,11 @@ |
||
601 | 601 | /* |
602 | 602 | * Issue #657 |
603 | 603 | */ |
604 | - if (isset($phpunit['stderr']) && ! isset($this->arguments['stderr'])) { |
|
604 | + if (isset($phpunit['stderr']) && !isset($this->arguments['stderr'])) { |
|
605 | 605 | $this->arguments['stderr'] = $phpunit['stderr']; |
606 | 606 | } |
607 | 607 | |
608 | - if (isset($phpunit['columns']) && ! isset($this->arguments['columns'])) { |
|
608 | + if (isset($phpunit['columns']) && !isset($this->arguments['columns'])) { |
|
609 | 609 | $this->arguments['columns'] = $phpunit['columns']; |
610 | 610 | } |
611 | 611 |
@@ -1019,7 +1019,7 @@ |
||
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | /** |
1022 | - * @param $extension |
|
1022 | + * @param string $extension |
|
1023 | 1023 | * @param string $message |
1024 | 1024 | * |
1025 | 1025 | * @since Method available since Release 4.7.3 |
@@ -233,11 +233,11 @@ |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | $this->printer = new $printerClass( |
236 | - isset($arguments['stderr']) ? 'php://stderr' : null, |
|
237 | - $arguments['verbose'], |
|
238 | - $arguments['colors'], |
|
239 | - $arguments['debug'], |
|
240 | - $arguments['columns'] |
|
236 | + isset($arguments['stderr']) ? 'php://stderr' : null, |
|
237 | + $arguments['verbose'], |
|
238 | + $arguments['colors'], |
|
239 | + $arguments['debug'], |
|
240 | + $arguments['columns'] |
|
241 | 241 | ); |
242 | 242 | } |
243 | 243 | } |
@@ -638,8 +638,8 @@ discard block |
||
638 | 638 | ); |
639 | 639 | } |
640 | 640 | |
641 | - $arguments['debug'] = isset($arguments['debug']) ? $arguments['debug'] : false; |
|
642 | - $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : false; |
|
641 | + $arguments['debug'] = isset($arguments['debug']) ? $arguments['debug'] : false; |
|
642 | + $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : false; |
|
643 | 643 | $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array(); |
644 | 644 | |
645 | 645 | if (isset($arguments['configuration'])) { |
@@ -983,39 +983,39 @@ discard block |
||
983 | 983 | } |
984 | 984 | } |
985 | 985 | |
986 | - $arguments['addUncoveredFilesFromWhitelist'] = isset($arguments['addUncoveredFilesFromWhitelist']) ? $arguments['addUncoveredFilesFromWhitelist'] : true; |
|
986 | + $arguments['addUncoveredFilesFromWhitelist'] = isset($arguments['addUncoveredFilesFromWhitelist']) ? $arguments['addUncoveredFilesFromWhitelist'] : true; |
|
987 | 987 | $arguments['processUncoveredFilesFromWhitelist'] = isset($arguments['processUncoveredFilesFromWhitelist']) ? $arguments['processUncoveredFilesFromWhitelist'] : false; |
988 | - $arguments['backupGlobals'] = isset($arguments['backupGlobals']) ? $arguments['backupGlobals'] : null; |
|
989 | - $arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttributes']) ? $arguments['backupStaticAttributes'] : null; |
|
990 | - $arguments['disallowChangesToGlobalState'] = isset($arguments['disallowChangesToGlobalState']) ? $arguments['disallowChangesToGlobalState'] : null; |
|
991 | - $arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : false; |
|
992 | - $arguments['columns'] = isset($arguments['columns']) ? $arguments['columns'] : 80; |
|
993 | - $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : PHPUnit_TextUI_ResultPrinter::COLOR_DEFAULT; |
|
994 | - $arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : true; |
|
995 | - $arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : true; |
|
996 | - $arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsToExceptions']) ? $arguments['convertWarningsToExceptions'] : true; |
|
997 | - $arguments['excludeGroups'] = isset($arguments['excludeGroups']) ? $arguments['excludeGroups'] : array(); |
|
998 | - $arguments['groups'] = isset($arguments['groups']) ? $arguments['groups'] : array(); |
|
999 | - $arguments['logIncompleteSkipped'] = isset($arguments['logIncompleteSkipped']) ? $arguments['logIncompleteSkipped'] : false; |
|
1000 | - $arguments['processIsolation'] = isset($arguments['processIsolation']) ? $arguments['processIsolation'] : false; |
|
1001 | - $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : false; |
|
1002 | - $arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerBound']) ? $arguments['reportHighLowerBound'] : 90; |
|
1003 | - $arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBound']) ? $arguments['reportLowUpperBound'] : 50; |
|
1004 | - $arguments['crap4jThreshold'] = isset($arguments['crap4jThreshold']) ? $arguments['crap4jThreshold'] : 30; |
|
1005 | - $arguments['stopOnError'] = isset($arguments['stopOnError']) ? $arguments['stopOnError'] : false; |
|
1006 | - $arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : false; |
|
1007 | - $arguments['stopOnIncomplete'] = isset($arguments['stopOnIncomplete']) ? $arguments['stopOnIncomplete'] : false; |
|
1008 | - $arguments['stopOnRisky'] = isset($arguments['stopOnRisky']) ? $arguments['stopOnRisky'] : false; |
|
1009 | - $arguments['stopOnSkipped'] = isset($arguments['stopOnSkipped']) ? $arguments['stopOnSkipped'] : false; |
|
1010 | - $arguments['timeoutForSmallTests'] = isset($arguments['timeoutForSmallTests']) ? $arguments['timeoutForSmallTests'] : 1; |
|
1011 | - $arguments['timeoutForMediumTests'] = isset($arguments['timeoutForMediumTests']) ? $arguments['timeoutForMediumTests'] : 10; |
|
1012 | - $arguments['timeoutForLargeTests'] = isset($arguments['timeoutForLargeTests']) ? $arguments['timeoutForLargeTests'] : 60; |
|
1013 | - $arguments['reportUselessTests'] = isset($arguments['reportUselessTests']) ? $arguments['reportUselessTests'] : false; |
|
1014 | - $arguments['strictCoverage'] = isset($arguments['strictCoverage']) ? $arguments['strictCoverage'] : false; |
|
1015 | - $arguments['disallowTestOutput'] = isset($arguments['disallowTestOutput']) ? $arguments['disallowTestOutput'] : false; |
|
1016 | - $arguments['enforceTimeLimit'] = isset($arguments['enforceTimeLimit']) ? $arguments['enforceTimeLimit'] : false; |
|
1017 | - $arguments['disallowTodoAnnotatedTests'] = isset($arguments['disallowTodoAnnotatedTests']) ? $arguments['disallowTodoAnnotatedTests'] : false; |
|
1018 | - $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : false; |
|
988 | + $arguments['backupGlobals'] = isset($arguments['backupGlobals']) ? $arguments['backupGlobals'] : null; |
|
989 | + $arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttributes']) ? $arguments['backupStaticAttributes'] : null; |
|
990 | + $arguments['disallowChangesToGlobalState'] = isset($arguments['disallowChangesToGlobalState']) ? $arguments['disallowChangesToGlobalState'] : null; |
|
991 | + $arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : false; |
|
992 | + $arguments['columns'] = isset($arguments['columns']) ? $arguments['columns'] : 80; |
|
993 | + $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : PHPUnit_TextUI_ResultPrinter::COLOR_DEFAULT; |
|
994 | + $arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : true; |
|
995 | + $arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : true; |
|
996 | + $arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsToExceptions']) ? $arguments['convertWarningsToExceptions'] : true; |
|
997 | + $arguments['excludeGroups'] = isset($arguments['excludeGroups']) ? $arguments['excludeGroups'] : array(); |
|
998 | + $arguments['groups'] = isset($arguments['groups']) ? $arguments['groups'] : array(); |
|
999 | + $arguments['logIncompleteSkipped'] = isset($arguments['logIncompleteSkipped']) ? $arguments['logIncompleteSkipped'] : false; |
|
1000 | + $arguments['processIsolation'] = isset($arguments['processIsolation']) ? $arguments['processIsolation'] : false; |
|
1001 | + $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : false; |
|
1002 | + $arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerBound']) ? $arguments['reportHighLowerBound'] : 90; |
|
1003 | + $arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBound']) ? $arguments['reportLowUpperBound'] : 50; |
|
1004 | + $arguments['crap4jThreshold'] = isset($arguments['crap4jThreshold']) ? $arguments['crap4jThreshold'] : 30; |
|
1005 | + $arguments['stopOnError'] = isset($arguments['stopOnError']) ? $arguments['stopOnError'] : false; |
|
1006 | + $arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : false; |
|
1007 | + $arguments['stopOnIncomplete'] = isset($arguments['stopOnIncomplete']) ? $arguments['stopOnIncomplete'] : false; |
|
1008 | + $arguments['stopOnRisky'] = isset($arguments['stopOnRisky']) ? $arguments['stopOnRisky'] : false; |
|
1009 | + $arguments['stopOnSkipped'] = isset($arguments['stopOnSkipped']) ? $arguments['stopOnSkipped'] : false; |
|
1010 | + $arguments['timeoutForSmallTests'] = isset($arguments['timeoutForSmallTests']) ? $arguments['timeoutForSmallTests'] : 1; |
|
1011 | + $arguments['timeoutForMediumTests'] = isset($arguments['timeoutForMediumTests']) ? $arguments['timeoutForMediumTests'] : 10; |
|
1012 | + $arguments['timeoutForLargeTests'] = isset($arguments['timeoutForLargeTests']) ? $arguments['timeoutForLargeTests'] : 60; |
|
1013 | + $arguments['reportUselessTests'] = isset($arguments['reportUselessTests']) ? $arguments['reportUselessTests'] : false; |
|
1014 | + $arguments['strictCoverage'] = isset($arguments['strictCoverage']) ? $arguments['strictCoverage'] : false; |
|
1015 | + $arguments['disallowTestOutput'] = isset($arguments['disallowTestOutput']) ? $arguments['disallowTestOutput'] : false; |
|
1016 | + $arguments['enforceTimeLimit'] = isset($arguments['enforceTimeLimit']) ? $arguments['enforceTimeLimit'] : false; |
|
1017 | + $arguments['disallowTodoAnnotatedTests'] = isset($arguments['disallowTodoAnnotatedTests']) ? $arguments['disallowTodoAnnotatedTests'] : false; |
|
1018 | + $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : false; |
|
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | /** |
@@ -484,6 +484,9 @@ discard block |
||
484 | 484 | } |
485 | 485 | } |
486 | 486 | |
487 | + /** |
|
488 | + * @param string $docComment |
|
489 | + */ |
|
487 | 490 | private static function cleanUpMultiLineAnnotation($docComment) |
488 | 491 | { |
489 | 492 | //removing initial ' * ' for docComment |
@@ -616,7 +619,7 @@ discard block |
||
616 | 619 | * @param string $className |
617 | 620 | * @param string $methodName |
618 | 621 | * |
619 | - * @return bool |
|
622 | + * @return boolean|null |
|
620 | 623 | * |
621 | 624 | * @since Method available since Release 3.4.0 |
622 | 625 | */ |
@@ -779,7 +782,7 @@ discard block |
||
779 | 782 | * @param string $className |
780 | 783 | * @param string $methodName |
781 | 784 | * |
782 | - * @return bool |
|
785 | + * @return boolean|null |
|
783 | 786 | * |
784 | 787 | * @since Method available since Release 3.4.0 |
785 | 788 | */ |
@@ -855,7 +858,7 @@ discard block |
||
855 | 858 | * @param string $methodName |
856 | 859 | * @param string $settingName |
857 | 860 | * |
858 | - * @return bool |
|
861 | + * @return boolean|null |
|
859 | 862 | * |
860 | 863 | * @since Method available since Release 3.4.0 |
861 | 864 | */ |
@@ -1049,7 +1052,7 @@ discard block |
||
1049 | 1052 | /** |
1050 | 1053 | * @param ReflectionMethod $method |
1051 | 1054 | * |
1052 | - * @return bool |
|
1055 | + * @return integer |
|
1053 | 1056 | * |
1054 | 1057 | * @since Method available since Release 4.0.8 |
1055 | 1058 | */ |
@@ -1073,7 +1076,7 @@ discard block |
||
1073 | 1076 | /** |
1074 | 1077 | * @param ReflectionMethod $method |
1075 | 1078 | * |
1076 | - * @return bool |
|
1079 | + * @return integer |
|
1077 | 1080 | * |
1078 | 1081 | * @since Method available since Release 4.0.8 |
1079 | 1082 | */ |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } else { |
56 | 56 | if ($test instanceof PHPUnit_Framework_TestCase) { |
57 | 57 | return array( |
58 | - get_class($test), $test->getName() |
|
58 | + get_class($test), $test->getName() |
|
59 | 59 | ); |
60 | 60 | } elseif ($test instanceof PHPUnit_Framework_SelfDescribing) { |
61 | 61 | return array('', $test->toString()); |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | } |
325 | 325 | |
326 | 326 | return array( |
327 | - 'class' => $class, 'code' => $code, 'message' => $message, 'message_regex' => $messageRegExp |
|
327 | + 'class' => $class, 'code' => $code, 'message' => $message, 'message_regex' => $messageRegExp |
|
328 | 328 | ); |
329 | 329 | } |
330 | 330 | |
@@ -522,8 +522,8 @@ discard block |
||
522 | 522 | } |
523 | 523 | |
524 | 524 | return array( |
525 | - 'class' => self::$annotationCache[$className], |
|
526 | - 'method' => !empty($methodName) ? self::$annotationCache[$className . '::' . $methodName] : array() |
|
525 | + 'class' => self::$annotationCache[$className], |
|
526 | + 'method' => !empty($methodName) ? self::$annotationCache[$className . '::' . $methodName] : array() |
|
527 | 527 | ); |
528 | 528 | } |
529 | 529 | |
@@ -564,16 +564,16 @@ discard block |
||
564 | 564 | public static function getBackupSettings($className, $methodName) |
565 | 565 | { |
566 | 566 | return array( |
567 | - 'backupGlobals' => self::getBooleanAnnotationSetting( |
|
568 | - $className, |
|
569 | - $methodName, |
|
570 | - 'backupGlobals' |
|
571 | - ), |
|
572 | - 'backupStaticAttributes' => self::getBooleanAnnotationSetting( |
|
573 | - $className, |
|
574 | - $methodName, |
|
575 | - 'backupStaticAttributes' |
|
576 | - ) |
|
567 | + 'backupGlobals' => self::getBooleanAnnotationSetting( |
|
568 | + $className, |
|
569 | + $methodName, |
|
570 | + 'backupGlobals' |
|
571 | + ), |
|
572 | + 'backupStaticAttributes' => self::getBooleanAnnotationSetting( |
|
573 | + $className, |
|
574 | + $methodName, |
|
575 | + 'backupStaticAttributes' |
|
576 | + ) |
|
577 | 577 | ); |
578 | 578 | } |
579 | 579 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * Returns the bank account's balance. |
31 | 31 | * |
32 | - * @return float |
|
32 | + * @return integer |
|
33 | 33 | */ |
34 | 34 | public function getBalance() |
35 | 35 | { |
@@ -129,6 +129,9 @@ |
||
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | + /** |
|
133 | + * @param string $lines |
|
134 | + */ |
|
132 | 135 | protected function indent($lines) |
133 | 136 | { |
134 | 137 | return trim(str_replace("\n", "\n ", $lines)); |