phabel/src/Target/Php80/IssetExpressionFixer.php

60 lines
1.0 KiB
PHP
Raw Normal View History

2020-09-01 14:31:23 +02:00
<?php
namespace Phabel\Target\Php80;
use Phabel\Plugin;
use Phabel\Plugin\IssetExpressionFixer as fixer;
class IssetExpressionFixer extends Plugin
{
/**
* Expression fixer for PHP 80.
*
* @return array
*/
public static function runAfter(): array
{
return [
fixer::class => [
2020-10-05 11:35:11 +02:00
'PhpParser\\Node\\Expr\\ArrayDimFetch' =>
2020-09-01 14:31:23 +02:00
[
2020-10-05 11:35:11 +02:00
'var' =>
[
'PhpParser\\Node\\Expr\\Throw_' => true,
],
'dim' =>
2020-09-01 14:31:23 +02:00
[
2020-10-05 11:35:11 +02:00
'PhpParser\\Node\\Expr\\Throw_' => true,
2020-09-01 14:31:23 +02:00
],
],
'PhpParser\\Node\\Expr\\PropertyFetch' =>
[
'var' =>
[
'PhpParser\\Node\\Expr\\ConstFetch' => true,
2020-10-05 11:35:11 +02:00
'PhpParser\\Node\\Expr\\Throw_' => true,
],
'name' =>
[
'PhpParser\\Node\\Expr\\Throw_' => true,
],
],
'PhpParser\\Node\\Expr\\StaticPropertyFetch' =>
[
'name' =>
[
'PhpParser\\Node\\Expr\\Throw_' => true,
],
],
'PhpParser\\Node\\Expr\\Variable' =>
[
'name' =>
[
'PhpParser\\Node\\Expr\\Throw_' => true,
2020-09-01 14:31:23 +02:00
],
],
]
];
}
}