Source for file phpBB.filter.php
Documentation is available at phpBB.filter.php
* Filter the code to make it compatible with phpBB Coding Standards
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
* @package PHP_Beautifier
* @author Jim Wigginton <terrafrost@php.net>
* @copyright 2008 Jim Wigginton
* @link http://pear.php.net/package/PHP_Beautifier
* @license http://www.gnu.org/licenses/lgpl.html LGPL
require_once ('PEAR/Config.php');
* Filter the code to make it compatible with phpBB Coding Standards
* Among other differences from the PEAR Coding Standards, the phpBB coding standards use BSD style indenting.
* @package PHP_Beautifier
* @author Jim Wigginton <terrafrost@php.net>
* @copyright 2008 Jim Wigginton
* @link http://pear.php.net/package/PHP_Beautifier
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: 0.0.1
protected $sDescription = 'Filter the code to make it compatible with phpBB Coding Standards';
public function __construct(PHP_Beautifier $oBeaut, $aSettings = array ())
$oBeaut->setIndentChar ("\t");
$oBeaut->setIndentNumber (1 );
$oBeaut->setNewLine (PHP_EOL );
$this->oBeaut->addNewLineIndent ();
$this->oBeaut->addNewLineIndent ();
if ($this->oBeaut->getMode ('string_index') or $this->oBeaut->getMode ('double_quote')) {
$this->oBeaut->removeWhitespace ();
$this->oBeaut->addNewLineIndent ();
$this->oBeaut->addNewLineIndent ();
if (!$this->oBeaut->isNextTokenContent ('{')) {
$this->oBeaut->addNewLineIndent ();
$this->oBeaut->addNewLineIndent ();
$this->oBeaut->removeWhitespace ();
if ($this->oBeaut->getControlParenthesis () != T_FOR ) {
if ($this->iNestedIfs > 0 ) {
$this->oBeaut->addNewLineIndent ();
$this->oBeaut->addNewLineIndent ();
Documentation generated on Sun, 22 Jun 2008 05:00:28 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|