@@ -137,7 +137,6 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
| 140 | - * @param mixed $value, ... |
|
| 141 | 140 | * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker |
| 142 | 141 | */ |
| 143 | 142 | public function willReturnOnConsecutiveCalls() |
@@ -193,7 +192,6 @@ discard block |
||
| 193 | 192 | } |
| 194 | 193 | |
| 195 | 194 | /** |
| 196 | - * @param mixed $argument, ... |
|
| 197 | 195 | * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker |
| 198 | 196 | */ |
| 199 | 197 | public function with() |
@@ -237,7 +235,7 @@ discard block |
||
| 237 | 235 | } |
| 238 | 236 | |
| 239 | 237 | /** |
| 240 | - * @param PHPUnit_Framework_Constraint|string $constraint |
|
| 238 | + * @param string $constraint |
|
| 241 | 239 | * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker |
| 242 | 240 | */ |
| 243 | 241 | public function method($constraint) |
@@ -219,7 +219,7 @@ |
||
| 219 | 219 | $this->canDefineParameters(); |
| 220 | 220 | |
| 221 | 221 | $this->matcher->parametersMatcher = |
| 222 | - new PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters($args); |
|
| 222 | + new PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters($args); |
|
| 223 | 223 | |
| 224 | 224 | return $this; |
| 225 | 225 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | /** |
| 116 | 116 | * Returns a mock object for the specified class. |
| 117 | 117 | * |
| 118 | - * @param array|string $type |
|
| 118 | + * @param string $type |
|
| 119 | 119 | * @param array $methods |
| 120 | 120 | * @param array $arguments |
| 121 | 121 | * @param string $mockClassName |
@@ -858,7 +858,7 @@ discard block |
||
| 858 | 858 | * @param array $mockClassName |
| 859 | 859 | * @param bool $isInterface |
| 860 | 860 | * @param array $additionalInterfaces |
| 861 | - * @return array |
|
| 861 | + * @return string |
|
| 862 | 862 | */ |
| 863 | 863 | protected function generateMockClassDeclaration(array $mockClassName, $isInterface, array $additionalInterfaces = array()) |
| 864 | 864 | { |
@@ -35,81 +35,81 @@ discard block |
||
| 35 | 35 | * @var array |
| 36 | 36 | */ |
| 37 | 37 | protected $blacklistedMethodNames = array( |
| 38 | - '__CLASS__' => true, |
|
| 39 | - '__DIR__' => true, |
|
| 40 | - '__FILE__' => true, |
|
| 41 | - '__FUNCTION__' => true, |
|
| 42 | - '__LINE__' => true, |
|
| 43 | - '__METHOD__' => true, |
|
| 44 | - '__NAMESPACE__' => true, |
|
| 45 | - '__TRAIT__' => true, |
|
| 46 | - '__clone' => true, |
|
| 47 | - '__halt_compiler' => true, |
|
| 48 | - 'abstract' => true, |
|
| 49 | - 'and' => true, |
|
| 50 | - 'array' => true, |
|
| 51 | - 'as' => true, |
|
| 52 | - 'break' => true, |
|
| 53 | - 'callable' => true, |
|
| 54 | - 'case' => true, |
|
| 55 | - 'catch' => true, |
|
| 56 | - 'class' => true, |
|
| 57 | - 'clone' => true, |
|
| 58 | - 'const' => true, |
|
| 59 | - 'continue' => true, |
|
| 60 | - 'declare' => true, |
|
| 61 | - 'default' => true, |
|
| 62 | - 'die' => true, |
|
| 63 | - 'do' => true, |
|
| 64 | - 'echo' => true, |
|
| 65 | - 'else' => true, |
|
| 66 | - 'elseif' => true, |
|
| 67 | - 'empty' => true, |
|
| 68 | - 'enddeclare' => true, |
|
| 69 | - 'endfor' => true, |
|
| 70 | - 'endforeach' => true, |
|
| 71 | - 'endif' => true, |
|
| 72 | - 'endswitch' => true, |
|
| 73 | - 'endwhile' => true, |
|
| 74 | - 'eval' => true, |
|
| 75 | - 'exit' => true, |
|
| 76 | - 'expects' => true, |
|
| 77 | - 'extends' => true, |
|
| 78 | - 'final' => true, |
|
| 79 | - 'for' => true, |
|
| 80 | - 'foreach' => true, |
|
| 81 | - 'function' => true, |
|
| 82 | - 'global' => true, |
|
| 83 | - 'goto' => true, |
|
| 84 | - 'if' => true, |
|
| 85 | - 'implements' => true, |
|
| 86 | - 'include' => true, |
|
| 87 | - 'include_once' => true, |
|
| 88 | - 'instanceof' => true, |
|
| 89 | - 'insteadof' => true, |
|
| 90 | - 'interface' => true, |
|
| 91 | - 'isset' => true, |
|
| 92 | - 'list' => true, |
|
| 93 | - 'namespace' => true, |
|
| 94 | - 'new' => true, |
|
| 95 | - 'or' => true, |
|
| 96 | - 'print' => true, |
|
| 97 | - 'private' => true, |
|
| 98 | - 'protected' => true, |
|
| 99 | - 'public' => true, |
|
| 100 | - 'require' => true, |
|
| 101 | - 'require_once' => true, |
|
| 102 | - 'return' => true, |
|
| 103 | - 'static' => true, |
|
| 104 | - 'switch' => true, |
|
| 105 | - 'throw' => true, |
|
| 106 | - 'trait' => true, |
|
| 107 | - 'try' => true, |
|
| 108 | - 'unset' => true, |
|
| 109 | - 'use' => true, |
|
| 110 | - 'var' => true, |
|
| 111 | - 'while' => true, |
|
| 112 | - 'xor' => true |
|
| 38 | + '__CLASS__' => true, |
|
| 39 | + '__DIR__' => true, |
|
| 40 | + '__FILE__' => true, |
|
| 41 | + '__FUNCTION__' => true, |
|
| 42 | + '__LINE__' => true, |
|
| 43 | + '__METHOD__' => true, |
|
| 44 | + '__NAMESPACE__' => true, |
|
| 45 | + '__TRAIT__' => true, |
|
| 46 | + '__clone' => true, |
|
| 47 | + '__halt_compiler' => true, |
|
| 48 | + 'abstract' => true, |
|
| 49 | + 'and' => true, |
|
| 50 | + 'array' => true, |
|
| 51 | + 'as' => true, |
|
| 52 | + 'break' => true, |
|
| 53 | + 'callable' => true, |
|
| 54 | + 'case' => true, |
|
| 55 | + 'catch' => true, |
|
| 56 | + 'class' => true, |
|
| 57 | + 'clone' => true, |
|
| 58 | + 'const' => true, |
|
| 59 | + 'continue' => true, |
|
| 60 | + 'declare' => true, |
|
| 61 | + 'default' => true, |
|
| 62 | + 'die' => true, |
|
| 63 | + 'do' => true, |
|
| 64 | + 'echo' => true, |
|
| 65 | + 'else' => true, |
|
| 66 | + 'elseif' => true, |
|
| 67 | + 'empty' => true, |
|
| 68 | + 'enddeclare' => true, |
|
| 69 | + 'endfor' => true, |
|
| 70 | + 'endforeach' => true, |
|
| 71 | + 'endif' => true, |
|
| 72 | + 'endswitch' => true, |
|
| 73 | + 'endwhile' => true, |
|
| 74 | + 'eval' => true, |
|
| 75 | + 'exit' => true, |
|
| 76 | + 'expects' => true, |
|
| 77 | + 'extends' => true, |
|
| 78 | + 'final' => true, |
|
| 79 | + 'for' => true, |
|
| 80 | + 'foreach' => true, |
|
| 81 | + 'function' => true, |
|
| 82 | + 'global' => true, |
|
| 83 | + 'goto' => true, |
|
| 84 | + 'if' => true, |
|
| 85 | + 'implements' => true, |
|
| 86 | + 'include' => true, |
|
| 87 | + 'include_once' => true, |
|
| 88 | + 'instanceof' => true, |
|
| 89 | + 'insteadof' => true, |
|
| 90 | + 'interface' => true, |
|
| 91 | + 'isset' => true, |
|
| 92 | + 'list' => true, |
|
| 93 | + 'namespace' => true, |
|
| 94 | + 'new' => true, |
|
| 95 | + 'or' => true, |
|
| 96 | + 'print' => true, |
|
| 97 | + 'private' => true, |
|
| 98 | + 'protected' => true, |
|
| 99 | + 'public' => true, |
|
| 100 | + 'require' => true, |
|
| 101 | + 'require_once' => true, |
|
| 102 | + 'return' => true, |
|
| 103 | + 'static' => true, |
|
| 104 | + 'switch' => true, |
|
| 105 | + 'throw' => true, |
|
| 106 | + 'trait' => true, |
|
| 107 | + 'try' => true, |
|
| 108 | + 'unset' => true, |
|
| 109 | + 'use' => true, |
|
| 110 | + 'var' => true, |
|
| 111 | + 'while' => true, |
|
| 112 | + 'xor' => true |
|
| 113 | 113 | ); |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | ); |
| 396 | 396 | |
| 397 | 397 | $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . |
| 398 | - DIRECTORY_SEPARATOR; |
|
| 398 | + DIRECTORY_SEPARATOR; |
|
| 399 | 399 | $classTemplate = new Text_Template( |
| 400 | 400 | $templateDir . 'trait_class.tpl' |
| 401 | 401 | ); |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | ); |
| 457 | 457 | |
| 458 | 458 | $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . |
| 459 | - DIRECTORY_SEPARATOR; |
|
| 459 | + DIRECTORY_SEPARATOR; |
|
| 460 | 460 | $classTemplate = new Text_Template( |
| 461 | 461 | $templateDir . 'trait_class.tpl' |
| 462 | 462 | ); |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | protected function generateMock($type, $methods, $mockClassName, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods) |
| 625 | 625 | { |
| 626 | 626 | $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . |
| 627 | - DIRECTORY_SEPARATOR; |
|
| 627 | + DIRECTORY_SEPARATOR; |
|
| 628 | 628 | $classTemplate = new Text_Template( |
| 629 | 629 | $templateDir . 'mocked_class.tpl' |
| 630 | 630 | ); |
@@ -807,8 +807,8 @@ discard block |
||
| 807 | 807 | ); |
| 808 | 808 | |
| 809 | 809 | return array( |
| 810 | - 'code' => $classTemplate->render(), |
|
| 811 | - 'mockClassName' => $mockClassName['className'] |
|
| 810 | + 'code' => $classTemplate->render(), |
|
| 811 | + 'mockClassName' => $mockClassName['className'] |
|
| 812 | 812 | ); |
| 813 | 813 | } |
| 814 | 814 | |
@@ -842,15 +842,15 @@ discard block |
||
| 842 | 842 | if ($className == '') { |
| 843 | 843 | do { |
| 844 | 844 | $className = $prefix . $type . '_' . |
| 845 | - substr(md5(microtime()), 0, 8); |
|
| 845 | + substr(md5(microtime()), 0, 8); |
|
| 846 | 846 | } while (class_exists($className, false)); |
| 847 | 847 | } |
| 848 | 848 | |
| 849 | 849 | return array( |
| 850 | - 'className' => $className, |
|
| 851 | - 'originalClassName' => $type, |
|
| 852 | - 'fullClassName' => $fullClassName, |
|
| 853 | - 'namespaceName' => $namespaceName |
|
| 850 | + 'className' => $className, |
|
| 851 | + 'originalClassName' => $type, |
|
| 852 | + 'fullClassName' => $fullClassName, |
|
| 853 | + 'namespaceName' => $namespaceName |
|
| 854 | 854 | ); |
| 855 | 855 | } |
| 856 | 856 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | if (is_array($type)) { |
| 153 | 153 | $type = array_unique(array_map( |
| 154 | - function ($type) { |
|
| 154 | + function($type) { |
|
| 155 | 155 | if ($type === 'Traversable' || |
| 156 | 156 | $type === '\\Traversable' || |
| 157 | 157 | $type === '\\Iterator') { |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | $name = substr($method, $nameStart, $nameEnd - $nameStart); |
| 556 | 556 | |
| 557 | 557 | if (empty($methods) || in_array($name, $methods)) { |
| 558 | - $args = explode( |
|
| 558 | + $args = explode( |
|
| 559 | 559 | ',', |
| 560 | 560 | substr( |
| 561 | 561 | $method, |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * @param string $className |
| 25 | - * @param string $methodname |
|
| 25 | + * @param string $methodName |
|
| 26 | 26 | * @param array $parameters |
| 27 | - * @param object $object |
|
| 28 | - * @param object $cloneObjects |
|
| 27 | + * @param stdClass $object |
|
| 28 | + * @param object stdClass |
|
| 29 | 29 | */ |
| 30 | 30 | public function __construct($className, $methodName, array $parameters, $object, $cloneObjects = false) |
| 31 | 31 | { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * @param string $className |
| 62 | - * @param string $methodname |
|
| 62 | + * @param string $methodName |
|
| 63 | 63 | * @param array $parameters |
| 64 | 64 | * @param bool $cloneObjects |
| 65 | 65 | */ |
@@ -21,25 +21,25 @@ |
||
| 21 | 21 | * @var array |
| 22 | 22 | */ |
| 23 | 23 | protected static $uncloneableExtensions = array( |
| 24 | - 'mysqli' => true, |
|
| 25 | - 'SQLite' => true, |
|
| 26 | - 'sqlite3' => true, |
|
| 27 | - 'tidy' => true, |
|
| 28 | - 'xmlwriter' => true, |
|
| 29 | - 'xsl' => true |
|
| 24 | + 'mysqli' => true, |
|
| 25 | + 'SQLite' => true, |
|
| 26 | + 'sqlite3' => true, |
|
| 27 | + 'tidy' => true, |
|
| 28 | + 'xmlwriter' => true, |
|
| 29 | + 'xsl' => true |
|
| 30 | 30 | ); |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * @var array |
| 34 | 34 | */ |
| 35 | 35 | protected static $uncloneableClasses = array( |
| 36 | - 'Closure', |
|
| 37 | - 'COMPersistHelper', |
|
| 38 | - 'IteratorIterator', |
|
| 39 | - 'RecursiveIteratorIterator', |
|
| 40 | - 'SplFileObject', |
|
| 41 | - 'PDORow', |
|
| 42 | - 'ZipArchive' |
|
| 36 | + 'Closure', |
|
| 37 | + 'COMPersistHelper', |
|
| 38 | + 'IteratorIterator', |
|
| 39 | + 'RecursiveIteratorIterator', |
|
| 40 | + 'SplFileObject', |
|
| 41 | + 'PDORow', |
|
| 42 | + 'ZipArchive' |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * @param mixed $id |
| 56 | - * @return bool|null |
|
| 56 | + * @return PHPUnit_Framework_MockObject_Builder_Match|null |
|
| 57 | 57 | */ |
| 58 | 58 | public function lookupId($id) |
| 59 | 59 | { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | - * @return bool |
|
| 148 | + * @return boolean|null |
|
| 149 | 149 | */ |
| 150 | 150 | public function verify() |
| 151 | 151 | { |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * @param PHPUnit_Framework_MockObject_Invocation $invocation |
| 60 | - * @return bool |
|
| 60 | + * @return boolean|null |
|
| 61 | 61 | */ |
| 62 | 62 | public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) |
| 63 | 63 | { |
@@ -79,9 +79,6 @@ |
||
| 79 | 79 | * does the matcher will get the invoked() method called which should check |
| 80 | 80 | * if an expectation is met. |
| 81 | 81 | * |
| 82 | - * @param PHPUnit_Framework_MockObject_Invocation $invocation |
|
| 83 | - * Object containing information on a mocked or stubbed method which |
|
| 84 | - * was invoked. |
|
| 85 | 82 | * @return bool |
| 86 | 83 | * @throws PHPUnit_Framework_ExpectationFailedException |
| 87 | 84 | */ |
@@ -45,10 +45,7 @@ |
||
| 45 | 45 | * the matcher will get the invoked() method called which should check if an |
| 46 | 46 | * expectation is met. |
| 47 | 47 | * |
| 48 | - * @param PHPUnit_Framework_MockObject_Invocation $invocation |
|
| 49 | - * Object containing information on a mocked or stubbed method which |
|
| 50 | - * was invoked. |
|
| 51 | - * @return bool |
|
| 48 | + * @return boolean|null |
|
| 52 | 49 | */ |
| 53 | 50 | public function verify() |
| 54 | 51 | { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * @param PHPUnit_Framework_TestCase $testCase |
| 75 | - * @param array|string $type |
|
| 75 | + * @param string $type |
|
| 76 | 76 | */ |
| 77 | 77 | public function __construct(PHPUnit_Framework_TestCase $testCase, $type) |
| 78 | 78 | { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | /** |
| 143 | 143 | * Specifies the subset of methods to mock. Default is to mock all of them. |
| 144 | 144 | * |
| 145 | - * @param array|null $methods |
|
| 145 | + * @param string[] $methods |
|
| 146 | 146 | * @return PHPUnit_Framework_MockObject_MockBuilder |
| 147 | 147 | */ |
| 148 | 148 | public function setMethods($methods) |