Skip to content
Snippets Groups Projects
Commit ddfebe62 authored by catch's avatar catch
Browse files

Issue #2901735 by mfernea: Fix 'Squiz.Arrays.ArrayBracketSpacing' coding standard

(cherry picked from commit 4005f93b)
parent 8e7f84ad
No related branches found
No related tags found
No related merge requests found
......@@ -214,7 +214,7 @@ protected function getFieldInfo($node_type) {
$query->fields('cnf');
foreach ($query->execute() as $field) {
$this->fieldInfo[ $field['type_name'] ][ $field['field_name'] ] = $field;
$this->fieldInfo[$field['type_name']][$field['field_name']] = $field;
}
foreach ($this->fieldInfo as $type => $fields) {
......
......@@ -150,6 +150,7 @@
</rule>
<!-- Squiz sniffs -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Squiz.Arrays.ArrayDeclaration">
<exclude name="Squiz.Arrays.ArrayDeclaration.NoKeySpecified"/>
<exclude name="Squiz.Arrays.ArrayDeclaration.KeySpecified"/>
......
......@@ -113,14 +113,14 @@ public function providerTestLog() {
$request_mock->headers = $this->getMock('Symfony\Component\HttpFoundation\ParameterBag');
// No request or account.
$cases [] = [
$cases[] = [
function ($context) {
return $context['channel'] == 'test' && empty($context['uid']) && empty($context['ip']);
},
];
// With account but not request. Since the request is not available the
// current user should not be used.
$cases [] = [
$cases[] = [
function ($context) {
return $context['uid'] === 0 && empty($context['ip']);
},
......@@ -128,14 +128,14 @@ function ($context) {
$account_mock,
];
// With request but not account.
$cases [] = [
$cases[] = [
function ($context) {
return $context['ip'] === '127.0.0.1' && empty($context['uid']);
},
$request_mock,
];
// Both request and account.
$cases [] = [
$cases[] = [
function ($context) {
return $context['ip'] === '127.0.0.1' && $context['uid'] === 1;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment