mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
move PhpParser/Evaluation classes in a specific namespave + composer dumpautoload
This commit is contained in:
21
sources/PhpParser/Evaluation/ConstFetchEvaluator.php
Normal file
21
sources/PhpParser/Evaluation/ConstFetchEvaluator.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Combodo\iTop\PhpParser\Evaluation;;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
|
||||
class ConstFetchEvaluator implements iExprEvaluator {
|
||||
public function GetHandledExpressionType(): string {
|
||||
return ConstFetch::class;
|
||||
}
|
||||
|
||||
public function Evaluate(Expr $oExpr): mixed {
|
||||
/** @var ConstFetch $oExpr */
|
||||
if (defined($oExpr->name)){
|
||||
return constant($oExpr->name);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user