phar-stub.php 776 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env php
  2. <?php
  3. /*
  4. * This file is part of the PHP CS utility.
  5. *
  6. * (c) Fabien Potencier <fabien@symfony.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. if (defined('HHVM_VERSION_ID')) {
  12. if (HHVM_VERSION_ID < 30500) {
  13. fwrite(STDERR, "HHVM needs to be a minimum version of HHVM 3.5.0\n");
  14. exit(1);
  15. }
  16. } elseif (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50306) {
  17. fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.3.6\n");
  18. exit(1);
  19. }
  20. Phar::mapPhar('php-cs-fixer.phar');
  21. require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
  22. use Symfony\CS\Console\Application;
  23. $application = new Application();
  24. $application->run();
  25. __HALT_COMPILER();