Skip to content

Commit e14c94e

Browse files
committed
removed obsolete code
1 parent 5084328 commit e14c94e

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

Sniffs/Formatting/ArrayAlignmentSniff.php

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -134,42 +134,4 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
134134
}
135135

136136
}
137-
138-
/**
139-
* get start end end pointer of the array we're in
140-
*
141-
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned
142-
* @param int $stackPtr stack pointer
143-
*
144-
* @return array(int, int)
145-
*/
146-
private function _getArrayStartAndEnd(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
147-
{
148-
$tokens = $phpcsFile->getTokens();
149-
$current = $tokens[$stackPtr];
150-
151-
$start = -1;
152-
$end = -1;
153-
154-
if (isset($current['nested_parenthesis'])) {
155-
foreach ($current['nested_parenthesis'] as $start => $end) {
156-
$owner = $tokens[$start]['parenthesis_owner'];
157-
if ($tokens[$owner]['type'] !== 'T_ARRAY') {
158-
$start = -1;
159-
$end = -1;
160-
}
161-
}
162-
} else {
163-
$start = $stackPtr;
164-
do {
165-
// search for bracket_opener
166-
$start = $phpcsFile->findPrevious(T_OPEN_SHORT_ARRAY, $start - 1);
167-
if ($start) {
168-
$end = $tokens[$start]['bracket_closer'];
169-
}
170-
} while ($start && ($stackPtr < $start) || ($stackPtr > $end));
171-
}
172-
173-
return array($start, $end);
174-
}
175137
}

0 commit comments

Comments
 (0)