X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FExtension%2FBrowser.php;h=ff173a54a334e5fd91ac5550e354fa5245b5d208;hb=f60900334b9a155ab168051f3ebb0896ca7e1aa3;hp=89994cb00ebee2c52960bd74e7986feb65cdb208;hpb=eda4c5942ca6c0f3f394957acac921b9d3d9854e;p=civicrm-core.git diff --git a/CRM/Extension/Browser.php b/CRM/Extension/Browser.php index 89994cb00e..ff173a54a3 100644 --- a/CRM/Extension/Browser.php +++ b/CRM/Extension/Browser.php @@ -94,10 +94,10 @@ class CRM_Extension_Browser { */ public function checkRequirements() { if (!$this->isEnabled()) { - return array(); + return []; } - $errors = array(); + $errors = []; if (!$this->cacheDir || !is_dir($this->cacheDir) || !is_writable($this->cacheDir)) { $civicrmDestination = urlencode(CRM_Utils_System::url('civicrm/admin/extensions', 'reset=1')); @@ -124,10 +124,10 @@ class CRM_Extension_Browser { */ public function getExtensions() { if (!$this->isEnabled() || count($this->checkRequirements())) { - return array(); + return []; } - $exts = array(); + $exts = []; $remote = $this->_discoverRemote(); if (is_array($remote)) { @@ -180,7 +180,7 @@ class CRM_Extension_Browser { $remotes = json_decode($this->grabCachedJson(), TRUE); } - $this->_remotesDiscovered = array(); + $this->_remotesDiscovered = []; foreach ((array) $remotes as $id => $xml) { $ext = CRM_Extension_Info::loadFromString($xml); $this->_remotesDiscovered[] = $ext; @@ -230,7 +230,7 @@ class CRM_Extension_Browser { if (FALSE === $this->getRepositoryUrl()) { // don't check if the user has configured civi not to check an external // url for extensions. See CRM-10575. - return array(); + return []; } $filename = $this->cacheDir . DIRECTORY_SEPARATOR . self::CACHE_JSON_FILE . '.' . md5($this->getRepositoryUrl());