mirror of
https://github.com/bitinflow/expose.git
synced 2026-11-01 13:19:09 +00:00
wip
This commit is contained in:
1 parent
7742658527
commit
19606a78af
16 files changed
+470
-10
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Client\Support;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
|
||||
class InsertDefaultDomainNodeVisitor extends NodeVisitorAbstract
|
||||
{
|
||||
public function leaveNode(Node $node)
|
||||
{
|
||||
if ($node instanceof Node\Expr\ArrayItem && $node->key && $node->key->value === 'auth_token') {
|
||||
$defaultDomainNode = new Node\Expr\ArrayItem(
|
||||
new ConstFetch(
|
||||
new Name('null')
|
||||
),
|
||||
new Node\Scalar\String_('default_domain')
|
||||
);
|
||||
|
||||
return [
|
||||
$node,
|
||||
$defaultDomainNode,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user