X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FClassLoader.php;h=a87e8ea783b934ef94c75096095a2958a0640fa5;hb=73c608b02ab4404def2eea0310616920c3960436;hp=86870b1db9e1a15d21999aeebd8b7c9f89e3bcd3;hpb=dc617c20a5a57ddc6f77b6c5404f5af65dfe58dd;p=civicrm-core.git diff --git a/CRM/Core/ClassLoader.php b/CRM/Core/ClassLoader.php index 86870b1db9..a87e8ea783 100644 --- a/CRM/Core/ClassLoader.php +++ b/CRM/Core/ClassLoader.php @@ -71,7 +71,7 @@ class CRM_Core_ClassLoader { */ protected function __construct() { $this->_registered = FALSE; - $this->civiTestClasses = array( + $this->civiTestClasses = [ 'CiviCaseTestCase', 'CiviDBAssert', 'CiviMailUtils', @@ -87,7 +87,7 @@ class CRM_Core_ClassLoader { 'Membership', 'Participant', 'PaypalPro', - ); + ]; } /** @@ -133,16 +133,16 @@ class CRM_Core_ClassLoader { // CRM-11304 // TODO Remove this autoloader. For civicrm-core and civicrm-packages, the composer autoloader works fine. // Extensions rely on include_path-based autoloading - spl_autoload_register(array($this, 'loadClass'), TRUE, $prepend); + spl_autoload_register([$this, 'loadClass'], TRUE, $prepend); $this->initHtmlPurifier($prepend); $this->_registered = TRUE; - $packages_path = implode(DIRECTORY_SEPARATOR, array($civicrm_base_path, 'packages')); - $include_paths = array( + $packages_path = implode(DIRECTORY_SEPARATOR, [$civicrm_base_path, 'packages']); + $include_paths = [ '.', $civicrm_base_path, $packages_path, - ); + ]; $include_paths = implode(PATH_SEPARATOR, $include_paths); set_include_path($include_paths . PATH_SEPARATOR . get_include_path()); // @todo Why do we need to load this again? @@ -167,7 +167,7 @@ class CRM_Core_ClassLoader { return; } require_once $htmlPurifierPath; - spl_autoload_register(array('HTMLPurifier_Bootstrap', 'autoload'), TRUE, $prepend); + spl_autoload_register(['HTMLPurifier_Bootstrap', 'autoload'], TRUE, $prepend); } /** @@ -190,7 +190,7 @@ class CRM_Core_ClassLoader { // we do this to prevent a autoloader errors with joomla / 3rd party packages // Use absolute path, since we don't know the content of include_path yet. // CRM-11304 - $file = dirname(__FILE__) . '/../../packages/IDS/vendors/htmlpurifier/HTMLPurifier/Bootstrap.php'; + $file = dirname(__FILE__) . '/../../packages/IDS/vendors/htmlpurifer/HTMLPurifier/Bootstrap.php'; if (file_exists($file)) { return $file; }