summaryrefslogtreecommitdiffstats
path: root/php-phpmd-PHP-PMD-autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'php-phpmd-PHP-PMD-autoload.php')
-rw-r--r--php-phpmd-PHP-PMD-autoload.php20
1 files changed, 5 insertions, 15 deletions
diff --git a/php-phpmd-PHP-PMD-autoload.php b/php-phpmd-PHP-PMD-autoload.php
index 0889498..502c4e2 100644
--- a/php-phpmd-PHP-PMD-autoload.php
+++ b/php-phpmd-PHP-PMD-autoload.php
@@ -1,19 +1,9 @@
<?php
/* Autoloader for pdepend/pdepend and its dependencies */
-$vendorDir = '/usr/share/php';
-// Use Symfony autoloader
-if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
- if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
- require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php';
- }
+require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('PHPMD\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required(array(
+ '/usr/share/php/PDepend/autoload.php',
+));
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
-
-/* PHPMD */
-$fedoraClassLoader->addPrefix('PHPMD\\', dirname(__DIR__));
-
-/* PDepend */
-require_once $vendorDir . '/PDepend/autoload.php';