Skip to content

Commit

Permalink
Update DocBlock to reflect changes to the find_previous_line_token me…
Browse files Browse the repository at this point in the history
…thod.
  • Loading branch information
anton-vlasenko authored and Anton Vlasenko committed Jul 19, 2024
1 parent f734bfd commit cff54f7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,11 @@ protected function check_below_minimum_visibility( $visibility ) {
}

/**
* Finds the docblock associated with a hook, starting from a specified position in the token stack.
* Since a line containing a hook can include any type of tokens, this method backtracks through the tokens
* to locate the first token on the current line. This token is then used as the starting point for searching the docblock.
* Finds the first token on the previous line relative to the stack pointer passed to the method.
*
* @param File $phpcs_file The file being scanned.
* @param int $stack_pointer The position to start looking for the docblock.
* @return int|false The last token on the previous line.
* @param int $stack_pointer The position to find the previous line token from.
* @return int|false The last token on the previous line, or false if not found.
*/
protected static function find_previous_line_token( File $phpcs_file, $stack_pointer ) {
$tokens = $phpcs_file->getTokens();
Expand Down

0 comments on commit cff54f7

Please sign in to comment.