Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2524083

Browse filesBrowse files
committed
fixed CS in ExpressionLanguage fixtures
1 parent ec7dcb2 commit 2524083
Copy full SHA for 2524083

File tree

Expand file treeCollapse file tree

6 files changed

+11
-11
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+11
-11
lines changed

‎src/Symfony/Component/ExpressionLanguage/Compiler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Compiler.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function repr($value)
125125
} elseif (\is_bool($value)) {
126126
$this->raw($value ? 'true' : 'false');
127127
} elseif (\is_array($value)) {
128-
$this->raw('array(');
128+
$this->raw('[');
129129
$first = true;
130130
foreach ($value as $key => $value) {
131131
if (!$first) {
@@ -136,7 +136,7 @@ public function repr($value)
136136
$this->raw(' => ');
137137
$this->repr($value);
138138
}
139-
$this->raw(')');
139+
$this->raw(']');
140140
} else {
141141
$this->string($value);
142142
}

‎src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public function addElement(Node $value, Node $key = null)
4141
*/
4242
public function compile(Compiler $compiler)
4343
{
44-
$compiler->raw('array(');
44+
$compiler->raw('[');
4545
$this->compileArguments($compiler);
46-
$compiler->raw(')');
46+
$compiler->raw(']');
4747
}
4848

4949
public function evaluate($functions, $values)

‎src/Symfony/Component/ExpressionLanguage/Tests/Node/ArrayNodeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Tests/Node/ArrayNodeTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getEvaluateData()
3838
public function getCompileData()
3939
{
4040
return [
41-
['array("b" => "a", 0 => "b")', $this->getArrayNode()],
41+
['["b" => "a", 0 => "b"]', $this->getArrayNode()],
4242
];
4343
}
4444

‎src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ public function getCompileData()
104104
['pow(5, 2)', new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))],
105105
['("a" . "b")', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))],
106106

107-
['in_array("a", array(0 => "a", 1 => "b"))', new BinaryNode('in', new ConstantNode('a'), $array)],
108-
['in_array("c", array(0 => "a", 1 => "b"))', new BinaryNode('in', new ConstantNode('c'), $array)],
109-
['!in_array("c", array(0 => "a", 1 => "b"))', new BinaryNode('not in', new ConstantNode('c'), $array)],
110-
['!in_array("a", array(0 => "a", 1 => "b"))', new BinaryNode('not in', new ConstantNode('a'), $array)],
107+
['in_array("a", [0 => "a", 1 => "b"])', new BinaryNode('in', new ConstantNode('a'), $array)],
108+
['in_array("c", [0 => "a", 1 => "b"])', new BinaryNode('in', new ConstantNode('c'), $array)],
109+
['!in_array("c", [0 => "a", 1 => "b"])', new BinaryNode('not in', new ConstantNode('c'), $array)],
110+
['!in_array("a", [0 => "a", 1 => "b"])', new BinaryNode('not in', new ConstantNode('a'), $array)],
111111

112112
['range(1, 3)', new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))],
113113

‎src/Symfony/Component/ExpressionLanguage/Tests/Node/ConstantNodeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Tests/Node/ConstantNodeTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function getCompileData()
3737
['3', new ConstantNode(3)],
3838
['3.3', new ConstantNode(3.3)],
3939
['"foo"', new ConstantNode('foo')],
40-
['array(0 => 1, "b" => "a")', new ConstantNode([1, 'b' => 'a'])],
40+
['[0 => 1, "b" => "a"]', new ConstantNode([1, 'b' => 'a'])],
4141
];
4242
}
4343

‎src/Symfony/Component/ExpressionLanguage/Tests/Node/GetAttrNodeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Tests/Node/GetAttrNodeTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getCompileData()
3939

4040
['$foo->foo', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), ['foo' => new Obj()]],
4141

42-
['$foo->foo(array("b" => "a", 0 => "b"))', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]],
42+
['$foo->foo(["b" => "a", 0 => "b"])', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]],
4343
['$foo[$index]', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)],
4444
];
4545
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.