Total Complexity | 9 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
18 | class UserFunctionDefinitionContext extends FunctionDefinitionContext |
||
19 | { |
||
20 | public function __construct( |
||
23 | } |
||
24 | |||
25 | public function getFunctionName(): string |
||
26 | { |
||
27 | return $this->memory_location->function_name; |
||
28 | } |
||
29 | |||
30 | public function getOpArrayAddress(): int |
||
31 | { |
||
32 | return $this->memory_location->address; |
||
33 | } |
||
34 | |||
35 | public function isClosureOf(UserFunctionDefinitionContext $context): bool |
||
40 | ); |
||
41 | } |
||
42 | |||
43 | public function isThisContext( |
||
44 | string $file, |
||
45 | int $line, |
||
46 | ): bool { |
||
47 | if ($this->memory_location->file !== $file) { |
||
48 | return false; |
||
49 | } |
||
50 | if ($this->memory_location->line_start > $line) { |
||
51 | return false; |
||
52 | } |
||
53 | if ($this->memory_location->line_end < $line) { |
||
54 | return false; |
||
55 | } |
||
56 | return true; |
||
57 | } |
||
58 | |||
59 | public function getContexts(): iterable |
||
62 | } |
||
63 | } |
||
64 |