for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class ChecIOExtension extends SiteTreeExtension
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* Loads the third party javascript during Controller->init()
*/
public function contentcontrollerInit()
if ($jsPath = ChecIOShortcode::config()->get('third-party-js')) {
Requirements::javascript($jsPath);
}
* Tries to fetch the inline chec.io JS from cache, failing which it gets it from the URL.
* Should your theme clear requirements, placing this before the closing body tag ensures
* that it always gets loaded.
* @return string
public function getChecIOJs()
return sprintf('<script type="text/javascript" src="%s"></script>', $jsPath);
return '';
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.