WPThemeReview/Sniffs/Plugins/CorrectTGMPAVersionSniff.php
protected function get_docblock_tags( $comment_opener ) {
		$tags   = array();
		$opener = $this->tokens[ $comment_opener ];

		if ( ! isset( $opener['comment_tags'] ) ) {
			return $tags;
		}

		$closer = null;
		if ( isset( $opener['comment_closer'] ) ) {
			$closer = $opener['comment_closer'];
		}

		$tag_count = count( $opener['comment_tags'] );

		for ( $i = 0; $i < $tag_count; $i++ ) {
			$tag_token = $opener['comment_tags'][ $i ];
			$tag       = trim( $this->tokens[ $tag_token ]['content'], '@' );

			$search_end = $closer;
			if ( ( $i + 1 ) < $tag_count ) {
				$search_end = $opener['comment_tags'][ ( $i + 1 ) ];
			}

			$value_token  = $this->phpcsFile->findNext( T_DOC_COMMENT_STRING, ( $tag_token + 1 ), $search_end );
			$tags[ $tag ] = trim( $this->tokens[ $value_token ]['content'] );
			unset( $tag_token, $tag, $search_end, $value );
		}

		return $tags;
	}
protected function get_docblock_tags( $comment_opener ) {
		$tags   = array();
		$opener = $this->tokens[ $comment_opener ];

		if ( ! isset( $opener['comment_tags'] ) ) {
			return $tags;
		}

		$closer = null;
		if ( isset( $opener['comment_closer'] ) ) {
			$closer = $opener['comment_closer'];
		}

		$tag_count = count( $opener['comment_tags'] );

		for ( $i = 0; $i < $tag_count; $i++ ) {
			$tag_token = $opener['comment_tags'][ $i ];
			$tag       = trim( $this->tokens[ $tag_token ]['content'], '@' );

			$search_end = $closer;
			if ( ( $i + 1 ) < $tag_count ) {
				$search_end = $opener['comment_tags'][ ( $i + 1 ) ];
			}

			$value_token  = $this->phpcsFile->findNext( T_DOC_COMMENT_STRING, ( $tag_token + 1 ), $search_end );
			$tags[ $tag ] = trim( $this->tokens[ $value_token ]['content'] );
			unset( $tag_token, $tag, $search_end, $value );
		}

		return $tags;
	}
protected function get_docblock_tags ( $ comment_opener ) { $ tags = array ( ) ; $ opener = $ this -> tokens [ $ comment_opener ] ; if ( ! isset ( $ opener [ 'comment_tags' ] ) ) { return $ tags ; } $ closer = null ; if ( isset ( $ opener [ 'comment_closer' ] ) ) { $ closer = $ opener [ 'comment_closer' ] ; } $ tag_count = count ( $ opener [ 'comment_tags' ] ) ; for ( $ i = 0 ; $ i < $ tag_count ; $ i ++ ) { $ tag_token = $ opener [ 'comment_tags' ] [ $ i ] ; $ tag = trim ( $ this -> tokens [ $ tag_token ] [ 'content' ] , '@' ) ; $ search_end = $ closer ; if ( ( $ i + 1 ) < $ tag_count ) { $ search_end = $ opener [ 'comment_tags' ] [ ( $ i + 1 ) ] ; } $ value_token = $ this -> phpcsFile -> findNext ( T_DOC_COMMENT_STRING , ( $ tag_token + 1 ) , $ search_end ) ; $ tags [ $ tag ] = trim ( $ this -> tokens [ $ value_token ] [ 'content' ] ) ; unset ( $ tag_token , $ tag , $ search_end , $ value ) ; } return $ tags ; }
Retrieve an array with the doc block tags from a T_DOC_COMMENT_OPEN_TAG.

@param int $comment_opener The position of the comment opener.

@return array
Retrieve an array with the doc block tags from a T_DOC_COMMENT_OPEN_TAG .