| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 3 | class plPhpFunction |
||
| 4 | { |
||
| 5 | private static $symbols = [ |
||
| 6 | 'private' => '-', |
||
| 7 | 'protected' => '#', |
||
| 8 | 'public' => '+', |
||
| 9 | ]; |
||
| 10 | |||
| 11 | /** @var string */ |
||
| 12 | public $name; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | public $modifier; |
||
| 16 | |||
| 17 | /** @var plPhpVariable[] */ |
||
| 18 | public $params; |
||
| 19 | |||
| 20 | public function __construct(string $name, string $modifier = 'public', array $params = []) |
||
| 21 | { |
||
| 22 | $this->name = $name; |
||
| 23 | $this->modifier = $modifier; |
||
| 24 | $this->params = $params; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function isConstructor(): bool |
||
| 28 | { |
||
| 29 | return $this->name === '__construct'; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function __toString() |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |