1 | <?php |
||
9 | class TestHelper { |
||
10 | |||
11 | /** |
||
12 | * @param callable $callback |
||
13 | * @param string $expectedException |
||
14 | * @param int $expectedCode |
||
|
|||
15 | * @param string $expectedMessage |
||
16 | * @author VladaHejda |
||
17 | */ |
||
18 | public static function assertException(callable $callback, $expectedException = 'Exception', $expectedCode = null, $expectedMessage = null) { |
||
52 | |||
53 | /** |
||
54 | * Call protected/private method of a class. |
||
55 | * |
||
56 | * @param object|string &$object Instantiated object that we will run method on. |
||
57 | * @param string $methodName Method name to call |
||
58 | * @param array $parameters Array of parameters to pass into method. |
||
59 | * |
||
60 | * @return mixed Method return. |
||
61 | * |
||
62 | * @author Juan Treminio |
||
63 | * @author Christian Blank |
||
64 | */ |
||
65 | public static function invoke(&$object, $methodName, array $parameters = []) { |
||
76 | } |
||
77 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.