Skip to content

Sniff for detecting single-use variables? #212

Open
@lkraav

Description

@lkraav

Trying to avoid this example BAD (due to refactoring, or simple human error):

$has_free_tag = has_tag( 'free' );

if ( $has_free_tag ) {
  ...
}

BETTER:

if ( has_tag( 'free' ) ) {
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions