1 | <?php |
||
14 | class Renderer |
||
15 | { |
||
16 | const DEFAULT_RENDERER = 'AnalyticsJs'; |
||
17 | |||
18 | /** |
||
19 | * @param GoogleAnalytics|HasRenderer $analytics |
||
20 | * @param string $name |
||
21 | * @return string |
||
22 | */ |
||
23 | public static function render($analytics, $name = SELF::DEFAULT_RENDERER) |
||
28 | |||
29 | /** |
||
30 | * @param string $name |
||
31 | * @param GoogleAnalytics $analytics |
||
32 | * @return AbstractScript |
||
33 | */ |
||
34 | protected static function newScript($analytics, $name) |
||
42 | } |
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.