mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 21:45:55 +00:00
wip
This commit is contained in:
22
app/Client/Support/ClearDomainNodeVisitor.php
Normal file
22
app/Client/Support/ClearDomainNodeVisitor.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Client\Support;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
|
||||
class ClearDomainNodeVisitor extends NodeVisitorAbstract
|
||||
{
|
||||
public function enterNode(Node $node)
|
||||
{
|
||||
if ($node instanceof Node\Expr\ArrayItem && $node->key && $node->key->value === 'default_domain') {
|
||||
$node->value = new ConstFetch(
|
||||
new Name('null')
|
||||
);
|
||||
|
||||
return $node;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user