1 | <?php |
||
19 | class ReactFactory |
||
20 | { |
||
21 | /** |
||
22 | * Build a react Event Loop. |
||
23 | * |
||
24 | * @return LoopInterface |
||
25 | */ |
||
26 | 109 | public static function buildEventLoop() |
|
30 | |||
31 | /** |
||
32 | * Build a React Dns Resolver. |
||
33 | * |
||
34 | * @param LoopInterface $loop |
||
35 | * @param string $dns |
||
36 | * |
||
37 | * @return DnsResolver |
||
38 | */ |
||
39 | 109 | public static function buildDnsResolver( |
|
47 | |||
48 | /** |
||
49 | * @param LoopInterface $loop |
||
50 | * @param DnsResolver|null $dns |
||
51 | * |
||
52 | * @return ConnectorInterface |
||
53 | */ |
||
54 | public static function buildConnector( |
||
62 | |||
63 | /** |
||
64 | * Build a React Http Client. |
||
65 | * |
||
66 | * @param LoopInterface $loop |
||
67 | * @param ConnectorInterface|DnsResolver|null $connector Only pass this argument if you need to customize DNS |
||
68 | * behaviour. With react http client v0.5, pass a connector, |
||
69 | * with v0.4 this must be a DnsResolver. |
||
70 | * |
||
71 | * @return HttpClient |
||
72 | */ |
||
73 | 111 | public static function buildHttpClient( |
|
84 | |||
85 | /** |
||
86 | * Builds a React Http client v0.4 style. |
||
87 | * |
||
88 | * @param LoopInterface $loop |
||
89 | * @param DnsResolver|null $dns |
||
90 | * |
||
91 | * @return HttpClient |
||
92 | */ |
||
93 | 111 | protected static function buildHttpClient04( |
|
111 | |||
112 | /** |
||
113 | * Builds a React Http client v0.5 style. |
||
114 | * |
||
115 | * @param LoopInterface $loop |
||
116 | * @param DnsResolver|ConnectorInterface|null $connector |
||
117 | * |
||
118 | * @return HttpClient |
||
119 | */ |
||
120 | protected static function buildHttpClient05( |
||
146 | } |
||
147 |
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.