From: Tim Otten Date: Thu, 21 Jul 2016 18:51:27 +0000 (-0700) Subject: (NFC) CRM_Core_CodeGen_Util_Template - Remove PEAR formatting filter X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9f352080c33e1f6c9a366d39ec53419e21776ad9;p=civicrm-core.git (NFC) CRM_Core_CodeGen_Util_Template - Remove PEAR formatting filter This filter has several issues: * Fundamentally, we don't use PEAR style guide - we're closer to Drupal style guide. * Its only practical effect is to move squiggly braces... to the wrong place. * It tangentially pulls in PEAR dependencies. * It adds a ~4 seconds to GenCode (as measured on my laptop). --- diff --git a/CRM/Core/CodeGen/Util/Template.php b/CRM/Core/CodeGen/Util/Template.php index 2590301c34..b6387e48d4 100644 --- a/CRM/Core/CodeGen/Util/Template.php +++ b/CRM/Core/CodeGen/Util/Template.php @@ -29,8 +29,6 @@ class CRM_Core_CodeGen_Util_Template { $this->beautifier = new PHP_Beautifier(); $this->beautifier->addFilter('ArrayNested'); // add one or more filters - $this->beautifier->addFilter('Pear'); - // add one or more filters $this->beautifier->addFilter('NewLines', array('after' => 'class, public, require, comment')); $this->beautifier->setIndentChar(' '); $this->beautifier->setIndentNumber(2);