Page MenuHomePhabricator

Improve lint handling of declare() special statement blocks
Closed, ResolvedPublic

Description

I'm not sure how we should handle this case:

>>> Lint for src/daemon/PhutilDaemonOverseer.php:

   Warning  (XHP24) Brace placement
    Use braces to surround a statement block.

             186         'explicitArgv' => $this->moreArgs,
             187       ));
             188 
    >>>      189     declare(ticks = 1);
             190     pcntl_signal(SIGUSR1, array($this, 'didReceiveKeepaliveSignal'));
             191     pcntl_signal(SIGUSR2, array($this, 'didReceiveNotifySignal'));

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Lint.
joshuaspence added a subscriber: joshuaspence.

We should probably special case declare(), as declare(...); means something completely different from declare(...){}

epriestley renamed this task from Perhaps braces should be optional in some cases? to Improve lint handling of declare() special statement blocks.Jan 6 2015, 12:34 AM