aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/plugin/PluginManager.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-22 20:25:47 +0200
committerArthurHoaro <arthur@hoa.ro>2020-11-09 10:56:24 +0100
commit53054b2bf6a919fd4ff9b44b6ad1986f21f488b6 (patch)
tree39cad52645ce00fbf863ff8e482d10dfcbe7f26c /application/plugin/PluginManager.php
parente09bb93e18a333eff8e6a4156f5b58ba9c7d25cd (diff)
downloadShaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.gz
Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.zst
Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.zip
Apply PHP Code Beautifier on source code for linter automatic fixes
Diffstat (limited to 'application/plugin/PluginManager.php')
-rw-r--r--application/plugin/PluginManager.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/application/plugin/PluginManager.php b/application/plugin/PluginManager.php
index da66dea3..3ea55728 100644
--- a/application/plugin/PluginManager.php
+++ b/application/plugin/PluginManager.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Shaarli\Plugin; 3namespace Shaarli\Plugin;
3 4
4use Shaarli\Config\ConfigManager; 5use Shaarli\Config\ConfigManager;
@@ -23,7 +24,7 @@ class PluginManager
23 * 24 *
24 * @var array $loadedPlugins 25 * @var array $loadedPlugins
25 */ 26 */
26 private $loadedPlugins = array(); 27 private $loadedPlugins = [];
27 28
28 /** 29 /**
29 * @var ConfigManager Configuration Manager instance. 30 * @var ConfigManager Configuration Manager instance.
@@ -57,7 +58,7 @@ class PluginManager
57 public function __construct(&$conf) 58 public function __construct(&$conf)
58 { 59 {
59 $this->conf = $conf; 60 $this->conf = $conf;
60 $this->errors = array(); 61 $this->errors = [];
61 } 62 }
62 63
63 /** 64 /**
@@ -98,7 +99,7 @@ class PluginManager
98 * 99 *
99 * @return void 100 * @return void
100 */ 101 */
101 public function executeHooks($hook, &$data, $params = array()) 102 public function executeHooks($hook, &$data, $params = [])
102 { 103 {
103 $metadataParameters = [ 104 $metadataParameters = [
104 'target' => '_PAGE_', 105 'target' => '_PAGE_',
@@ -196,7 +197,7 @@ class PluginManager
196 */ 197 */
197 public function getPluginsMeta() 198 public function getPluginsMeta()
198 { 199 {
199 $metaData = array(); 200 $metaData = [];
200 $dirs = glob(self::$PLUGINS_PATH . '/*', GLOB_ONLYDIR | GLOB_MARK); 201 $dirs = glob(self::$PLUGINS_PATH . '/*', GLOB_ONLYDIR | GLOB_MARK);
201 202
202 // Browse all plugin directories. 203 // Browse all plugin directories.
@@ -217,9 +218,9 @@ class PluginManager
217 if (isset($metaData[$plugin]['parameters'])) { 218 if (isset($metaData[$plugin]['parameters'])) {
218 $params = explode(';', $metaData[$plugin]['parameters']); 219 $params = explode(';', $metaData[$plugin]['parameters']);
219 } else { 220 } else {
220 $params = array(); 221 $params = [];
221 } 222 }
222 $metaData[$plugin]['parameters'] = array(); 223 $metaData[$plugin]['parameters'] = [];
223 foreach ($params as $param) { 224 foreach ($params as $param) {
224 if (empty($param)) { 225 if (empty($param)) {
225 continue; 226 continue;