12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- if (defined('HHVM_VERSION_ID')) {
- if (HHVM_VERSION_ID < 31800) {
- fwrite(STDERR, "HHVM needs to be a minimum version of HHVM 3.18.0.\n");
- if (getenv('PHP_CS_FIXER_IGNORE_ENV')) {
- fwrite(STDERR, "Ignoring environment requirements because `PHP_CS_FIXER_IGNORE_ENV` is set. Execution may be unstable.\n");
- } else {
- exit(1);
- }
- }
- } elseif (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50600 || PHP_VERSION_ID >= 70200) {
- fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.1.*.\n");
- if (getenv('PHP_CS_FIXER_IGNORE_ENV')) {
- fwrite(STDERR, "Ignoring environment requirements because `PHP_CS_FIXER_IGNORE_ENV` is set. Execution may be unstable.\n");
- } else {
- exit(1);
- }
- }
- set_error_handler(function ($severity, $message, $file, $line) {
- if ($severity & error_reporting()) {
- throw new ErrorException($message, 0, $severity, $file, $line);
- }
- });
- if (file_exists($a = __DIR__.'/../../autoload.php')) {
- require_once $a;
- } else {
- require_once __DIR__.'/vendor/autoload.php';
- }
- use PhpCsFixer\Console\Application;
- $application = new Application();
- $application->run();
|