fix: noverify --fix

This commit is contained in:
origami11@yandex.ru 2024-06-14 14:12:02 +03:00
parent 5aff28d2b8
commit 117640a755
44 changed files with 174 additions and 174 deletions

View file

@ -48,11 +48,11 @@ class Setup
array_push($this->stack, $this->node);
$this->registerAction('copy', array($this, 'copyFile'));
$this->registerAction('make-directory', array($this, 'makeDirectory'));
$this->registerAction('make-link', array($this, 'makeLink'));
$this->registerAction('include', array($this, 'includeFile'));
$this->registerAction('when', array($this, 'testWhen'));
$this->registerAction('copy', [$this, 'copyFile']);
$this->registerAction('make-directory', [$this, 'makeDirectory']);
$this->registerAction('make-link', [$this, 'makeLink']);
$this->registerAction('include', [$this, 'includeFile']);
$this->registerAction('when', [$this, 'testWhen']);
}
/**
@ -87,7 +87,7 @@ class Setup
public function fileContent($file, array $tpl)
{
$result = $this->zip->getFromName($file);
$result = preg_replace_callback('/\{\{\s*(\*?)(\w+)\s*\}\}/', array($this, 'replaceFn'), $result);
$result = preg_replace_callback('/\{\{\s*(\*?)(\w+)\s*\}\}/', [$this, 'replaceFn'], $result);
return $result;
}
@ -114,9 +114,9 @@ class Setup
*/
function resolve($attributes)
{
$result = array();
$result = [];
foreach ($attributes as $key => $value) {
$result [$key] = preg_replace_callback("/\\\${(\w+)}/", array($this, 'replaceVariable'), $value);
$result [$key] = preg_replace_callback("/\\\${(\w+)}/", [$this, 'replaceVariable'], $value);
}
return $result;
}
@ -139,7 +139,7 @@ class Setup
{
$attributes = $node->attributes();
array_push($this->stack, $node);
$this->callAction($node->getName(), array($this->resolve($attributes)));
$this->callAction($node->getName(), [$this->resolve($attributes)]);
array_pop($this->stack);
}
}