@@ 86-94 (lines=9) @@ | ||
83 | } |
|
84 | ||
85 | ||
86 | private function isInsideMethod(PHP_CodeSniffer_File $file, int $position) : bool |
|
87 | { |
|
88 | $previousMethod = $file->findPrevious(T_FUNCTION, $position); |
|
89 | $tokens = $file->getTokens(); |
|
90 | if ($tokens[$previousMethod]['code'] === T_FUNCTION) { |
|
91 | return TRUE; |
|
92 | } |
|
93 | return FALSE; |
|
94 | } |
|
95 | ||
96 | ||
97 | private function areMethodsPresent(PHP_CodeSniffer_File $file, int $position) : bool |
|
@@ 97-105 (lines=9) @@ | ||
94 | } |
|
95 | ||
96 | ||
97 | private function areMethodsPresent(PHP_CodeSniffer_File $file, int $position) : bool |
|
98 | { |
|
99 | $next = $file->findNext(T_FUNCTION, $position + 1); |
|
100 | $tokens = $file->getTokens(); |
|
101 | if ($tokens[$next]['code'] === T_FUNCTION) { |
|
102 | return TRUE; |
|
103 | } |
|
104 | return FALSE; |
|
105 | } |
|
106 | ||
107 | ||
108 | private function getEndOfProperty(PHP_CodeSniffer_File $file, int $position) : int |