I have installed the PHP beautifier.
It is located in /usr/lib/php/PHP/
This contains a directory "Beautifier" and the file "Beautifier.php"
I took your script:
#!/usr/local/zend/bin/php-cli
<?php
require 'PHP/Beautifier.php';
error_reporting(-1);
$source = file_get_contents($argv[1]); // might be changed to php://stdin w/
v10
$oToken = new PHP_Beautifier();
$oToken->addFilter('Pear');
$oToken->addFilter('DocBlock');
$oToken->addFilter('ArrayNested');
$oToken->addFilter('EqualsAlign');
$oToken->setInputString($source);
$oToken->process();
$oToken->show();
and modified it to this:
#!/usr/lib/php/
<?php
require 'PHP/beautifier.php';
error_reporting(-1);
$source = file_get_contents($argv[1]); // might be changed to php://stdin w/
v10
$oToken = new PHP_Beautifier();
$oToken->addFilter('Pear');
$oToken->addFilter('DocBlock');
$oToken->addFilter('ArrayNested');
$oToken->addFilter('EqualsAlign');
$oToken->setInputString($source);
$oToken->process();
$oToken->show();
I'm obviously doing something wrong because when I run the text filter on a
php file I get the following error.
*Couldn’t spawn sub-process. Exec failed. (application error code: 13501)*
*
*
Any ideas? Thanks.
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>