summaryrefslogtreecommitdiffstats
path: root/php-phpmd-PHP-PMD-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-22 16:34:09 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-22 16:34:09 +0100
commit710450d806a937fa68154c68fb53a2feffa5fbe9 (patch)
treed7d93875b9f261ae6f7d4253a483b57c61e2605b /php-phpmd-PHP-PMD-autoload.php
parent6a34e15da3b4977860f47de1926c57b92a600b02 (diff)
php-phpmd-PHP-PMD: 2.4.4
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';