Debian Codegraph @

lib/3rdParty/composer/illuminate/support/HigherOrderTapProxy.php

raw symbols SCIP
1 <?php
2
3 namespace Illuminate\Support;
4
5 class HigherOrderTapProxy
6 {
7 /**
8 * The target being tapped.
9 *
10 * @var mixed
11 */
12 public $target;
13
14 /**
15 * Create a new tap proxy instance.
16 *
17 * @param mixed $target
18 */
19 public function __construct($target)
20 {
21 $this->target = $target;
22 }
23
24 /**
25 * Dynamically pass method calls to the target.
26 *
27 * @param string $method
28 * @param array $parameters
29 * @return mixed
30 */
31 public function __call($method, $parameters)
32 {
33 $this->target->{$method}(...$parameters);
34
35 return $this->target;
36 }
37 }