Skip to content

Sniff for detecting single-use variables? #212

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' ) ) {
  ...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions