nanch / phpfmt_stable

This is a stable snapshot (version 6125cf9) of the phpfmt plugin for Sublime Text
143 stars 34 forks source link

method-modifiers get stripped if class has constant-values containing the class-keyword (name resolution) #18

Open droptable opened 7 years ago

droptable commented 7 years ago

If a class has constant-values containing the class-keyword (used for name resolution) all method-modifiers get stripped from all methods except the first method.

Example:

class Foo
{
  const BAR_CLASS = Bar::class;

  public function method1()
  {
    // ...
  }

  public function method2()
  {
    // ...
  }

  protected function method3()
  {
    // ...
  }
}

Result:

class Foo
{
  const BAR_CLASS = Bar::class;

  public function method1()
  {
    // ...
  }

  function method2()
  {
    // ...
  }

  function method3()
  {
    // ...
  }
}
MKCG commented 6 years ago

I solved this issue there : https://github.com/MKCG/phpfmt_7-1