X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FModule.php;h=3a7da7a1e1609cc212a1a9d4d69c1dad62791b3c;hb=7f175707d67597717d72661c55878d6432f87736;hp=0f812529787a742f040fdd4b1ef4c788fa87fe21;hpb=c3ba729df769eade45a1ea8a0cfd08f9599c43f2;p=civicrm-core.git diff --git a/CRM/Core/Module.php b/CRM/Core/Module.php index 0f81252978..3a7da7a1e1 100644 --- a/CRM/Core/Module.php +++ b/CRM/Core/Module.php @@ -32,8 +32,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2019 - * $Id$ - * */ class CRM_Core_Module { @@ -43,13 +41,17 @@ class CRM_Core_Module { public $name; /** - * @var bool, TRUE if fully enabled; FALSE if module exists but is disabled + * Is the module enabled. + * + * @var bool */ public $is_active; /** + * Class constructor. + * * @param string $name - * @param $is_active + * @param bool $is_active */ public function __construct($name, $is_active) { $this->name = $name; @@ -68,7 +70,8 @@ class CRM_Core_Module { static $result; if ($fresh || !is_array($result)) { $result = CRM_Extension_System::singleton()->getMapper()->getModules(); - $result[] = new CRM_Core_Module('civicrm', TRUE); // pseudo-module for core + // pseudo-module for core + $result[] = new CRM_Core_Module('civicrm', TRUE); $config = CRM_Core_Config::singleton(); $result = array_merge($result, $config->userSystem->getModules()); @@ -87,7 +90,7 @@ class CRM_Core_Module { * @see CRM_Extension_Manager::STATUS_DISABLED */ public static function collectStatuses($modules) { - $statuses = array(); + $statuses = []; foreach ($modules as $module) { $statuses[$module->name] = $module->is_active ? CRM_Extension_Manager::STATUS_INSTALLED : CRM_Extension_Manager::STATUS_DISABLED;