@@ -453,6 +453,9 @@ discard block |
||
453 | 453 | } |
454 | 454 | } |
455 | 455 | |
456 | + /** |
|
457 | + * @return MockInterface |
|
458 | + */ |
|
456 | 459 | protected function _getInstance($mockName, $constructorArgs = null) |
457 | 460 | { |
458 | 461 | if ($constructorArgs !== null) { |
@@ -503,6 +506,9 @@ discard block |
||
503 | 506 | } |
504 | 507 | } |
505 | 508 | |
509 | + /** |
|
510 | + * @param Generator\MockConfiguration $config |
|
511 | + */ |
|
506 | 512 | protected function checkForNamedMockClashes($config) |
507 | 513 | { |
508 | 514 | $name = $config->getName(); |
@@ -35,6 +35,9 @@ discard block |
||
35 | 35 | return $code; |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param MockConfiguration $config |
|
40 | + */ |
|
38 | 41 | protected function renderParams(Method $method, $config) |
39 | 42 | { |
40 | 43 | $class = $method->getDeclaringClass(); |
@@ -73,6 +76,9 @@ discard block |
||
73 | 76 | return $type ? sprintf(': %s', $type) : ''; |
74 | 77 | } |
75 | 78 | |
79 | + /** |
|
80 | + * @param string $code |
|
81 | + */ |
|
76 | 82 | protected function appendToClass($class, $code) |
77 | 83 | { |
78 | 84 | $lastBrace = strrpos($class, "}"); |
@@ -80,6 +86,9 @@ discard block |
||
80 | 86 | return $class; |
81 | 87 | } |
82 | 88 | |
89 | + /** |
|
90 | + * @param MockConfiguration $config |
|
91 | + */ |
|
83 | 92 | private function renderMethodBody($method, $config) |
84 | 93 | { |
85 | 94 | $invoke = $method->isStatic() ? 'static::_mockery_handleStaticMethodCall' : '$this->_mockery_handleMethodCall'; |
@@ -155,8 +155,6 @@ discard block |
||
155 | 155 | /** |
156 | 156 | * Return a string with the method name and arguments formatted |
157 | 157 | * |
158 | - * @param string $name Name of the expected method |
|
159 | - * @param array $args List of arguments to the method |
|
160 | 158 | * @return string |
161 | 159 | */ |
162 | 160 | public function __toString() |
@@ -189,7 +187,6 @@ discard block |
||
189 | 187 | /** |
190 | 188 | * Sets public properties with queued values to the mock object |
191 | 189 | * |
192 | - * @param array $args |
|
193 | 190 | * @return mixed |
194 | 191 | */ |
195 | 192 | protected function _setValues() |
@@ -267,7 +264,7 @@ discard block |
||
267 | 264 | /** |
268 | 265 | * Verify this expectation |
269 | 266 | * |
270 | - * @return bool |
|
267 | + * @return boolean|null |
|
271 | 268 | */ |
272 | 269 | public function verify() |
273 | 270 | { |
@@ -11,6 +11,9 @@ |
||
11 | 11 | $this->name = $name; |
12 | 12 | } |
13 | 13 | |
14 | + /** |
|
15 | + * @return string |
|
16 | + */ |
|
14 | 17 | public function getName() |
15 | 18 | { |
16 | 19 | return $this->name; |
@@ -287,6 +287,9 @@ discard block |
||
287 | 287 | return $this->targetClassName; |
288 | 288 | } |
289 | 289 | |
290 | + /** |
|
291 | + * @return null|TargetClassInterface |
|
292 | + */ |
|
290 | 293 | public function getTargetClass() |
291 | 294 | { |
292 | 295 | if ($this->targetClass) { |
@@ -372,6 +375,9 @@ discard block |
||
372 | 375 | return $this->targetObject; |
373 | 376 | } |
374 | 377 | |
378 | + /** |
|
379 | + * @return string |
|
380 | + */ |
|
375 | 381 | public function getName() |
376 | 382 | { |
377 | 383 | return $this->name; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | /** |
165 | 165 | * Static fetching of a mock associated with a name or explicit class poser. |
166 | 166 | * |
167 | - * @param $name |
|
167 | + * @param string $name |
|
168 | 168 | * |
169 | 169 | * @return \Mockery\Mock |
170 | 170 | */ |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | * Returns all public instance properties. |
578 | 578 | * |
579 | 579 | * @param $object |
580 | - * @param $nesting |
|
580 | + * @param integer $nesting |
|
581 | 581 | * |
582 | 582 | * @return array |
583 | 583 | */ |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | * Returns all object getters. |
602 | 602 | * |
603 | 603 | * @param $object |
604 | - * @param $nesting |
|
604 | + * @param integer $nesting |
|
605 | 605 | * |
606 | 606 | * @return array |
607 | 607 | */ |
@@ -826,16 +826,25 @@ discard block |
||
826 | 826 | return empty($methodNames); |
827 | 827 | } |
828 | 828 | |
829 | + /** |
|
830 | + * @param string $fqn |
|
831 | + */ |
|
829 | 832 | public static function declareClass($fqn) |
830 | 833 | { |
831 | 834 | return static::declareType($fqn, "class"); |
832 | 835 | } |
833 | 836 | |
837 | + /** |
|
838 | + * @param string $fqn |
|
839 | + */ |
|
834 | 840 | public static function declareInterface($fqn) |
835 | 841 | { |
836 | 842 | return static::declareType($fqn, "interface"); |
837 | 843 | } |
838 | 844 | |
845 | + /** |
|
846 | + * @param string $type |
|
847 | + */ |
|
839 | 848 | private static function declareType($fqn, $type) |
840 | 849 | { |
841 | 850 | $targetCode = "<?php "; |
@@ -22,18 +22,7 @@ |
||
22 | 22 | use Mockery\Generator\CachingGenerator; |
23 | 23 | use Mockery\Generator\Generator; |
24 | 24 | use Mockery\Generator\MockConfigurationBuilder; |
25 | -use Mockery\Generator\StringManipulation\Pass\RemoveDestructorPass; |
|
26 | 25 | use Mockery\Generator\StringManipulationGenerator; |
27 | -use Mockery\Generator\StringManipulation\Pass\CallTypeHintPass; |
|
28 | -use Mockery\Generator\StringManipulation\Pass\MagicMethodTypeHintsPass; |
|
29 | -use Mockery\Generator\StringManipulation\Pass\ClassNamePass; |
|
30 | -use Mockery\Generator\StringManipulation\Pass\ClassPass; |
|
31 | -use Mockery\Generator\StringManipulation\Pass\InstanceMockPass; |
|
32 | -use Mockery\Generator\StringManipulation\Pass\InterfacePass; |
|
33 | -use Mockery\Generator\StringManipulation\Pass\MethodDefinitionPass; |
|
34 | -use Mockery\Generator\StringManipulation\Pass\RemoveBuiltinMethodsThatAreFinalPass; |
|
35 | -use Mockery\Generator\StringManipulation\Pass\RemoveUnserializeForInternalSerializableClassesPass; |
|
36 | -use Mockery\Generator\StringManipulation\Pass\AvoidMethodClashPass; |
|
37 | 26 | use Mockery\Loader\EvalLoader; |
38 | 27 | use Mockery\Loader\Loader; |
39 | 28 |
@@ -50,6 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Allows additional methods to be mocked that do not explicitly exist on mocked class |
52 | 52 | * @param String $method name of the method to be mocked |
53 | + * @return Mock |
|
53 | 54 | */ |
54 | 55 | public function shouldAllowMockingMethod($method); |
55 | 56 | |
@@ -89,7 +90,7 @@ discard block |
||
89 | 90 | /** |
90 | 91 | * @param null|string $method |
91 | 92 | * @param null $args |
92 | - * @return mixed |
|
93 | + * @return HigherOrderMessage|null |
|
93 | 94 | */ |
94 | 95 | public function shouldNotHaveReceived($method, $args = null); |
95 | 96 | |
@@ -130,6 +131,7 @@ discard block |
||
130 | 131 | * |
131 | 132 | * @param mixed $group |
132 | 133 | * @param int $order |
134 | + * @return void |
|
133 | 135 | */ |
134 | 136 | public function mockery_setGroup($group, $order); |
135 | 137 | |
@@ -144,6 +146,7 @@ discard block |
||
144 | 146 | * Set current ordered number |
145 | 147 | * |
146 | 148 | * @param int $order |
149 | + * @return integer |
|
147 | 150 | */ |
148 | 151 | public function mockery_setCurrentOrder($order); |
149 | 152 |
@@ -701,6 +701,9 @@ discard block |
||
701 | 701 | } |
702 | 702 | } |
703 | 703 | |
704 | + /** |
|
705 | + * @return ReceivedMethodCalls |
|
706 | + */ |
|
704 | 707 | protected function _mockery_getReceivedMethodCalls() |
705 | 708 | { |
706 | 709 | return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new \Mockery\ReceivedMethodCalls(); |
@@ -804,7 +807,7 @@ discard block |
||
804 | 807 | } |
805 | 808 | |
806 | 809 | /** |
807 | - * @return array |
|
810 | + * @return MockInterface |
|
808 | 811 | */ |
809 | 812 | private function getNonPublicMethods() |
810 | 813 | { |