Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heredoc nowdoc bad indenting #113

Closed
exu opened this issue Jul 10, 2013 · 1 comment
Closed

Heredoc nowdoc bad indenting #113

exu opened this issue Jul 10, 2013 · 1 comment
Milestone

Comments

@exu
Copy link
Contributor

exu commented Jul 10, 2013

I've indented some old symfony1 classes and have found this error

Test Example:

class sendVoucherTask extends crmBaseTask
{
  protected function configure()
  {
    $this->detailedDescription = <<<EOF
The [sendVoucher|INFO] task does things.
Call it with:

  [php symfony sendVoucher|INFO]
EOF;
  }
}

After indent:

class sendVoucherTask extends crmBaseTask
{
    protected function configure()
    {
        $this->detailedDescription = <<<EOF
The [sendVoucher|INFO] task does things.
Call it with:

  [php symfony sendVoucher|INFO]
[*]EOF;
    }
}

[*] - 8 spaces generates php syntax error

@ejmr
Copy link
Collaborator

ejmr commented Jul 12, 2013

Thank you for the bug report. I am able to duplicate the problem. I believe a good solution is to make sure PHP Mode always places the identifier for heredocs and nowdocs in the first column regardless of the user's preferred c-default-style for PHP Mode. That is what I am going to work on to fix this unless anyone has a better idea or recognizes a problem in my approach that I'm not seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants