Skip to content

Commit 10d353a

Browse files
committed
Remove dead code
1 parent 8868345 commit 10d353a

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

Inpsyde/Sniffs/CodeQuality/ArgumentTypeDeclarationSniff.php

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -70,54 +70,4 @@ public function process(File $file, $position)
7070
}
7171
}
7272
}
73-
74-
/**
75-
* @param File $file
76-
* @param int $position
77-
* @param array $tokens
78-
* @return bool
79-
*/
80-
private function isAddHook(File $file, int $position, array $tokens): bool
81-
{
82-
$lookForComma = $file->findPrevious(
83-
[T_WHITESPACE],
84-
$position - 1,
85-
null,
86-
true,
87-
null,
88-
true
89-
);
90-
91-
if (!$lookForComma || ($tokens[$lookForComma]['code'] ?? '') !== T_COMMA) {
92-
return false;
93-
}
94-
95-
$functionCallOpen = $file->findPrevious(
96-
[T_OPEN_PARENTHESIS],
97-
$lookForComma - 2,
98-
null,
99-
false,
100-
null,
101-
true
102-
);
103-
104-
if (!$functionCallOpen) {
105-
return false;
106-
}
107-
108-
$functionCall = $file->findPrevious(
109-
[T_WHITESPACE],
110-
$functionCallOpen - 1,
111-
null,
112-
true,
113-
null,
114-
true
115-
);
116-
117-
return in_array(
118-
($tokens[$functionCall]['content'] ?? ''),
119-
['add_action', 'add_filter'],
120-
true
121-
);
122-
}
12373
}

0 commit comments

Comments
 (0)