Apply PHP Code Beautifier on source code for linter automatic fixes
This commit is contained in:
parent
e09bb93e18
commit
53054b2bf6
87 changed files with 408 additions and 336 deletions
application/plugin
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Shaarli\Plugin;
|
||||
|
||||
use Shaarli\Config\ConfigManager;
|
||||
|
@ -23,7 +24,7 @@ class PluginManager
|
|||
*
|
||||
* @var array $loadedPlugins
|
||||
*/
|
||||
private $loadedPlugins = array();
|
||||
private $loadedPlugins = [];
|
||||
|
||||
/**
|
||||
* @var ConfigManager Configuration Manager instance.
|
||||
|
@ -57,7 +58,7 @@ class PluginManager
|
|||
public function __construct(&$conf)
|
||||
{
|
||||
$this->conf = $conf;
|
||||
$this->errors = array();
|
||||
$this->errors = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,7 +99,7 @@ class PluginManager
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function executeHooks($hook, &$data, $params = array())
|
||||
public function executeHooks($hook, &$data, $params = [])
|
||||
{
|
||||
$metadataParameters = [
|
||||
'target' => '_PAGE_',
|
||||
|
@ -196,7 +197,7 @@ class PluginManager
|
|||
*/
|
||||
public function getPluginsMeta()
|
||||
{
|
||||
$metaData = array();
|
||||
$metaData = [];
|
||||
$dirs = glob(self::$PLUGINS_PATH . '/*', GLOB_ONLYDIR | GLOB_MARK);
|
||||
|
||||
// Browse all plugin directories.
|
||||
|
@ -217,9 +218,9 @@ class PluginManager
|
|||
if (isset($metaData[$plugin]['parameters'])) {
|
||||
$params = explode(';', $metaData[$plugin]['parameters']);
|
||||
} else {
|
||||
$params = array();
|
||||
$params = [];
|
||||
}
|
||||
$metaData[$plugin]['parameters'] = array();
|
||||
$metaData[$plugin]['parameters'] = [];
|
||||
foreach ($params as $param) {
|
||||
if (empty($param)) {
|
||||
continue;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Shaarli\Plugin\Exception;
|
||||
|
||||
use Exception;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue