Commit edf57d8a authored by xjm's avatar xjm

Revert "Issue #2572795 by mfernea, pfrenssen, attiks, andypost, alexpott, xjm,...

Revert "Issue #2572795 by mfernea, pfrenssen, attiks, andypost, alexpott, xjm, Mile23, catch, borisson_: Fix coding standard for closures - Drupal.WhiteSpace.ScopeClosingBrace and Generic.Functions.OpeningFunctionBraceKernighanRitchie"

This reverts commit c422bdfa.
parent 6afd12c0
......@@ -586,7 +586,8 @@ public function getServiceIds() {
/**
* Ensure that cloning doesn't work.
*/
private function __clone() {
private function __clone()
{
}
}
......@@ -159,7 +159,7 @@ protected function doWrite($name, $data) {
* @throws \Drupal\Core\Config\StorageException
* If a database error occurs.
*/
protected function ensureTableExists() {
protected function ensureTableExists() {
try {
if (!$this->connection->schema()->tableExists($this->table)) {
$this->connection->schema()->createTable($this->table, static::schemaDefinition());
......
......@@ -557,7 +557,7 @@ public function hasValue($key) {
/**
* {@inheritdoc}
*/
public function isValueEmpty($key) {
public function isValueEmpty($key) {
return $this->decoratedFormState->isValueEmpty($key);
}
......
......@@ -109,6 +109,5 @@ public function testSettingsForm() {
namespace Drupal\Core\Form;
if (!function_exists('drupal_set_message')) {
function drupal_set_message() {
}
function drupal_set_message() {}
}
......@@ -113,7 +113,7 @@ protected function getDisplayModeOptions() {
/**
* {@inheritdoc}
*/
protected function getDisplayModesLink() {
protected function getDisplayModesLink() {;
return [
'#type' => 'link',
'#title' => t('Manage view modes'),
......
......@@ -215,7 +215,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
* @param string $type
* The language type to generate the table for.
*/
protected function configureFormTable(array &$form, $type) {
protected function configureFormTable(array &$form, $type) {
$info = $form['#language_types_info'][$type];
$table_form = [
......
......@@ -198,7 +198,7 @@ protected function checkConfigurableLanguageWeight($state = 'by default') {
* @return int
* Maximum weight of configurable languages.
*/
protected function getHighestConfigurableLanguageWeight() {
protected function getHighestConfigurableLanguageWeight(){
$max_weight = 0;
$storage = $this->container->get('entity_type.manager')
......
......@@ -21,7 +21,7 @@ class LocaleFileSystemFormTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
protected function setUp(){
parent::setUp();
$account = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($account);
......
......@@ -43,7 +43,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
*
* @see https://www.drupal.org/node/2874934
*/
public function getInstance(array $options) {
public function getInstance(array $options){
if (isset($options['id'])) {
return $this->createInstance($options['id']);
}
......
......@@ -31,7 +31,6 @@ protected function assertResponseWhenMissingAuthentication(ResponseInterface $re
/**
* {@inheritdoc}
*/
protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {
}
protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {}
}
......@@ -38,7 +38,6 @@ protected function assertResponseWhenMissingAuthentication(ResponseInterface $re
/**
* {@inheritdoc}
*/
protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {
}
protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {}
}
......@@ -33,8 +33,7 @@ function serialization_requirements($phase) {
/**
* @see hal_update_8301()
*/
function serialization_update_8301() {
}
function serialization_update_8301() {}
/**
* Add serialization.settings::bc_primitives_as_strings configuration.
......
......@@ -60,7 +60,7 @@ public function setBaseEncoder($encoder) {
/**
* {@inheritdoc}
*/
public function encode($data, $format, array $context = []) {
public function encode($data, $format, array $context = []){
return $this->getBaseEncoder()->encode($data, $format, $context);
}
......@@ -74,7 +74,7 @@ public function supportsEncoding($format) {
/**
* {@inheritdoc}
*/
public function decode($data, $format, array $context = []) {
public function decode($data, $format, array $context = []){
return $this->getBaseEncoder()->decode($data, $format, $context);
}
......
......@@ -49,7 +49,7 @@ public function getRouteByName($name) {
/**
* {@inheritdoc}
*/
public function preLoadRoutes($names) {
public function preLoadRoutes($names){
return $this->lazyLoadItself()->preLoadRoutes($names);
}
......
......@@ -11,7 +11,7 @@
*/
class ConfigTest extends BrowserTestBase {
protected function setUp() {
protected function setUp(){
parent::setUp();
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
}
......
......@@ -21,7 +21,7 @@ protected function setUp() {
* Tests that a user can be assigned a role and that the role can be removed
* again.
*/
public function testAssignAndRemoveRole() {
public function testAssignAndRemoveRole() {
$rid = $this->drupalCreateRole(['administer users']);
$account = $this->drupalCreateUser();
......
......@@ -1471,7 +1471,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
'#title' => $this->t('Show contextual links'),
'#default_value' => $this->getOption('show_admin_links'),
];
break;
break;
case 'use_more':
$form['#title'] .= $this->t('Add a more link to the bottom of the display.');
$form['use_more'] = [
......@@ -1866,7 +1866,7 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) {
if (preg_match('/[^a-zA-Z0-9-_ ]/', $css_class)) {
$form_state->setError($form['css_class'], $this->t('CSS classes must be alphanumeric or dashes only.'));
}
break;
break;
case 'display_id':
if ($form_state->getValue('display_id')) {
if (preg_match('/[^a-z0-9_]/', $form_state->getValue('display_id'))) {
......
......@@ -69,16 +69,11 @@ protected function assertGrid(ViewExecutable $view, $alignment, $columns) {
}
$width = '0';
switch ($columns) {
case 5: $width = '20';
break;
case 4: $width = '25';
break;
case 3: $width = '33.3333';
break;
case 2: $width = '50';
break;
case 1: $width = '100';
break;
case 5: $width = '20'; break;
case 4: $width = '25'; break;
case 3: $width = '33.3333'; break;
case 2: $width = '50'; break;
case 1: $width = '100'; break;
}
// Ensure last column exists.
$result = $this->xpath('//div[contains(@class, "views-col") and contains(@class, :columns) and starts-with(@style, :width)]', [':columns' => 'col-' . $columns, ':width' => 'width: ' . $width]);
......
......@@ -126,7 +126,6 @@
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OpenBracketSpacingSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OpenTagNewlineSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OperatorSpacingSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/ScopeIndentSniff.php"/>
<!-- Drupal Practice sniffs -->
......@@ -137,11 +136,6 @@
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie">
<properties>
<property name="checkClosures" value="true"/>
</properties>
</rule>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
......
......@@ -21,7 +21,7 @@ class UrlRewritingTest extends FileTestBase {
/**
* Tests the rewriting of shipped file URLs by hook_file_url_alter().
*/
public function testShippedFileURL() {
public function testShippedFileURL() {
// Test generating a URL to a shipped file (i.e. a file that is part of
// Drupal core, a module or a theme, for example a JavaScript file).
......
......@@ -8,5 +8,4 @@
/**
* Test hook.
*/
function module_handler_test_hook_include() {
}
function module_handler_test_hook_include() {}
......@@ -28,7 +28,7 @@ class SettingsTest extends UnitTestCase {
/**
* @covers ::__construct
*/
protected function setUp() {
protected function setUp(){
$this->config = [
'one' => '1',
'two' => '2',
......
......@@ -451,7 +451,7 @@ public function assert($condition, $message) {
* @throws \Behat\Mink\Exception\ElementNotFoundException
* @throws \Behat\Mink\Exception\ExpectationException
*/
public function fieldDisabled($field, TraversableElement $container = NULL) {
public function fieldDisabled($field, TraversableElement $container = NULL) {
$container = $container ?: $this->session->getPage();
$node = $container->findField($field);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment