mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
23 lines
506 B
PHP
23 lines
506 B
PHP
<?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;
|
|
}
|
|
}
|
|
}
|