@@ -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 | } |
@@ -180,7 +180,7 @@ |
||
| 180 | 180 | { |
| 181 | 181 | if ($this->matcher->methodNameMatcher === null) { |
| 182 | 182 | throw new PHPUnit_Framework_Exception( |
| 183 | - 'Method name matcher is not defined, cannot define parameter ' . |
|
| 183 | + 'Method name matcher is not defined, cannot define parameter '. |
|
| 184 | 184 | ' matcher without one' |
| 185 | 185 | ); |
| 186 | 186 | } |
@@ -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') { |
@@ -394,10 +394,10 @@ discard block |
||
| 394 | 394 | 'Trait_' |
| 395 | 395 | ); |
| 396 | 396 | |
| 397 | - $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . |
|
| 397 | + $templateDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'Generator'. |
|
| 398 | 398 | DIRECTORY_SEPARATOR; |
| 399 | 399 | $classTemplate = new Text_Template( |
| 400 | - $templateDir . 'trait_class.tpl' |
|
| 400 | + $templateDir.'trait_class.tpl' |
|
| 401 | 401 | ); |
| 402 | 402 | |
| 403 | 403 | $classTemplate->setVar( |
@@ -455,10 +455,10 @@ discard block |
||
| 455 | 455 | 'Trait_' |
| 456 | 456 | ); |
| 457 | 457 | |
| 458 | - $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . |
|
| 458 | + $templateDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'Generator'. |
|
| 459 | 459 | DIRECTORY_SEPARATOR; |
| 460 | 460 | $classTemplate = new Text_Template( |
| 461 | - $templateDir . 'trait_class.tpl' |
|
| 461 | + $templateDir.'trait_class.tpl' |
|
| 462 | 462 | ); |
| 463 | 463 | |
| 464 | 464 | $classTemplate->setVar( |
@@ -493,10 +493,10 @@ discard block |
||
| 493 | 493 | |
| 494 | 494 | if ($mockClassName == '') { |
| 495 | 495 | $key = md5( |
| 496 | - is_array($type) ? implode('_', $type) : $type . |
|
| 497 | - serialize($methods) . |
|
| 498 | - serialize($callOriginalClone) . |
|
| 499 | - serialize($cloneArguments) . |
|
| 496 | + is_array($type) ? implode('_', $type) : $type. |
|
| 497 | + serialize($methods). |
|
| 498 | + serialize($callOriginalClone). |
|
| 499 | + serialize($cloneArguments). |
|
| 500 | 500 | serialize($callOriginalMethods) |
| 501 | 501 | ); |
| 502 | 502 | |
@@ -545,8 +545,8 @@ discard block |
||
| 545 | 545 | |
| 546 | 546 | sort($_methods); |
| 547 | 547 | |
| 548 | - $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR; |
|
| 549 | - $methodTemplate = new Text_Template($templateDir . 'wsdl_method.tpl'); |
|
| 548 | + $templateDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'Generator'.DIRECTORY_SEPARATOR; |
|
| 549 | + $methodTemplate = new Text_Template($templateDir.'wsdl_method.tpl'); |
|
| 550 | 550 | $methodsBuffer = ''; |
| 551 | 551 | |
| 552 | 552 | foreach ($_methods as $method) { |
@@ -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, |
@@ -583,18 +583,18 @@ discard block |
||
| 583 | 583 | $optionsBuffer = 'array('; |
| 584 | 584 | |
| 585 | 585 | foreach ($options as $key => $value) { |
| 586 | - $optionsBuffer .= $key . ' => ' . $value; |
|
| 586 | + $optionsBuffer .= $key.' => '.$value; |
|
| 587 | 587 | } |
| 588 | 588 | |
| 589 | 589 | $optionsBuffer .= ')'; |
| 590 | 590 | |
| 591 | - $classTemplate = new Text_Template($templateDir . 'wsdl_class.tpl'); |
|
| 591 | + $classTemplate = new Text_Template($templateDir.'wsdl_class.tpl'); |
|
| 592 | 592 | $namespace = ''; |
| 593 | 593 | |
| 594 | 594 | if (strpos($className, '\\') !== false) { |
| 595 | 595 | $parts = explode('\\', $className); |
| 596 | 596 | $className = array_pop($parts); |
| 597 | - $namespace = 'namespace ' . implode('\\', $parts) . ';' . "\n\n"; |
|
| 597 | + $namespace = 'namespace '.implode('\\', $parts).';'."\n\n"; |
|
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | $classTemplate->setVar( |
@@ -623,10 +623,10 @@ discard block |
||
| 623 | 623 | */ |
| 624 | 624 | protected function generateMock($type, $methods, $mockClassName, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods) |
| 625 | 625 | { |
| 626 | - $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . |
|
| 626 | + $templateDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'Generator'. |
|
| 627 | 627 | DIRECTORY_SEPARATOR; |
| 628 | 628 | $classTemplate = new Text_Template( |
| 629 | - $templateDir . 'mocked_class.tpl' |
|
| 629 | + $templateDir.'mocked_class.tpl' |
|
| 630 | 630 | ); |
| 631 | 631 | |
| 632 | 632 | $additionalInterfaces = array(); |
@@ -678,18 +678,18 @@ discard block |
||
| 678 | 678 | |
| 679 | 679 | if (!class_exists($mockClassName['fullClassName'], $callAutoload) && |
| 680 | 680 | !interface_exists($mockClassName['fullClassName'], $callAutoload)) { |
| 681 | - $prologue = 'class ' . $mockClassName['originalClassName'] . "\n{\n}\n\n"; |
|
| 681 | + $prologue = 'class '.$mockClassName['originalClassName']."\n{\n}\n\n"; |
|
| 682 | 682 | |
| 683 | 683 | if (!empty($mockClassName['namespaceName'])) { |
| 684 | - $prologue = 'namespace ' . $mockClassName['namespaceName'] . |
|
| 685 | - " {\n\n" . $prologue . "}\n\n" . |
|
| 684 | + $prologue = 'namespace '.$mockClassName['namespaceName']. |
|
| 685 | + " {\n\n".$prologue."}\n\n". |
|
| 686 | 686 | "namespace {\n\n"; |
| 687 | 687 | |
| 688 | 688 | $epilogue = "\n\n}"; |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | $cloneTemplate = new Text_Template( |
| 692 | - $templateDir . 'mocked_clone.tpl' |
|
| 692 | + $templateDir.'mocked_clone.tpl' |
|
| 693 | 693 | ); |
| 694 | 694 | } else { |
| 695 | 695 | $class = new ReflectionClass($mockClassName['fullClassName']); |
@@ -709,17 +709,17 @@ discard block |
||
| 709 | 709 | if (!$cloneMethod->isFinal()) { |
| 710 | 710 | if ($callOriginalClone && !$isInterface) { |
| 711 | 711 | $cloneTemplate = new Text_Template( |
| 712 | - $templateDir . 'unmocked_clone.tpl' |
|
| 712 | + $templateDir.'unmocked_clone.tpl' |
|
| 713 | 713 | ); |
| 714 | 714 | } else { |
| 715 | 715 | $cloneTemplate = new Text_Template( |
| 716 | - $templateDir . 'mocked_clone.tpl' |
|
| 716 | + $templateDir.'mocked_clone.tpl' |
|
| 717 | 717 | ); |
| 718 | 718 | } |
| 719 | 719 | } |
| 720 | 720 | } else { |
| 721 | 721 | $cloneTemplate = new Text_Template( |
| 722 | - $templateDir . 'mocked_clone.tpl' |
|
| 722 | + $templateDir.'mocked_clone.tpl' |
|
| 723 | 723 | ); |
| 724 | 724 | } |
| 725 | 725 | } |
@@ -784,7 +784,7 @@ discard block |
||
| 784 | 784 | |
| 785 | 785 | if (!in_array('method', $methods)) { |
| 786 | 786 | $methodTemplate = new Text_Template( |
| 787 | - $templateDir . 'mocked_class_method.tpl' |
|
| 787 | + $templateDir.'mocked_class_method.tpl' |
|
| 788 | 788 | ); |
| 789 | 789 | |
| 790 | 790 | $method = $methodTemplate->render(); |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | if (count($classNameParts) > 1) { |
| 834 | 834 | $type = array_pop($classNameParts); |
| 835 | 835 | $namespaceName = implode('\\', $classNameParts); |
| 836 | - $fullClassName = $namespaceName . '\\' . $type; |
|
| 836 | + $fullClassName = $namespaceName.'\\'.$type; |
|
| 837 | 837 | } else { |
| 838 | 838 | $namespaceName = ''; |
| 839 | 839 | $fullClassName = $type; |
@@ -841,7 +841,7 @@ discard block |
||
| 841 | 841 | |
| 842 | 842 | if ($className == '') { |
| 843 | 843 | do { |
| 844 | - $className = $prefix . $type . '_' . |
|
| 844 | + $className = $prefix.$type.'_'. |
|
| 845 | 845 | substr(md5(microtime()), 0, 8); |
| 846 | 846 | } while (class_exists($className, false)); |
| 847 | 847 | } |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | $buffer .= ', '; |
| 879 | 879 | |
| 880 | 880 | if (!empty($mockClassName['namespaceName'])) { |
| 881 | - $buffer .= $mockClassName['namespaceName'] . '\\'; |
|
| 881 | + $buffer .= $mockClassName['namespaceName'].'\\'; |
|
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 884 | $buffer .= $mockClassName['originalClassName']; |
@@ -887,7 +887,7 @@ discard block |
||
| 887 | 887 | $buffer .= sprintf( |
| 888 | 888 | '%s extends %s%s implements %s', |
| 889 | 889 | $mockClassName['className'], |
| 890 | - !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '', |
|
| 890 | + !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'].'\\' : '', |
|
| 891 | 891 | $mockClassName['originalClassName'], |
| 892 | 892 | $interfaces |
| 893 | 893 | ); |
@@ -961,7 +961,7 @@ discard block |
||
| 961 | 961 | ); |
| 962 | 962 | } |
| 963 | 963 | |
| 964 | - $template = new Text_Template($templateDir . $templateFile); |
|
| 964 | + $template = new Text_Template($templateDir.$templateFile); |
|
| 965 | 965 | |
| 966 | 966 | $template->setVar( |
| 967 | 967 | array( |
@@ -1009,20 +1009,20 @@ discard block |
||
| 1009 | 1009 | $parameters = array(); |
| 1010 | 1010 | |
| 1011 | 1011 | foreach ($method->getParameters() as $i => $parameter) { |
| 1012 | - $name = '$' . $parameter->getName(); |
|
| 1012 | + $name = '$'.$parameter->getName(); |
|
| 1013 | 1013 | |
| 1014 | 1014 | /* Note: PHP extensions may use empty names for reference arguments |
| 1015 | 1015 | * or "..." for methods taking a variable number of arguments. |
| 1016 | 1016 | */ |
| 1017 | 1017 | if ($name === '$' || $name === '$...') { |
| 1018 | - $name = '$arg' . $i; |
|
| 1018 | + $name = '$arg'.$i; |
|
| 1019 | 1019 | } |
| 1020 | 1020 | |
| 1021 | 1021 | if ($this->isVariadic($parameter)) { |
| 1022 | 1022 | if ($forCall) { |
| 1023 | 1023 | continue; |
| 1024 | 1024 | } else { |
| 1025 | - $name = '...' . $name; |
|
| 1025 | + $name = '...'.$name; |
|
| 1026 | 1026 | } |
| 1027 | 1027 | } |
| 1028 | 1028 | |
@@ -1032,7 +1032,7 @@ discard block |
||
| 1032 | 1032 | |
| 1033 | 1033 | if (!$forCall) { |
| 1034 | 1034 | if ($this->hasType($parameter)) { |
| 1035 | - $typeDeclaration = (string) $parameter->getType() . ' '; |
|
| 1035 | + $typeDeclaration = (string) $parameter->getType().' '; |
|
| 1036 | 1036 | } elseif ($parameter->isArray()) { |
| 1037 | 1037 | $typeDeclaration = 'array '; |
| 1038 | 1038 | } elseif ((defined('HHVM_VERSION') || version_compare(PHP_VERSION, '5.4.0', '>=')) |
@@ -1044,7 +1044,7 @@ discard block |
||
| 1044 | 1044 | } catch (ReflectionException $e) { |
| 1045 | 1045 | throw new PHPUnit_Framework_MockObject_RuntimeException( |
| 1046 | 1046 | sprintf( |
| 1047 | - 'Cannot mock %s::%s() because a class or ' . |
|
| 1047 | + 'Cannot mock %s::%s() because a class or '. |
|
| 1048 | 1048 | 'interface used in the signature is not loaded', |
| 1049 | 1049 | $method->getDeclaringClass()->getName(), |
| 1050 | 1050 | $method->getName() |
@@ -1055,14 +1055,14 @@ discard block |
||
| 1055 | 1055 | } |
| 1056 | 1056 | |
| 1057 | 1057 | if ($class !== null) { |
| 1058 | - $typeDeclaration = $class->getName() . ' '; |
|
| 1058 | + $typeDeclaration = $class->getName().' '; |
|
| 1059 | 1059 | } |
| 1060 | 1060 | } |
| 1061 | 1061 | |
| 1062 | 1062 | if (!$this->isVariadic($parameter)) { |
| 1063 | 1063 | if ($parameter->isDefaultValueAvailable()) { |
| 1064 | 1064 | $value = $parameter->getDefaultValue(); |
| 1065 | - $default = ' = ' . var_export($value, true); |
|
| 1065 | + $default = ' = '.var_export($value, true); |
|
| 1066 | 1066 | } elseif ($parameter->isOptional()) { |
| 1067 | 1067 | $default = ' = null'; |
| 1068 | 1068 | } |
@@ -1073,7 +1073,7 @@ discard block |
||
| 1073 | 1073 | $reference = '&'; |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | - $parameters[] = $typeDeclaration . $reference . $name . $default; |
|
| 1076 | + $parameters[] = $typeDeclaration.$reference.$name.$default; |
|
| 1077 | 1077 | } |
| 1078 | 1078 | |
| 1079 | 1079 | return implode(', ', $parameters); |
@@ -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 | { |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | { |
| 74 | 74 | if (isset($this->builderMap[$id])) { |
| 75 | 75 | throw new PHPUnit_Framework_Exception( |
| 76 | - 'Match builder with id <' . $id . '> is already registered.' |
|
| 76 | + 'Match builder with id <'.$id.'> is already registered.' |
|
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -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 | { |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function toString() |
| 54 | 54 | { |
| 55 | - return 'method name ' . $this->constraint->toString(); |
|
| 55 | + return 'method name '.$this->constraint->toString(); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -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 | */ |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $text .= ' and'; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - $text .= ' ' . $index . ' ' . $parameter->toString(); |
|
| 60 | + $text .= ' '.$index.' '.$parameter->toString(); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | return $text; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $parameter->evaluate( |
| 115 | 115 | $this->invocation->parameters[$i], |
| 116 | 116 | sprintf( |
| 117 | - 'Parameter %s for invocation %s does not match expected ' . |
|
| 117 | + 'Parameter %s for invocation %s does not match expected '. |
|
| 118 | 118 | 'value.', |
| 119 | 119 | $i, |
| 120 | 120 | $this->invocation->toString() |
@@ -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 @@ |
||
| 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 | { |