mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 04:28:44 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -29,8 +29,8 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
|
||||
{
|
||||
public const UNDEFINED_DOMAIN = '_undefined';
|
||||
|
||||
private $enabled = false;
|
||||
private $messages = [];
|
||||
private bool $enabled = false;
|
||||
private array $messages = [];
|
||||
|
||||
public function enable(): void
|
||||
{
|
||||
@@ -49,9 +49,6 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
|
||||
return $this->messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function doEnterNode(Node $node, Environment $env): Node
|
||||
{
|
||||
if (!$this->enabled) {
|
||||
@@ -59,9 +56,9 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
|
||||
}
|
||||
|
||||
if (
|
||||
$node instanceof FilterExpression &&
|
||||
'trans' === $node->getNode('filter')->getAttribute('value') &&
|
||||
$node->getNode('node') instanceof ConstantExpression
|
||||
$node instanceof FilterExpression
|
||||
&& 'trans' === $node->getNode('filter')->getAttribute('value')
|
||||
&& $node->getNode('node') instanceof ConstantExpression
|
||||
) {
|
||||
// extract constant nodes with a trans filter
|
||||
$this->messages[] = [
|
||||
@@ -69,8 +66,8 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
|
||||
$this->getReadDomainFromArguments($node->getNode('arguments'), 1),
|
||||
];
|
||||
} elseif (
|
||||
$node instanceof FunctionExpression &&
|
||||
't' === $node->getAttribute('name')
|
||||
$node instanceof FunctionExpression
|
||||
&& 't' === $node->getAttribute('name')
|
||||
) {
|
||||
$nodeArguments = $node->getNode('arguments');
|
||||
|
||||
@@ -87,10 +84,10 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
|
||||
$node->hasNode('domain') ? $this->getReadDomainFromNode($node->getNode('domain')) : null,
|
||||
];
|
||||
} elseif (
|
||||
$node instanceof FilterExpression &&
|
||||
'trans' === $node->getNode('filter')->getAttribute('value') &&
|
||||
$node->getNode('node') instanceof ConcatBinary &&
|
||||
$message = $this->getConcatValueFromNode($node->getNode('node'), null)
|
||||
$node instanceof FilterExpression
|
||||
&& 'trans' === $node->getNode('filter')->getAttribute('value')
|
||||
&& $node->getNode('node') instanceof ConcatBinary
|
||||
&& $message = $this->getConcatValueFromNode($node->getNode('node'), null)
|
||||
) {
|
||||
$this->messages[] = [
|
||||
$message,
|
||||
@@ -101,17 +98,11 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function doLeaveNode(Node $node, Environment $env): ?Node
|
||||
{
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getPriority(): int
|
||||
{
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user