File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,14 @@ function (ReflectionParameter $param) {
6464
6565 if ($ isHook ) {
6666 $ hookName = $ method ->getName ();
67+ if ($ getHook ) {
68+ $ value = '[] ' ;
69+ } else {
70+ $ value = '[$value] ' ;
71+ }
6772 return <<<EOT
6873 {$ name } {
69- {$ getHook }\$this->context->waitOne( \$this->context->callEntity( \$this->id, " {$ hookName }", func_get_args() ));
74+ {$ getHook }\$this->context->waitOne( \$this->context->callEntity( \$this->id, " {$ hookName }", { $ value } ));
7075 }
7176 EOT ;
7277 }
Original file line number Diff line number Diff line change @@ -65,10 +65,15 @@ function (ReflectionParameter $param) {
6565
6666 if ($ isHook ) {
6767 $ hookName = $ method ->getName ();
68+ if (str_ends_with ($ hookName , 'get ' )) {
69+ $ value = '[$value] ' ;
70+ } else {
71+ $ value = '[] ' ;
72+ }
6873 return <<<EOT
6974 {$ name } {
7075 \$this->operation = " {$ hookName }";
71- \$this->arguments = func_get_args() ;
76+ \$this->arguments = { $ value } ;
7277 throw new \Exception('Not implemented');
7378 }
7479 EOT ;
@@ -96,7 +101,7 @@ protected function impureSignal(ReflectionMethod $method): string
96101 protected function preamble (ReflectionClass $ class ): string
97102 {
98103 return <<<'EOT'
99- public function __construct(private string|null &$operation = null, private array|null &$arguments = null) {}
100- EOT;
104+ public function __construct(private string|null &$operation = null, private array|null &$arguments = null) {}
105+ EOT;
101106 }
102107}
You can’t perform that action at this time.
0 commit comments