Skip to content

Commit

Permalink
Use old array syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
artursvonda committed Apr 11, 2021
1 parent d8f545c commit c2bc4de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Translation/Extractor/File/ValidationContextExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ValidationContextExtractor implements FileVisitorInterface, NodeVisitor
/**
* @var array
*/
private $messages = [];
private $messages = array();
/**
* @var MessageCatalogue
*/
Expand All @@ -55,7 +55,7 @@ class ValidationContextExtractor implements FileVisitorInterface, NodeVisitor
/**
* @var array
*/
private $aliases = [];
private $aliases = array();
/**
* @var string
*/
Expand Down Expand Up @@ -100,7 +100,7 @@ public function visitPhpFile(SplFileInfo $file, MessageCatalogue $catalogue, arr
{
$this->file = $file;
$this->catalogue = $catalogue;
$this->messages = [];
$this->messages = array();
$this->traverser->traverse($ast);

foreach ($this->messages as $message) {
Expand Down Expand Up @@ -128,7 +128,7 @@ public function beforeTraverse(array $nodes)
public function enterNode(Node $node)
{
if ($node instanceof Node\Stmt\Namespace_) {
$this->aliases = [];
$this->aliases = array();

return;
}
Expand Down Expand Up @@ -193,11 +193,11 @@ private function parseMethodCall(Node\Expr\MethodCall $node)
}
} elseif ($node->name === 'addViolation') {
if ($this->id and $this->source) {
$this->messages[] = [
$this->messages[] = array(
'id' => $this->id,
'source' => $this->source,
'domain' => $this->domain,
];
);
}

$this->id = null;
Expand Down

0 comments on commit c2bc4de

Please sign in to comment.