Questions tagged [php-beautifier]

PHP Beautifier parses your source code and formats it in the style of your choice.

Proper formatting makes code easier to read and understand. PHP Beautifier parses your source code and formats it in the style of your choice.

7 questions
4
votes
1 answer

Suppressing next token in PHP_Beautify

I'm using the PEAR PHP_Beautifier to try and format a large volume of legacy code, and to achieve a specific formatting of array elements. I've written a custom filter: class PHP_Beautifier_Filter_ArrayIndent extends PHP_Beautifier_Filter { …
Mark Baker
  • 209,507
  • 32
  • 346
  • 385
3
votes
2 answers

How do I fix PHP_Beautifier's empty lines?

I am currently using PHP_Beautifier for formatting code with the following command like options -t -l "ArrayNested() IndentStyles(style=bsd) NewLines(before=T_CLASS:function:T_COMMENT,after=T_COMMENT)" It works great except for the fact that it…
Sukumar
  • 3,502
  • 3
  • 26
  • 29
2
votes
1 answer

Modify PHP_Beautifier in Vim to not strip empty lines

Just finished incorporating PHP_Beautifier into Vim and the fact that it removes whitespace irks me. Apparently it's a bug since 2007. There is a hack to fix this problem, but it leads to other problems. Instead I decided to use a round about…
puk
  • 16,318
  • 29
  • 119
  • 199
2
votes
1 answer

How do I use php_beautifier with PEAR Code Standards?

How do I use php_beautifier with PEAR Code Standards?
thom
  • 23
  • 4
2
votes
2 answers

How to integrate PHP_Beautifier into NuSphere PHPed IDE?

Can anyone list the steps to integrate PHP_Beautifier in phped.
Ibn Saeed
  • 3,171
  • 11
  • 50
  • 59
0
votes
2 answers

Beautify code with php code beautifier not working

I am trying to beautify my code through code beautifier. So I typed - sudo phpcbf -n --standard=PEAR filename.php Its showing me phpcbf command not found. Then I tried to install phpcbf using the command- sudo pear install --alldeps…
Arjita Mitra
  • 962
  • 2
  • 13
  • 36
0
votes
3 answers

PHP_Beautifier - Fatal Error - require PEAR.php

I have installed pear and php_beautifier with sudo... From what I've read I should be able to format code with the command php_beautifier x.php But when I try to do this I get this error: Warning: require_once(PEAR.php): failed to open stream: No…
Philip
  • 6,827
  • 13
  • 75
  • 104