From c5d758335cb495b29ecd020e483bcf9cdb150e74 Mon Sep 17 00:00:00 2001 From: LioTree Date: Tue, 3 May 2022 00:10:57 +0800 Subject: [PATCH] change TraitUse to TraitUseAdaptation --- lib/PHPCfg/Op/{TraitUse => TraitUseAdaptation}/Alias.php | 2 +- lib/PHPCfg/Op/{TraitUse => TraitUseAdaptation}/Precedence.php | 2 +- lib/PHPCfg/Parser.php | 4 ++-- lib/PHPCfg/Printer.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename lib/PHPCfg/Op/{TraitUse => TraitUseAdaptation}/Alias.php (96%) rename lib/PHPCfg/Op/{TraitUse => TraitUseAdaptation}/Precedence.php (93%) diff --git a/lib/PHPCfg/Op/TraitUse/Alias.php b/lib/PHPCfg/Op/TraitUseAdaptation/Alias.php similarity index 96% rename from lib/PHPCfg/Op/TraitUse/Alias.php rename to lib/PHPCfg/Op/TraitUseAdaptation/Alias.php index 2c96e45..2bd617d 100644 --- a/lib/PHPCfg/Op/TraitUse/Alias.php +++ b/lib/PHPCfg/Op/TraitUseAdaptation/Alias.php @@ -9,7 +9,7 @@ * @license MIT See LICENSE at the root of the project for more info */ -namespace PHPCfg\Op\TraitUse; +namespace PHPCfg\Op\TraitUseAdaptation; use PhpParser\Node; use PHPCfg\Operand; diff --git a/lib/PHPCfg/Op/TraitUse/Precedence.php b/lib/PHPCfg/Op/TraitUseAdaptation/Precedence.php similarity index 93% rename from lib/PHPCfg/Op/TraitUse/Precedence.php rename to lib/PHPCfg/Op/TraitUseAdaptation/Precedence.php index ea1eca2..a0acb8c 100644 --- a/lib/PHPCfg/Op/TraitUse/Precedence.php +++ b/lib/PHPCfg/Op/TraitUseAdaptation/Precedence.php @@ -9,7 +9,7 @@ * @license MIT See LICENSE at the root of the project for more info */ -namespace PHPCfg\Op\TraitUse; +namespace PHPCfg\Op\TraitUseAdaptation; use PHPCfg\Operand; use PHPCfg\Op\TraitUseAdaptation; diff --git a/lib/PHPCfg/Parser.php b/lib/PHPCfg/Parser.php index 7642261..5c5c02d 100755 --- a/lib/PHPCfg/Parser.php +++ b/lib/PHPCfg/Parser.php @@ -15,8 +15,8 @@ use PHPCfg\Op\Stmt\JumpIf; use PHPCfg\Op\Stmt\TraitUse; use PHPCfg\Op\Terminal\Return_; -use PHPCfg\Op\TraitUse\Alias; -use PHPCfg\Op\TraitUse\Precedence; +use PHPCfg\Op\TraitUseAdaptation\Alias; +use PHPCfg\Op\TraitUseAdaptation\Precedence; use PHPCfg\Operand\Literal; use PHPCfg\Operand\Temporary; use PHPCfg\Operand\Variable; diff --git a/lib/PHPCfg/Printer.php b/lib/PHPCfg/Printer.php index a587e09..f09a2fe 100755 --- a/lib/PHPCfg/Printer.php +++ b/lib/PHPCfg/Printer.php @@ -128,7 +128,7 @@ protected function renderOp(Op $op) $result .= "\n use[$index]: " . $this->indent($this->renderOperand($trait_)); } foreach($op->adaptations as $index => $adaptation) { - if($adaptation instanceof Op\TraitUse\Alias) { + if($adaptation instanceof Op\TraitUseAdaptation\Alias) { $result .= "\n adaptation[$index]: Alias"; if($adaptation->trait != null) { $result .= "\n trait:".$this->indent($this->renderOperand($adaptation->trait)); @@ -150,7 +150,7 @@ protected function renderOp(Op $op) } } } - else if($adaptation instanceof Op\TraitUse\Precedence) { + else if($adaptation instanceof Op\TraitUseAdaptation\Precedence) { $result .= "\n adaptation[$index]: Insteadof"; if($adaptation->trait != null) { $result .= "\n trait:".$this->indent($this->renderOperand($adaptation->trait));