Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | function onAfterInit() |
||
9 | { |
||
10 | $environmentTypes = Config::inst()->get('FartScrollExtension', 'environmentTypes'); |
||
11 | $speed = Config::inst()->get('FartScrollExtension', 'speed'); |
||
12 | if (in_array(Director::get_environment_type(), $environmentTypes)) { |
||
13 | Requirements::javascript('http://code.onion.com/fartscroll.js'); |
||
14 | Requirements::customScript('fartscroll(' . $speed . ');', 'Fart'); |
||
15 | } |
||
16 | } |
||
17 | } |
||
18 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.