Home GnuPG

Add a linter rule to detect variable arguments for `break` and `continue`
8ed1459ecdbaUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Add a linter rule to detect variable arguments for break and continue

Summary: In PHP 5.4, the break and continue statements no longer accept variable arguments (e.g., break 1 + foo() * $bar;). Static arguments still work, such as break 2;. As a side effect of this change break 0; and continue 0; are no longer allowed.

Test Plan: Added some test cases.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10567

Details

Provenance
Joshua Spence <josh@joshuaspence.com>Authored on Sep 26 2014, 12:36 AM
Parents
rARC247a4fabb8b6: Fix `LINT_ARRAY_SEPARATOR` for heredocs
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rARC8ed1459ecdba: Add a linter rule to detect variable arguments for `break` and `continue` (authored by Joshua Spence <josh@joshuaspence.com>).Sep 26 2014, 12:40 AM