0

I am trying to use phpcheckstyle. I can't figure out how to configure it for functional brackets on a new line (using 4 spaces for indentation):

1. class MyClass
2. {
3.     public function __construct()
4.     {
5.         // do something
6.     }
7. }

It always gives the error "The indentation level must be 8 but was 4." for line 4 and 6. It only allows one of the following:

1. class MyClass
2. {
3.     public function __construct() {
4.         // do something
5.     }
6. }

or

1. class MyClass
2. {
3.     public function __construct()
4.         {
5.         // do something
6.         }
7. }

If there a way to get around this or another PHP style checker than can understand this?

Elliot Chance
  • 5,526
  • 10
  • 49
  • 80

1 Answers1

1

Sorry for that, it was a bug.

It should be corrected with the latest version.

I personally only use tabs for indentation and I haven't tested enough. Please feel free to report any problem on the project page.

gnat
  • 6,213
  • 108
  • 53
  • 73
Tchule
  • 26
  • 1