[TYPO3-core] Usage of "break"

Stefan Neufeind typo3.neufeind at speedpartner.de
Wed Jun 18 12:08:10 CEST 2014

On 06/18/2014 11:45 AM, Bernhard Kraft wrote:
> Hi,
> Is it allowe to have statements like
>     break 2;
> in the core? [1]

I don't think it's "forbidden" but would appreciate easier to read
solutions if possible.

Much jumping makes it harder to read the flow.
There was also the case of early returns discussed quite often. While in
general it was said that early returns should not be used, afaik some
(most?) people agreed that for guard-clauses at the start of a method
blocks of early returns would be acceptable.

You can't do a switch-case without break - but maybe without break 2 :-)

Kind regards,

More information about the TYPO3-team-core mailing list