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

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

parent 3bc858ec
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -214,7 +214,7 @@ protected function getFieldInfo($node_type) { ...@@ -214,7 +214,7 @@ protected function getFieldInfo($node_type) {
$query->fields('cnf'); $query->fields('cnf');
foreach ($query->execute() as $field) { 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) { foreach ($this->fieldInfo as $type => $fields) {
......
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
</rule> </rule>
<!-- Squiz sniffs --> <!-- Squiz sniffs -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Squiz.Arrays.ArrayDeclaration"> <rule ref="Squiz.Arrays.ArrayDeclaration">
<exclude name="Squiz.Arrays.ArrayDeclaration.NoKeySpecified"/> <exclude name="Squiz.Arrays.ArrayDeclaration.NoKeySpecified"/>
<exclude name="Squiz.Arrays.ArrayDeclaration.KeySpecified"/> <exclude name="Squiz.Arrays.ArrayDeclaration.KeySpecified"/>
......
...@@ -113,14 +113,14 @@ public function providerTestLog() { ...@@ -113,14 +113,14 @@ public function providerTestLog() {
$request_mock->headers = $this->getMock('Symfony\Component\HttpFoundation\ParameterBag'); $request_mock->headers = $this->getMock('Symfony\Component\HttpFoundation\ParameterBag');
// No request or account. // No request or account.
$cases [] = [ $cases[] = [
function ($context) { function ($context) {
return $context['channel'] == 'test' && empty($context['uid']) && empty($context['ip']); return $context['channel'] == 'test' && empty($context['uid']) && empty($context['ip']);
}, },
]; ];
// With account but not request. Since the request is not available the // With account but not request. Since the request is not available the
// current user should not be used. // current user should not be used.
$cases [] = [ $cases[] = [
function ($context) { function ($context) {
return $context['uid'] === 0 && empty($context['ip']); return $context['uid'] === 0 && empty($context['ip']);
}, },
...@@ -128,14 +128,14 @@ function ($context) { ...@@ -128,14 +128,14 @@ function ($context) {
$account_mock, $account_mock,
]; ];
// With request but not account. // With request but not account.
$cases [] = [ $cases[] = [
function ($context) { function ($context) {
return $context['ip'] === '127.0.0.1' && empty($context['uid']); return $context['ip'] === '127.0.0.1' && empty($context['uid']);
}, },
$request_mock, $request_mock,
]; ];
// Both request and account. // Both request and account.
$cases [] = [ $cases[] = [
function ($context) { function ($context) {
return $context['ip'] === '127.0.0.1' && $context['uid'] === 1; 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