Open Siguza opened 9 years ago
Curly brackets ({ and }) tend to mess up indentation when pasted or typed in a zephir file.
{
}
For these examples, all code can be pasted inside an empty class to provide one level of indentation.
class Test { // here }
In the following snippets, the curly brackets and the code in between gets a wrong indentation level:
Pasted code:
function abc() { }
Result:
class Test { function abc() { } }
if a == b { }
class Test { if a == b { } }
loop { }
class Test { loop { } }
However, if brackets are used in an if construct, the indentation level is as expected:
if(a == b) { }
class Test { if(a == b) { } }
Curly brackets (
{
and}
) tend to mess up indentation when pasted or typed in a zephir file.For these examples, all code can be pasted inside an empty class to provide one level of indentation.
In the following snippets, the curly brackets and the code in between gets a wrong indentation level:
Pasted code:
Result:
Pasted code:
Result:
Pasted code:
Result:
However, if brackets are used in an if construct, the indentation level is as expected:
Pasted code:
Result: