phabel/src/Target/Php71.php

43 lines
1.1 KiB
PHP
Raw Normal View History

2020-08-13 18:30:12 +02:00
<?php
namespace Phabel\Target;
use Phabel\Plugin;
use Phabel\Target\Php71\ArrayList;
use Phabel\Target\Php71\ClassConstantVisibilityModifiersRemover;
2020-09-01 14:31:23 +02:00
use Phabel\Target\Php71\IssetExpressionFixer;
2020-10-04 19:58:02 +02:00
use Phabel\Target\Php71\IterableHint;
2020-08-13 18:30:12 +02:00
use Phabel\Target\Php71\ListKey;
use Phabel\Target\Php71\MultipleCatchReplacer;
2020-09-01 14:31:23 +02:00
use Phabel\Target\Php71\NestedExpressionFixer;
use Phabel\Target\Php71\NullableType;
use Phabel\Target\Php71\VoidReturnType;
2020-08-13 18:30:12 +02:00
/**
2020-08-13 21:34:59 +02:00
* Makes changes necessary to polyfill PHP 7.1 and run on PHP 7.0 and below.
*
2020-08-13 18:30:12 +02:00
* @author Daniil Gentili <daniil@daniil.it>
2020-08-13 21:34:59 +02:00
* @license MIT
2020-08-13 18:30:12 +02:00
*/
class Php71 extends Plugin
{
2020-08-13 21:34:59 +02:00
public static function composerRequires(): array
{
2020-09-01 14:31:23 +02:00
return ['symfony/polyfill-php71' => '*'];
2020-08-13 21:34:59 +02:00
}
2020-08-13 18:30:12 +02:00
public static function runWithAfter(): array
{
return [
2020-09-01 14:31:23 +02:00
IssetExpressionFixer::class,
NestedExpressionFixer::class,
2020-08-13 18:30:12 +02:00
ArrayList::class,
ClassConstantVisibilityModifiersRemover::class,
ListKey::class,
2020-10-04 19:58:02 +02:00
IterableHint::class,
2020-08-13 18:30:12 +02:00
MultipleCatchReplacer::class,
2020-09-01 14:31:23 +02:00
VoidReturnType::class,
NullableType::class
2020-08-13 18:30:12 +02:00
];
}
}