function test6 in Coder 8.3.x
Same name in this branch
Same name and namespace in other branches
- 8.3 tests/DrupalPractice/CodeAnalysis/VariableAnalysisUnitTest.inc \test6()
- 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \test6()
- 8.3 tests/Drupal/bad/bad.php \test6()
- 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \test6()
- 8.2 coder_sniffer/Drupal/Test/bad/bad.php \test6()
- 8.2 coder_sniffer/Drupal/Test/good/good.php \test6()
- 7.2 coder_sniffer/Test/bad/bad.php \test6()
File
- tests/
DrupalPractice/ CodeAnalysis/ VariableAnalysisUnitTest.inc, line 45
Code
function test6() {
$foo = [
'a' => 1,
'b' => 2,
];
[
'a' => $a,
'b' => $b,
] = $foo;
$bar = [
'x' => 3,
'y' => 4,
];
list('x' => $x, 'y' => $y) = $bar;
return [
$a,
$b,
$x,
$y,
];
}