fix: noverify --fix
This commit is contained in:
parent
5aff28d2b8
commit
117640a755
44 changed files with 174 additions and 174 deletions
|
|
@ -82,7 +82,7 @@ class Action
|
|||
}
|
||||
|
||||
public function addSuggest(View $view, $name) {
|
||||
$suggest = array();
|
||||
$suggest = [];
|
||||
$file = Path::join($this->modulePath, 'help', $name . '.suggest');
|
||||
if (file_exists($file)) {
|
||||
$view->suggestions = include($file);
|
||||
|
|
@ -107,10 +107,10 @@ class Action
|
|||
$basePath = $this->config->get('system', 'path');
|
||||
$webPath = $this->config->get('system', 'web');
|
||||
|
||||
$list = array(
|
||||
$list = [
|
||||
Path::join($this->modulePath, 'templates', $this->viewPathPrefix) => Path::join($webPath, "modules", $this->name, 'templates', $this->viewPathPrefix),
|
||||
Path::join($basePath, "templates") => Path::join($webPath, "templates")
|
||||
);
|
||||
];
|
||||
|
||||
// Поиск файла для шаблона
|
||||
foreach($list as $ospath => $path) {
|
||||
|
|
@ -130,14 +130,14 @@ class Action
|
|||
$tpl->set('script', $scriptPath); // Путь к файлам скриптов
|
||||
$tpl->set('template', $path); // Путь к файлам текущего шаблона
|
||||
|
||||
$tpl->setAlias(array(
|
||||
$tpl->setAlias([
|
||||
'assets' => $stylePath,
|
||||
'icons' => $iconsPath,
|
||||
'script' => $scriptPath,
|
||||
// Для media и template поиск происходит как для файлов шаблонов
|
||||
'media' => $list,
|
||||
'template' => $list
|
||||
));
|
||||
]);
|
||||
|
||||
$tpl->loadImports(Path::skipExtension($template) . ".import");
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ class Action
|
|||
}
|
||||
|
||||
public function forward($action, HttpRequest $args) {
|
||||
$value = call_user_func(array($this, $action), $args);
|
||||
$value = call_user_func([$this, $action], $args);
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ class Action
|
|||
* 'mode' означает что элемент до отправки обрабатывается javascript
|
||||
* @return Url|null
|
||||
*/
|
||||
public function nUrl($name, array $param = array())
|
||||
public function nUrl($name, array $param = [])
|
||||
{
|
||||
$access/*: ActionAccess*/ = $this->access;
|
||||
$url = new Url();
|
||||
|
|
@ -220,7 +220,7 @@ class Action
|
|||
array_shift($moduleName);
|
||||
}
|
||||
}
|
||||
$param = array_merge(array('module' => implode("\\", $moduleName), "action" => $name), $param);
|
||||
$param = array_merge(['module' => implode("\\", $moduleName), "action" => $name], $param);
|
||||
|
||||
$url->setParent($this->part);
|
||||
$url->setQuery($param);
|
||||
|
|
@ -239,9 +239,9 @@ class Action
|
|||
* @example ?action=$name&mode=ajax
|
||||
* {$param[i].key = $param[i].value}
|
||||
*/
|
||||
public function aUrl($name, array $param = array())
|
||||
public function aUrl($name, array $param = [])
|
||||
{
|
||||
return $this->nUrl($name, array_merge(array('mode' => 'ajax'), $param));
|
||||
return $this->nUrl($name, array_merge(['mode' => 'ajax'], $param));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -260,7 +260,7 @@ class Action
|
|||
$action = self::ACTION_PREFIX . $request->getAction();
|
||||
foreach ($this->helpers as $helper) {
|
||||
if (method_exists($helper, $action)) {
|
||||
return call_user_func(array($helper, $action), $request, $this);
|
||||
return call_user_func([$helper, $action], $request, $this);
|
||||
} else {
|
||||
return $helper->actionIndex($request, $this); // Вместо return response ???
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue