| Conditions | 7 | 
| Paths | 7 | 
| Total Lines | 36 | 
| Code Lines | 22 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php | ||
| 16 | public static function getLoader() | ||
| 17 |     { | ||
| 18 |         if (null !== self::$loader) { | ||
| 19 | return self::$loader; | ||
| 20 | } | ||
| 21 | |||
| 22 |         spl_autoload_register(array('ComposerAutoloaderInitb90bf1d271f3139658812a290f5c564b', 'loadClassLoader'), true, true); | ||
| 23 | self::$loader = $loader = new \Composer\Autoload\ClassLoader(); | ||
| 24 |         spl_autoload_unregister(array('ComposerAutoloaderInitb90bf1d271f3139658812a290f5c564b', 'loadClassLoader')); | ||
| 25 | |||
| 26 |         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); | ||
| 27 |         if ($useStaticLoader) { | ||
| 28 | require_once __DIR__ . '/autoload_static.php'; | ||
| 29 | |||
| 30 | call_user_func(\Composer\Autoload\ComposerStaticInitb90bf1d271f3139658812a290f5c564b::getInitializer($loader)); | ||
| 31 |         } else { | ||
| 32 | $map = require __DIR__ . '/autoload_namespaces.php'; | ||
| 33 |             foreach ($map as $namespace => $path) { | ||
| 34 | $loader->set($namespace, $path); | ||
| 35 | } | ||
| 36 | |||
| 37 | $map = require __DIR__ . '/autoload_psr4.php'; | ||
| 38 |             foreach ($map as $namespace => $path) { | ||
| 39 | $loader->setPsr4($namespace, $path); | ||
| 40 | } | ||
| 41 | |||
| 42 | $classMap = require __DIR__ . '/autoload_classmap.php'; | ||
| 43 |             if ($classMap) { | ||
| 44 | $loader->addClassMap($classMap); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | |||
| 48 | $loader->register(true); | ||
| 49 | |||
| 50 | return $loader; | ||
| 51 | } | ||
| 52 | } | ||
| 53 | 
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.