summaryrefslogtreecommitdiffstats
path: root/php-cs-fixer-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-30 18:05:33 +0100
committerRemi Collet <fedora@famillecollet.com>2016-10-30 18:05:33 +0100
commitb7e6500f7674768eb53b0cacaad983be98bd7059 (patch)
treef9c1e29936eae10112a51aca8bc24b39291b8e11 /php-cs-fixer-autoload.php
parent74f685450227d86111d6dfa4b75c5c589bcfc277 (diff)
php-cs-fixer: 1.12.3
Diffstat (limited to 'php-cs-fixer-autoload.php')
-rw-r--r--php-cs-fixer-autoload.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/php-cs-fixer-autoload.php b/php-cs-fixer-autoload.php
index dcaa350..5523869 100644
--- a/php-cs-fixer-autoload.php
+++ b/php-cs-fixer-autoload.php
@@ -1,20 +1,12 @@
<?php
/* Autoloader for friendsofphp/php-cs-fixer 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';
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
+\Fedora\Autoloader\Autoload::addPsr4('Symfony\\CS\\', __DIR__);
-$fedoraClassLoader->addPrefix('Symfony\\CS\\', dirname(dirname(__DIR__)));
-
-// Dependencies
-require_once $vendorDir . '/Symfony/Component/autoload.php';
-require_once $vendorDir . '/SebastianBergmann/Diff/autoload.php';
+\Fedora\Autoloader\Dependencies::required(array(
+ '/usr/share/php/Symfony/Component/autoload.php',
+ '/usr/share/php/SebastianBergmann/Diff/autoload.php',
+));