| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | public static function onMakeGlobalVariablesScript( array &$vars ) { |
||
|
|
|||
| 53 | global $egMapsGlobalJSVars; |
||
| 54 | |||
| 55 | $vars['egMapsDebugJS'] = $GLOBALS['egMapsDebugJS']; |
||
| 56 | $vars['egMapsAvailableServices'] = $GLOBALS['egMapsAvailableServices']; |
||
| 57 | $vars['egMapsLeafletLayersApiKeys'] = $GLOBALS['egMapsLeafletLayersApiKeys']; |
||
| 58 | |||
| 59 | $vars += $egMapsGlobalJSVars; |
||
| 60 | |||
| 61 | return true; |
||
| 62 | } |
||
| 63 | |||
| 65 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: