1 | <?php |
||
16 | class Factory { |
||
17 | /** |
||
18 | * Create a new condition |
||
19 | * |
||
20 | * @param string|Condition|array $options |
||
21 | * @return ConditionInterface |
||
22 | */ |
||
23 | public static function make( $options ) { |
||
38 | |||
39 | /** |
||
40 | * Create a new condition from a url |
||
41 | * |
||
42 | * @param string $url |
||
43 | * @return ConditionInterface |
||
44 | */ |
||
45 | protected static function makeFromUrl( $url ) { |
||
48 | |||
49 | /** |
||
50 | * Create a new condition from a closure |
||
51 | * |
||
52 | * @param Closure $closure |
||
53 | * @return ConditionInterface |
||
54 | */ |
||
55 | protected static function makeFromClosure( Closure $closure ) { |
||
58 | |||
59 | /** |
||
60 | * Create a new condition from an array |
||
61 | * |
||
62 | * @param array $options |
||
63 | * @return ConditionInterface |
||
64 | */ |
||
65 | protected static function makeFromArray( $options ) { |
||
86 | |||
87 | /** |
||
88 | * Create a new condition from an array of conditions |
||
89 | * |
||
90 | * @param array $options |
||
91 | * @return ConditionInterface |
||
92 | */ |
||
93 | protected static function makeFromArrayOfConditions( $options ) { |
||
96 | } |
||
97 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.