diff --git a/core/lib/Drupal/Component/Diff/Diff.php b/core/lib/Drupal/Component/Diff/Diff.php index 1e02ec1..ced579f 100644 --- a/core/lib/Drupal/Component/Diff/Diff.php +++ b/core/lib/Drupal/Component/Diff/Diff.php @@ -154,7 +154,7 @@ public function check($from_lines, $to_lines) { $prevtype = 'none'; foreach ($this->edits as $edit) { - if ( $prevtype == $edit->type ) { + if ($prevtype == $edit->type ) { trigger_error("Edit sequence is non-optimal", E_USER_ERROR); } $prevtype = $edit->type; diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php index 387c401..f92ee53 100644 --- a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php +++ b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php @@ -106,7 +106,7 @@ public function diff($from_lines, $to_lines) { // Skip matching "snake". $copy = array(); - while ( $xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi]) { + while ($xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi]) { $copy[] = $from_lines[$xi++]; ++$yi; } @@ -200,7 +200,7 @@ protected function _diag($xoff, $xlim, $yoff, $ylim, $nchunks) { } $x1 = $xoff + (int)(($numer + ($xlim-$xoff)*$chunk) / $nchunks); - for ( ; $x < $x1; $x++) { + for (; $x < $x1; $x++) { $line = $flip ? $this->yv[$x] : $this->xv[$x]; if (empty($ymatches[$line])) { continue; diff --git a/core/lib/Drupal/Component/Diff/WordLevelDiff.php b/core/lib/Drupal/Component/Diff/WordLevelDiff.php index 29939be..bbd3e63 100644 --- a/core/lib/Drupal/Component/Diff/WordLevelDiff.php +++ b/core/lib/Drupal/Component/Diff/WordLevelDiff.php @@ -33,7 +33,7 @@ protected function _split($lines) { foreach ($lines as $line) { // If the line is too long, just pretend the entire line is one big word // This prevents resource exhaustion problems - if ( $first ) { + if ($first ) { $first = FALSE; } else { diff --git a/core/lib/Drupal/Component/Plugin/Exception/ContextException.php b/core/lib/Drupal/Component/Plugin/Exception/ContextException.php index a494ea5..97ef27b 100644 --- a/core/lib/Drupal/Component/Plugin/Exception/ContextException.php +++ b/core/lib/Drupal/Component/Plugin/Exception/ContextException.php @@ -10,4 +10,4 @@ /** * An exception class to be thrown for context plugin exceptions. */ -class ContextException extends \Exception implements ExceptionInterface { } +class ContextException extends \Exception implements ExceptionInterface {} diff --git a/core/lib/Drupal/Component/Plugin/Exception/ExceptionInterface.php b/core/lib/Drupal/Component/Plugin/Exception/ExceptionInterface.php index 7efea04..48a5336 100644 --- a/core/lib/Drupal/Component/Plugin/Exception/ExceptionInterface.php +++ b/core/lib/Drupal/Component/Plugin/Exception/ExceptionInterface.php @@ -9,4 +9,4 @@ /** * Exception interface for all exceptions thrown by the Plugin component. */ -interface ExceptionInterface { } +interface ExceptionInterface {} diff --git a/core/lib/Drupal/Component/Plugin/Exception/InvalidDecoratedMethod.php b/core/lib/Drupal/Component/Plugin/Exception/InvalidDecoratedMethod.php index 57fd835..d0f7fb5 100644 --- a/core/lib/Drupal/Component/Plugin/Exception/InvalidDecoratedMethod.php +++ b/core/lib/Drupal/Component/Plugin/Exception/InvalidDecoratedMethod.php @@ -14,4 +14,4 @@ * decorated object does not contain the requested method. * */ -class InvalidDecoratedMethod extends BadMethodCallException implements ExceptionInterface { } +class InvalidDecoratedMethod extends BadMethodCallException implements ExceptionInterface {} diff --git a/core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php b/core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php index b94a9a8..af95b6b 100644 --- a/core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php +++ b/core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php @@ -9,4 +9,4 @@ /** * Exception to be thrown if a plugin tries to use an invalid deriver. */ -class InvalidDeriverException extends PluginException { } +class InvalidDeriverException extends PluginException {} diff --git a/core/lib/Drupal/Component/Plugin/Exception/MapperExceptionInterface.php b/core/lib/Drupal/Component/Plugin/Exception/MapperExceptionInterface.php index 54faef9..c34feb3 100644 --- a/core/lib/Drupal/Component/Plugin/Exception/MapperExceptionInterface.php +++ b/core/lib/Drupal/Component/Plugin/Exception/MapperExceptionInterface.php @@ -12,4 +12,4 @@ * Extended interface for exceptions thrown specifically by the Mapper subsystem * within the Plugin component. */ -interface MapperExceptionInterface extends ExceptionInterface { } +interface MapperExceptionInterface extends ExceptionInterface {} diff --git a/core/lib/Drupal/Component/Plugin/Exception/PluginException.php b/core/lib/Drupal/Component/Plugin/Exception/PluginException.php index 0d75de5..2d79329 100644 --- a/core/lib/Drupal/Component/Plugin/Exception/PluginException.php +++ b/core/lib/Drupal/Component/Plugin/Exception/PluginException.php @@ -10,4 +10,4 @@ * Generic Plugin exception class to be thrown when no more specific class * is applicable. */ -class PluginException extends \Exception implements ExceptionInterface { } +class PluginException extends \Exception implements ExceptionInterface {} diff --git a/core/lib/Drupal/Core/Archiver/ArchiveTar.php b/core/lib/Drupal/Core/Archiver/ArchiveTar.php index ecd7f25..0b4be78 100644 --- a/core/lib/Drupal/Core/Archiver/ArchiveTar.php +++ b/core/lib/Drupal/Core/Archiver/ArchiveTar.php @@ -230,7 +230,7 @@ public function __construct($p_tarname, $p_compress = null) } } $this->_tarname = $p_tarname; - if ($this->_compress) { // assert zlib or bz2 or xz extension support + if ($this->_compress) {// assert zlib or bz2 or xz extension support if ($this->_compress_type == 'gz') { $extname = 'zlib'; } else { diff --git a/core/lib/Drupal/Core/Block/MessagesBlockPluginInterface.php b/core/lib/Drupal/Core/Block/MessagesBlockPluginInterface.php index 8435960..33ce962 100644 --- a/core/lib/Drupal/Core/Block/MessagesBlockPluginInterface.php +++ b/core/lib/Drupal/Core/Block/MessagesBlockPluginInterface.php @@ -17,4 +17,4 @@ * * @ingroup block_api */ -interface MessagesBlockPluginInterface extends BlockPluginInterface { } +interface MessagesBlockPluginInterface extends BlockPluginInterface {} diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php index fb8f658..ef96703 100644 --- a/core/lib/Drupal/Core/Config/ConfigManager.php +++ b/core/lib/Drupal/Core/Config/ConfigManager.php @@ -435,7 +435,7 @@ protected function callOnDependencyRemoval(ConfigEntityInterface $entity, array // Key the entity arrays by config dependency name to make searching easy. foreach (['config', 'content'] as $dependency_type) { $affected_dependencies[$dependency_type] = array_combine( - array_map(function ($entity) { return $entity->getConfigDependencyName(); }, $affected_dependencies[$dependency_type]), + array_map(function ($entity) {return $entity->getConfigDependencyName(); }, $affected_dependencies[$dependency_type]), $affected_dependencies[$dependency_type] ); } diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index 18283ce..ed03c8b 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -178,7 +178,7 @@ public function __construct(\PDO $connection, array $connection_options) { * @return \PDO * A \PDO object. */ - public static function open(array &$connection_options = array()) { } + public static function open(array &$connection_options = array()) {} /** * Destroys this Connection object. diff --git a/core/lib/Drupal/Core/Database/DatabaseException.php b/core/lib/Drupal/Core/Database/DatabaseException.php index f28d58e..59635bc 100644 --- a/core/lib/Drupal/Core/Database/DatabaseException.php +++ b/core/lib/Drupal/Core/Database/DatabaseException.php @@ -15,5 +15,5 @@ * exceptions. PDOException will not implement this interface and module * developers should account for it separately. */ -interface DatabaseException { } +interface DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Delete.php b/core/lib/Drupal/Core/Database/Driver/mysql/Delete.php index 4e594da..cab6270 100644 --- a/core/lib/Drupal/Core/Database/Driver/mysql/Delete.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Delete.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Delete as QueryDelete; -class Delete extends QueryDelete { } +class Delete extends QueryDelete {} diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Merge.php b/core/lib/Drupal/Core/Database/Driver/mysql/Merge.php index b98d868..32112e4 100644 --- a/core/lib/Drupal/Core/Database/Driver/mysql/Merge.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Merge.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Merge as QueryMerge; -class Merge extends QueryMerge { } +class Merge extends QueryMerge {} diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Select.php b/core/lib/Drupal/Core/Database/Driver/mysql/Select.php index caa2dbf..4ea2edf 100644 --- a/core/lib/Drupal/Core/Database/Driver/mysql/Select.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Select.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Select as QuerySelect; -class Select extends QuerySelect { } +class Select extends QuerySelect {} diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Transaction.php b/core/lib/Drupal/Core/Database/Driver/mysql/Transaction.php index a04d7a0..a26f7dd 100644 --- a/core/lib/Drupal/Core/Database/Driver/mysql/Transaction.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Transaction.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Transaction as DatabaseTransaction; -class Transaction extends DatabaseTransaction { } +class Transaction extends DatabaseTransaction {} diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Truncate.php b/core/lib/Drupal/Core/Database/Driver/mysql/Truncate.php index 00cf10c..14d2f9a 100644 --- a/core/lib/Drupal/Core/Database/Driver/mysql/Truncate.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Truncate.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Truncate as QueryTruncate; -class Truncate extends QueryTruncate { } +class Truncate extends QueryTruncate {} diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Update.php b/core/lib/Drupal/Core/Database/Driver/mysql/Update.php index 7d96e55..30eeb83 100644 --- a/core/lib/Drupal/Core/Database/Driver/mysql/Update.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Update.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Update as QueryUpdate; -class Update extends QueryUpdate { } +class Update extends QueryUpdate {} diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Insert.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Insert.php index f36f509..12ec623 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Insert.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Insert.php @@ -117,7 +117,7 @@ public function __toString() { // Default fields are always placed first for consistency. $insert_fields = array_merge($this->defaultFields, $this->insertFields); - $insert_fields = array_map(function($f) { return $this->connection->escapeField($f); }, $insert_fields); + $insert_fields = array_map(function($f) {return $this->connection->escapeField($f); }, $insert_fields); // If we're selecting from a SelectQuery, finish building the query and // pass it back, as any remaining options are irrelevant. diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Merge.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Merge.php index ad74c13..d190e5a 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Merge.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Merge.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Merge as QueryMerge; -class Merge extends QueryMerge { } +class Merge extends QueryMerge {} diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/NativeUpsert.php b/core/lib/Drupal/Core/Database/Driver/pgsql/NativeUpsert.php index d1c6d11..bfc49fa 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/NativeUpsert.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/NativeUpsert.php @@ -93,7 +93,7 @@ public function __toString() { // Default fields are always placed first for consistency. $insert_fields = array_merge($this->defaultFields, $this->insertFields); - $insert_fields = array_map(function($f) { return $this->connection->escapeField($f); }, $insert_fields); + $insert_fields = array_map(function($f) {return $this->connection->escapeField($f); }, $insert_fields); $query = $comments . 'INSERT INTO {' . $this->table . '} (' . implode(', ', $insert_fields) . ') VALUES '; diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Transaction.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Transaction.php index 682c53c..f7647b6 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Transaction.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Transaction.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Transaction as DatabaseTransaction; -class Transaction extends DatabaseTransaction { } +class Transaction extends DatabaseTransaction {} diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Delete.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Delete.php index a6a07ce..23c9b12 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Delete.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Delete.php @@ -12,4 +12,4 @@ /** * SQLite specific implementation of \Drupal\Core\Database\Query\Delete. */ -class Delete extends QueryDelete { } +class Delete extends QueryDelete {} diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Merge.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Merge.php index 2acea07..ea80403 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Merge.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Merge.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Merge as QueryMerge; -class Merge extends QueryMerge { } +class Merge extends QueryMerge {} diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Transaction.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Transaction.php index 736dbcc..0196126 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Transaction.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Transaction.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Transaction as DatabaseTransaction; -class Transaction extends DatabaseTransaction { } +class Transaction extends DatabaseTransaction {} diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Update.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Update.php index aca3c95..6c3b6e9 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Update.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Update.php @@ -9,4 +9,4 @@ use Drupal\Core\Database\Query\Update as QueryUpdate; -class Update extends QueryUpdate { } +class Update extends QueryUpdate {} diff --git a/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php b/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php index 6ca76da..42d4879 100644 --- a/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php +++ b/core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php @@ -13,4 +13,4 @@ * This exception is thrown e.g. when trying to insert a row that would violate * a unique key constraint. */ -class IntegrityConstraintViolationException extends \RuntimeException implements DatabaseException { } +class IntegrityConstraintViolationException extends \RuntimeException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/InvalidQueryException.php b/core/lib/Drupal/Core/Database/InvalidQueryException.php index da61b1b..186f5f6 100644 --- a/core/lib/Drupal/Core/Database/InvalidQueryException.php +++ b/core/lib/Drupal/Core/Database/InvalidQueryException.php @@ -13,4 +13,4 @@ * This exception is thrown e.g. when trying to have an IN condition with an * empty array. */ -class InvalidQueryException extends \InvalidArgumentException implements DatabaseException { } +class InvalidQueryException extends \InvalidArgumentException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/SchemaException.php b/core/lib/Drupal/Core/Database/SchemaException.php index 182e271..ec3e1f1 100644 --- a/core/lib/Drupal/Core/Database/SchemaException.php +++ b/core/lib/Drupal/Core/Database/SchemaException.php @@ -10,4 +10,4 @@ /** * Base exception for Schema-related errors. */ -class SchemaException extends \RuntimeException implements DatabaseException { } +class SchemaException extends \RuntimeException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/SchemaObjectDoesNotExistException.php b/core/lib/Drupal/Core/Database/SchemaObjectDoesNotExistException.php index c63ec7b..c147be4 100644 --- a/core/lib/Drupal/Core/Database/SchemaObjectDoesNotExistException.php +++ b/core/lib/Drupal/Core/Database/SchemaObjectDoesNotExistException.php @@ -14,4 +14,4 @@ * modify a database table, field, or index that does not currently exist in * the database schema. */ -class SchemaObjectDoesNotExistException extends SchemaException implements DatabaseException { } +class SchemaObjectDoesNotExistException extends SchemaException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/SchemaObjectExistsException.php b/core/lib/Drupal/Core/Database/SchemaObjectExistsException.php index 855f577..576a85b 100644 --- a/core/lib/Drupal/Core/Database/SchemaObjectExistsException.php +++ b/core/lib/Drupal/Core/Database/SchemaObjectExistsException.php @@ -14,4 +14,4 @@ * create a new database table, field, or index that already exists in the * database schema. */ -class SchemaObjectExistsException extends SchemaException implements DatabaseException { } +class SchemaObjectExistsException extends SchemaException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/TransactionCommitFailedException.php b/core/lib/Drupal/Core/Database/TransactionCommitFailedException.php index bbce797..b7c0ae6 100644 --- a/core/lib/Drupal/Core/Database/TransactionCommitFailedException.php +++ b/core/lib/Drupal/Core/Database/TransactionCommitFailedException.php @@ -10,4 +10,4 @@ /** * Exception thrown when a commit() function fails. */ -class TransactionCommitFailedException extends TransactionException implements DatabaseException { } +class TransactionCommitFailedException extends TransactionException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/TransactionException.php b/core/lib/Drupal/Core/Database/TransactionException.php index 1045387..64d08af 100644 --- a/core/lib/Drupal/Core/Database/TransactionException.php +++ b/core/lib/Drupal/Core/Database/TransactionException.php @@ -10,4 +10,4 @@ /** * Exception thrown by an error in a database transaction. */ -class TransactionException extends \RuntimeException implements DatabaseException { } +class TransactionException extends \RuntimeException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/TransactionExplicitCommitNotAllowedException.php b/core/lib/Drupal/Core/Database/TransactionExplicitCommitNotAllowedException.php index 6d0f26c..9f64ec5 100644 --- a/core/lib/Drupal/Core/Database/TransactionExplicitCommitNotAllowedException.php +++ b/core/lib/Drupal/Core/Database/TransactionExplicitCommitNotAllowedException.php @@ -13,4 +13,4 @@ * This exception will be thrown when the PDO connection commit() is called. * Code should never call this method directly. */ -class TransactionExplicitCommitNotAllowedException extends TransactionException implements DatabaseException { } +class TransactionExplicitCommitNotAllowedException extends TransactionException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/TransactionNameNonUniqueException.php b/core/lib/Drupal/Core/Database/TransactionNameNonUniqueException.php index 9634a6d..e205329 100644 --- a/core/lib/Drupal/Core/Database/TransactionNameNonUniqueException.php +++ b/core/lib/Drupal/Core/Database/TransactionNameNonUniqueException.php @@ -10,4 +10,4 @@ /** * Exception thrown when a savepoint or transaction name occurs twice. */ -class TransactionNameNonUniqueException extends TransactionException implements DatabaseException { } +class TransactionNameNonUniqueException extends TransactionException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/TransactionNoActiveException.php b/core/lib/Drupal/Core/Database/TransactionNoActiveException.php index 6223c04..0c1454a 100644 --- a/core/lib/Drupal/Core/Database/TransactionNoActiveException.php +++ b/core/lib/Drupal/Core/Database/TransactionNoActiveException.php @@ -10,4 +10,4 @@ /** * Exception for when popTransaction() is called with no active transaction. */ -class TransactionNoActiveException extends TransactionException implements DatabaseException { } +class TransactionNoActiveException extends TransactionException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Database/TransactionOutOfOrderException.php b/core/lib/Drupal/Core/Database/TransactionOutOfOrderException.php index e127307..ad0f325 100644 --- a/core/lib/Drupal/Core/Database/TransactionOutOfOrderException.php +++ b/core/lib/Drupal/Core/Database/TransactionOutOfOrderException.php @@ -10,4 +10,4 @@ /** * Exception thrown when a rollback() resulted in other active transactions being rolled-back. */ -class TransactionOutOfOrderException extends TransactionException implements DatabaseException { } +class TransactionOutOfOrderException extends TransactionException implements DatabaseException {} diff --git a/core/lib/Drupal/Core/Diff/DiffFormatter.php b/core/lib/Drupal/Core/Diff/DiffFormatter.php index 2758351..2480f86 100644 --- a/core/lib/Drupal/Core/Diff/DiffFormatter.php +++ b/core/lib/Drupal/Core/Diff/DiffFormatter.php @@ -207,7 +207,7 @@ protected function _changed($orig, $closing) { // Notice that WordLevelDiff returns HTML-escaped output. Hence, we will be // calling addedLine/deletedLine without HTML-escaping. while ($line = array_shift($del)) { - $aline = array_shift( $add ); + $aline = array_shift($add ); $this->rows[] = array_merge($this->deletedLine($line), isset($aline) ? $this->addedLine($aline) : $this->emptyLine()); } diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index f2c8436..f135efe 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -883,7 +883,7 @@ public function removeTranslation($langcode) { * {@inheritdoc} */ public function getTranslationLanguages($include_default = TRUE) { - $translations = array_filter($this->translations, function($translation) { return $translation['status']; }); + $translations = array_filter($this->translations, function($translation) {return $translation['status']; }); unset($translations[LanguageInterface::LANGCODE_DEFAULT]); if ($include_default) { diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php index 6e6a74f..7f22cf8 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -108,32 +108,32 @@ protected function doCreate(array $values) { /** * {@inheritdoc} */ - public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) { } + public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) {} /** * {@inheritdoc} */ - public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) { } + public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) {} /** * {@inheritdoc} */ - public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) { } + public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) {} /** * {@inheritdoc} */ - public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definition) { } + public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definition) {} /** * {@inheritdoc} */ - public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) { } + public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) {} /** * {@inheritdoc} */ - public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definition) { } + public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definition) {} /** * {@inheritdoc} @@ -177,7 +177,7 @@ public function purgeFieldData(FieldDefinitionInterface $field_definition, $batc /** * {@inheritdoc} */ - public function finalizePurge(FieldStorageDefinitionInterface $storage_definition) { } + public function finalizePurge(FieldStorageDefinitionInterface $storage_definition) {} /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Entity/EntityMalformedException.php b/core/lib/Drupal/Core/Entity/EntityMalformedException.php index ab14448..5657d08 100644 --- a/core/lib/Drupal/Core/Entity/EntityMalformedException.php +++ b/core/lib/Drupal/Core/Entity/EntityMalformedException.php @@ -10,4 +10,4 @@ /** * Defines an exception thrown when a malformed entity is passed. */ -class EntityMalformedException extends \Exception { } +class EntityMalformedException extends \Exception {} diff --git a/core/lib/Drupal/Core/Entity/EntityStorageException.php b/core/lib/Drupal/Core/Entity/EntityStorageException.php index 082a2e2..8687037 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageException.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageException.php @@ -10,4 +10,4 @@ /** * Defines an exception thrown when storage operations fail. */ -class EntityStorageException extends \Exception { } +class EntityStorageException extends \Exception {} diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php index 2fcdce5..25965bb 100644 --- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php @@ -339,7 +339,7 @@ public function buildComponents(array &$build, array $entities, array $displays, * (optional) For which language the entity should be prepared, defaults to * the current content language. */ - protected function alterBuild(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode, $langcode = NULL) { } + protected function alterBuild(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode, $langcode = NULL) {} /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Entity/Exception/EntityTypeIdLengthException.php b/core/lib/Drupal/Core/Entity/Exception/EntityTypeIdLengthException.php index e1a4feb..b8c353c 100644 --- a/core/lib/Drupal/Core/Entity/Exception/EntityTypeIdLengthException.php +++ b/core/lib/Drupal/Core/Entity/Exception/EntityTypeIdLengthException.php @@ -10,4 +10,4 @@ /** * Defines an exception thrown when an entity ID is too long. */ -class EntityTypeIdLengthException extends \Exception { } +class EntityTypeIdLengthException extends \Exception {} diff --git a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php index f5fbf12..41a0d5a 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php +++ b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php @@ -35,12 +35,12 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta /** * {@inheritdoc} */ - public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { } + public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { } + public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} @@ -66,11 +66,11 @@ public function validateReferenceableEntities(array $ids) { /** * {@inheritdoc} */ - public function validateAutocompleteInput($input, &$element, FormStateInterface $form_state, $form, $strict = TRUE) { } + public function validateAutocompleteInput($input, &$element, FormStateInterface $form_state, $form, $strict = TRUE) {} /** * {@inheritdoc} */ - public function entityQueryAlter(SelectInterface $query) { } + public function entityQueryAlter(SelectInterface $query) {} } diff --git a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php index c67dc68..d8807d2 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php +++ b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/SelectionBase.php @@ -207,12 +207,12 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta /** * {@inheritdoc} */ - public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { } + public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { } + public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} @@ -356,7 +356,7 @@ protected function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') /** * {@inheritdoc} */ - public function entityQueryAlter(SelectInterface $query) { } + public function entityQueryAlter(SelectInterface $query) {} /** * Helper method: Passes a query to the alteration system again. diff --git a/core/lib/Drupal/Core/Entity/Query/QueryException.php b/core/lib/Drupal/Core/Entity/Query/QueryException.php index 074bf27..b567566 100644 --- a/core/lib/Drupal/Core/Entity/Query/QueryException.php +++ b/core/lib/Drupal/Core/Entity/Query/QueryException.php @@ -14,4 +14,4 @@ * conditions, and will raise a QueryException when an unsupported * condition was specified. */ -class QueryException extends \Exception { } +class QueryException extends \Exception {} diff --git a/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php b/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php index 472ed20..8593abd 100644 --- a/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php +++ b/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php @@ -295,9 +295,9 @@ public function requiresDedicatedTableStorage(FieldStorageDefinitionInterface $s */ public function getDedicatedTableNames() { $table_mapping = $this; - $definitions = array_filter($this->fieldStorageDefinitions, function($definition) use ($table_mapping) { return $table_mapping->requiresDedicatedTableStorage($definition); }); - $data_tables = array_map(function($definition) use ($table_mapping) { return $table_mapping->getDedicatedDataTableName($definition); }, $definitions); - $revision_tables = array_map(function($definition) use ($table_mapping) { return $table_mapping->getDedicatedRevisionTableName($definition); }, $definitions); + $definitions = array_filter($this->fieldStorageDefinitions, function($definition) use ($table_mapping) {return $table_mapping->requiresDedicatedTableStorage($definition); }); + $data_tables = array_map(function($definition) use ($table_mapping) {return $table_mapping->getDedicatedDataTableName($definition); }, $definitions); + $revision_tables = array_map(function($definition) use ($table_mapping) {return $table_mapping->getDedicatedRevisionTableName($definition); }, $definitions); $dedicated_tables = array_merge(array_values($data_tables), array_values($revision_tables)); return $dedicated_tables; } diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php index e1283be..74c58c2 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php @@ -1486,12 +1486,12 @@ public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definiti /** * {@inheritdoc} */ - public function onBundleCreate($bundle, $entity_type_id) { } + public function onBundleCreate($bundle, $entity_type_id) {} /** * {@inheritdoc} */ - public function onBundleDelete($bundle, $entity_type_id) { } + public function onBundleDelete($bundle, $entity_type_id) {} /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 6368b080..fd2f741 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1459,7 +1459,7 @@ protected function createEntitySchemaIndexes(array $entity_schema, FieldStorageD // involving them. Only indexes for which all columns exist are // actually created. $create = FALSE; - $specifier_columns = array_map(function($item) { return is_string($item) ? $item : reset($item); }, $specifier); + $specifier_columns = array_map(function($item) {return is_string($item) ? $item : reset($item); }, $specifier); if (!isset($column_names) || array_intersect($specifier_columns, $column_names)) { $create = TRUE; foreach ($specifier_columns as $specifier_column_name) { @@ -1508,7 +1508,7 @@ protected function deleteEntitySchemaIndexes(array $entity_schema_data, FieldSto foreach ($index_keys as $key => $drop_method) { if (!empty($schema[$key])) { foreach ($schema[$key] as $name => $specifier) { - $specifier_columns = array_map(function($item) { return is_string($item) ? $item : reset($item); }, $specifier); + $specifier_columns = array_map(function($item) {return is_string($item) ? $item : reset($item); }, $specifier); if (!isset($column_names) || array_intersect($specifier_columns, $column_names)) { $schema_handler->{$drop_method}($table_name, $name); } diff --git a/core/lib/Drupal/Core/Extension/ExtensionNameLengthException.php b/core/lib/Drupal/Core/Extension/ExtensionNameLengthException.php index 8930d1e..05f648a 100644 --- a/core/lib/Drupal/Core/Extension/ExtensionNameLengthException.php +++ b/core/lib/Drupal/Core/Extension/ExtensionNameLengthException.php @@ -10,4 +10,4 @@ /** * Exception thrown when the extension's name length exceeds the allowed maximum. */ -class ExtensionNameLengthException extends \Exception { } +class ExtensionNameLengthException extends \Exception {} diff --git a/core/lib/Drupal/Core/Extension/ModuleUninstallValidatorException.php b/core/lib/Drupal/Core/Extension/ModuleUninstallValidatorException.php index c28240e..99d22b6 100644 --- a/core/lib/Drupal/Core/Extension/ModuleUninstallValidatorException.php +++ b/core/lib/Drupal/Core/Extension/ModuleUninstallValidatorException.php @@ -10,4 +10,4 @@ /** * Defines an exception thrown when uninstalling a module that did not validate. */ -class ModuleUninstallValidatorException extends \InvalidArgumentException { } +class ModuleUninstallValidatorException extends \InvalidArgumentException {} diff --git a/core/lib/Drupal/Core/Field/FieldItemBase.php b/core/lib/Drupal/Core/Field/FieldItemBase.php index 8e50c6a..bfcfe56 100644 --- a/core/lib/Drupal/Core/Field/FieldItemBase.php +++ b/core/lib/Drupal/Core/Field/FieldItemBase.php @@ -196,27 +196,27 @@ public function view($display_options = array()) { /** * {@inheritdoc} */ - public function preSave() { } + public function preSave() {} /** * {@inheritdoc} */ - public function postSave($update) { } + public function postSave($update) {} /** * {@inheritdoc} */ - public function delete() { } + public function delete() {} /** * {@inheritdoc} */ - public static function generateSampleValue(FieldDefinitionInterface $field_definition) { } + public static function generateSampleValue(FieldDefinitionInterface $field_definition) {} /** * {@inheritdoc} */ - public function deleteRevision() { } + public function deleteRevision() {} /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Field/FormatterBase.php b/core/lib/Drupal/Core/Field/FormatterBase.php index a6c8cc8..8552c93 100644 --- a/core/lib/Drupal/Core/Field/FormatterBase.php +++ b/core/lib/Drupal/Core/Field/FormatterBase.php @@ -124,7 +124,7 @@ public function settingsSummary() { /** * {@inheritdoc} */ - public function prepareView(array $entities_items) { } + public function prepareView(array $entities_items) {} /** * Returns the array of field settings. diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php index cde5684..7d2fa42 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php @@ -200,6 +200,6 @@ protected function sanitizeLabel(&$label) { * @return string|NULL * Either a label of the empty option, or NULL. */ - protected function getEmptyLabel() { } + protected function getEmptyLabel() {} } diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php index 4481af3..d4e01c2 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php @@ -79,7 +79,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi /** * {@inheritdoc} */ - public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { } + public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php b/core/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php index dc4a107..24a40aa 100644 --- a/core/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php +++ b/core/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php @@ -64,17 +64,17 @@ public function getAll() { /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::set(). */ - public function set($key, $value) { } + public function set($key, $value) {} /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::setIfNotExists(). */ - public function setIfNotExists($key, $value) { } + public function setIfNotExists($key, $value) {} /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::setMultiple(). */ - public function setMultiple(array $data) { } + public function setMultiple(array $data) {} /** * {@inheritdoc} @@ -85,17 +85,17 @@ public function rename($key, $new_key) { /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::delete(). */ - public function delete($key) { } + public function delete($key) {} /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::deleteMultiple(). */ - public function deleteMultiple(array $keys) { } + public function deleteMultiple(array $keys) {} /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::deleteAll(). */ - public function deleteAll() { } + public function deleteAll() {} /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::getCollectionName(). @@ -107,16 +107,16 @@ public function getCollectionName() { /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface::setMultipleWithExpire(). */ - public function setMultipleWithExpire(array $data, $expire) { } + public function setMultipleWithExpire(array $data, $expire) {} /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface::setWithExpire(). */ - public function setWithExpire($key, $value, $expire) { } + public function setWithExpire($key, $value, $expire) {} /** * Implements Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface::setWithExpireIfNotExists(). */ - public function setWithExpireIfNotExists($key, $value, $expire) { } + public function setWithExpireIfNotExists($key, $value, $expire) {} } diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index c2e03c9..443570d 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -330,7 +330,7 @@ protected function doRender(&$elements, $is_root_call = FALSE) { if (count($elements['#lazy_builder']) !== 2) { throw new \DomainException('The #lazy_builder property must have an array as a value, containing two values: the callback, and the arguments for the callback.'); } - if (count($elements['#lazy_builder'][1]) !== count(array_filter($elements['#lazy_builder'][1], function($v) { return is_null($v) || is_scalar($v); }))) { + if (count($elements['#lazy_builder'][1]) !== count(array_filter($elements['#lazy_builder'][1], function($v) {return is_null($v) || is_scalar($v); }))) { throw new \DomainException("A #lazy_builder callback's context may only contain scalar values or NULL."); } $children = Element::children($elements); diff --git a/core/lib/Drupal/Core/Routing/GeneratorNotInitializedException.php b/core/lib/Drupal/Core/Routing/GeneratorNotInitializedException.php index 71225f5..c154ff3 100644 --- a/core/lib/Drupal/Core/Routing/GeneratorNotInitializedException.php +++ b/core/lib/Drupal/Core/Routing/GeneratorNotInitializedException.php @@ -9,4 +9,4 @@ /** * Class for exceptions thrown when the generator has not been initialized. */ -class GeneratorNotInitializedException extends \Exception { } +class GeneratorNotInitializedException extends \Exception {} diff --git a/core/lib/Drupal/Core/Utility/UpdateException.php b/core/lib/Drupal/Core/Utility/UpdateException.php index 889baa1..f5ecd83 100644 --- a/core/lib/Drupal/Core/Utility/UpdateException.php +++ b/core/lib/Drupal/Core/Utility/UpdateException.php @@ -10,4 +10,4 @@ /** * Exception class used to throw error if a module update fails. */ -class UpdateException extends \Exception { } +class UpdateException extends \Exception {} diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/IsNullConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/IsNullConstraint.php index 714a0d2..554906d 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/IsNullConstraint.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/IsNullConstraint.php @@ -20,4 +20,4 @@ * type = false * ) */ -class IsNullConstraint extends IsNull { } +class IsNullConstraint extends IsNull {} diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php index ec4569c..2042a7d 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php @@ -20,4 +20,4 @@ * type = false * ) */ -class NotNullConstraint extends NotNull { } +class NotNullConstraint extends NotNull {} diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php index bd360f6..76c9040 100644 --- a/core/modules/block/src/Tests/BlockTest.php +++ b/core/modules/block/src/Tests/BlockTest.php @@ -287,7 +287,7 @@ function moveBlockToRegion(array $block, $region) { $this->drupalPostForm('admin/structure/block', $edit, t('Save blocks')); // Confirm that the block was moved to the proper region. - $this->assertText(t('The block settings have been updated.'), format_string('Block successfully moved to %region_name region.', array( '%region_name' => $region))); + $this->assertText(t('The block settings have been updated.'), format_string('Block successfully moved to %region_name region.', array('%region_name' => $region))); // Confirm that the block is being displayed. $this->drupalGet(''); diff --git a/core/modules/comment/src/Tests/CommentNonNodeTest.php b/core/modules/comment/src/Tests/CommentNonNodeTest.php index 8d8e38b..921f60b 100644 --- a/core/modules/comment/src/Tests/CommentNonNodeTest.php +++ b/core/modules/comment/src/Tests/CommentNonNodeTest.php @@ -159,7 +159,7 @@ function postComment(EntityInterface $entity, $comment, $subject = '', $contact preg_match('/#comment-([0-9]+)/', $this->getURL(), $match); // Get comment. - if ($contact !== TRUE) { // If true then attempting to find error message. + if ($contact !== TRUE) {// If true then attempting to find error message. if ($subject) { $this->assertText($subject, 'Comment subject posted.'); } diff --git a/core/modules/comment/src/Tests/CommentTestBase.php b/core/modules/comment/src/Tests/CommentTestBase.php index 12ea894..17f632a 100644 --- a/core/modules/comment/src/Tests/CommentTestBase.php +++ b/core/modules/comment/src/Tests/CommentTestBase.php @@ -161,7 +161,7 @@ public function postComment($entity, $comment, $subject = '', $contact = NULL, $ preg_match('/#comment-([0-9]+)/', $this->getURL(), $match); // Get comment. - if ($contact !== TRUE) { // If true then attempting to find error message. + if ($contact !== TRUE) {// If true then attempting to find error message. if ($subject) { $this->assertText($subject, 'Comment subject posted.'); } diff --git a/core/modules/content_translation/src/Tests/ContentTranslationSyncUnitTest.php b/core/modules/content_translation/src/Tests/ContentTranslationSyncUnitTest.php index 53c5b0a..95360bd 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationSyncUnitTest.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationSyncUnitTest.php @@ -186,13 +186,13 @@ public function testMultipleSyncedValues() { // their delta. $delta_callbacks = array( // Continuous field values: all values are equal. - function($delta) { return TRUE; }, + function($delta) {return TRUE; }, // Alternated field values: only the even ones are equal. - function($delta) { return $delta % 2 !== 0; }, + function($delta) {return $delta % 2 !== 0; }, // Sparse field values: only the "middle" ones are equal. - function($delta) { return $delta === 1 || $delta === 2; }, + function($delta) {return $delta === 1 || $delta === 2; }, // Sparse field values: only the "extreme" ones are equal. - function($delta) { return $delta === 0 || $delta === 3; }, + function($delta) {return $delta === 0 || $delta === 3; }, ); foreach ($delta_callbacks as $delta_callback) { diff --git a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php index 12261b4..926ac4b 100644 --- a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php +++ b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php @@ -153,6 +153,6 @@ public function render(ResultRow $values) { /** * {@inheritdoc} */ - public function query() { } + public function query() {} } diff --git a/core/modules/editor/src/Tests/EditorLoadingTest.php b/core/modules/editor/src/Tests/EditorLoadingTest.php index 002ccd3..d10dced 100644 --- a/core/modules/editor/src/Tests/EditorLoadingTest.php +++ b/core/modules/editor/src/Tests/EditorLoadingTest.php @@ -131,7 +131,7 @@ public function testLoading() { // - doesn't have access to the full_html text format, so: no text editor. $this->drupalLogin($this->normalUser); $this->drupalGet('node/add/article'); - list( , $editor_settings_present, $editor_js_present, $body, $format_selector) = $this->getThingsToCheck('body'); + list(, $editor_settings_present, $editor_js_present, $body, $format_selector) = $this->getThingsToCheck('body'); $this->assertFalse($editor_settings_present, 'No Text Editor module settings.'); $this->assertFalse($editor_js_present, 'No Text Editor JavaScript.'); $this->assertTrue(count($body) === 1, 'A body field exists.'); @@ -206,7 +206,7 @@ public function testLoading() { // that (s)he is not allowed to use. The editor is still loaded. CKEditor, // for example, supports being loaded in a disabled state. $this->drupalGet('node/1/edit'); - list( , $editor_settings_present, $editor_js_present, $body, $format_selector) = $this->getThingsToCheck('body'); + list(, $editor_settings_present, $editor_js_present, $body, $format_selector) = $this->getThingsToCheck('body'); $this->assertTrue($editor_settings_present, 'Text Editor module settings.'); $this->assertTrue($editor_js_present, 'Text Editor JavaScript.'); $this->assertTrue(count($body) === 1, 'A body field exists.'); @@ -245,7 +245,7 @@ public function testSupportedElementTypes() { // Assert the unicorn editor works with textfields. $this->drupalLogin($this->privilegedUser); $this->drupalGet('node/1/edit'); - list( , $editor_settings_present, $editor_js_present, $field, $format_selector) = $this->getThingsToCheck('field-text', 'input'); + list(, $editor_settings_present, $editor_js_present, $field, $format_selector) = $this->getThingsToCheck('field-text', 'input'); $this->assertTrue($editor_settings_present, "Text Editor module's JavaScript settings are on the page."); $this->assertTrue($editor_js_present, 'Text Editor JavaScript is present.'); $this->assertTrue(count($field) === 1, 'A text field exists.'); @@ -261,7 +261,7 @@ public function testSupportedElementTypes() { ))->save(); $this->drupalGet('node/1/edit'); - list( , $editor_settings_present, $editor_js_present, $field, $format_selector) = $this->getThingsToCheck('field-text', 'input'); + list(, $editor_settings_present, $editor_js_present, $field, $format_selector) = $this->getThingsToCheck('field-text', 'input'); $this->assertFalse($editor_settings_present, "Text Editor module's JavaScript settings are not on the page."); $this->assertFalse($editor_js_present, 'Text Editor JavaScript is not present.'); $this->assertTrue(count($field) === 1, 'A text field exists.'); diff --git a/core/modules/field_ui/src/Tests/EntityDisplayTest.php b/core/modules/field_ui/src/Tests/EntityDisplayTest.php index 75968b2..9587c3b 100644 --- a/core/modules/field_ui/src/Tests/EntityDisplayTest.php +++ b/core/modules/field_ui/src/Tests/EntityDisplayTest.php @@ -125,7 +125,7 @@ public function testEntityDisplayCRUDSort() { $display->save(); $components = array_keys($display->getComponents()); // The name field is not configurable so will be added automatically. - $expected = array ( 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name'); + $expected = array (0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name'); $this->assertIdentical($components, $expected); } @@ -146,7 +146,7 @@ public function testEntityGetDisplay() { $display = entity_get_display('entity_test', 'entity_test', 'default'); $this->assertFalse($display->isNew()); $this->assertEqual($display->id(), 'entity_test.entity_test.default'); - $this->assertEqual($display->getComponent('component_1'), array( 'weight' => 10, 'settings' => array(), 'third_party_settings' => array())); + $this->assertEqual($display->getComponent('component_1'), array('weight' => 10, 'settings' => array(), 'third_party_settings' => array())); } /** diff --git a/core/modules/file/src/FileAccessFormatterControlHandlerInterface.php b/core/modules/file/src/FileAccessFormatterControlHandlerInterface.php index 98d3a08..d926310 100644 --- a/core/modules/file/src/FileAccessFormatterControlHandlerInterface.php +++ b/core/modules/file/src/FileAccessFormatterControlHandlerInterface.php @@ -27,4 +27,4 @@ * * @see \Drupal\file\Plugin\Field\FieldFormatter\FileFormatterBase::needsAccessCheck() */ -interface FileAccessFormatterControlHandlerInterface extends EntityAccessControlHandlerInterface { } +interface FileAccessFormatterControlHandlerInterface extends EntityAccessControlHandlerInterface {} diff --git a/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php b/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php index 90dcaa9..07dc4d5 100644 --- a/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php +++ b/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php @@ -18,7 +18,7 @@ class FileFieldItemList extends EntityReferenceFieldItemList { /** * {@inheritdoc} */ - public function defaultValuesForm(array &$form, FormStateInterface $form_state) { } + public function defaultValuesForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} diff --git a/core/modules/filter/src/Plugin/DataType/FilterFormat.php b/core/modules/filter/src/Plugin/DataType/FilterFormat.php index 74279f0..b0058b1 100644 --- a/core/modules/filter/src/Plugin/DataType/FilterFormat.php +++ b/core/modules/filter/src/Plugin/DataType/FilterFormat.php @@ -32,7 +32,7 @@ public function getPossibleValues(AccountInterface $account = NULL) { * {@inheritdoc} */ public function getPossibleOptions(AccountInterface $account = NULL) { - return array_map(function ($format) { return $format->label(); }, filter_formats()); + return array_map(function ($format) {return $format->label(); }, filter_formats()); } /** @@ -47,6 +47,6 @@ public function getSettableValues(AccountInterface $account = NULL) { */ public function getSettableOptions(AccountInterface $account = NULL) { // @todo: Avoid calling functions but move to injected dependencies. - return array_map(function ($format) { return $format->label(); }, filter_formats($account)); + return array_map(function ($format) {return $format->label(); }, filter_formats($account)); } } diff --git a/core/modules/forum/src/ForumIndexStorage.php b/core/modules/forum/src/ForumIndexStorage.php index b50f29b..528347c 100644 --- a/core/modules/forum/src/ForumIndexStorage.php +++ b/core/modules/forum/src/ForumIndexStorage.php @@ -108,7 +108,7 @@ public function updateIndex(NodeInterface $node) { ':status' => CommentInterface::PUBLISHED, ))->fetchObject(); $this->database->update('forum_index') - ->fields( array( + ->fields(array( 'comment_count' => $count, 'last_comment_timestamp' => $last_reply->created, )) @@ -119,7 +119,7 @@ public function updateIndex(NodeInterface $node) { // Comments do not exist. // @todo This should be actually filtering on the desired node language $this->database->update('forum_index') - ->fields( array( + ->fields(array( 'comment_count' => 0, 'last_comment_timestamp' => $node->getCreatedTime(), )) diff --git a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php index fa0c2d4..9f32acc 100644 --- a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php +++ b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php @@ -193,7 +193,7 @@ function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_slash = else { // Check for PNG-Signature (cf. http://www.libpng.org/pub/png/book/chapter08.html#png.ch08.div.2) in the // response body. - $this->assertNoRaw( chr(137) . chr(80) . chr(78) . chr(71) . chr(13) . chr(10) . chr(26) . chr(10), 'No PNG signature found in the response body.'); + $this->assertNoRaw(chr(137) . chr(80) . chr(78) . chr(71) . chr(13) . chr(10) . chr(26) . chr(10), 'No PNG signature found in the response body.'); } } elseif ($clean_url) { diff --git a/core/modules/migrate/tests/src/Unit/MigrateTestCase.php b/core/modules/migrate/tests/src/Unit/MigrateTestCase.php index 768e0fc..1209b69 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateTestCase.php +++ b/core/modules/migrate/tests/src/Unit/MigrateTestCase.php @@ -139,7 +139,7 @@ protected function getDatabase(array $database_contents, $connection_options = [ protected function createSchemaFromRow(array $row) { // SQLite uses loose ("affinity") typing, so it's OK for every column // to be a text field. - $fields = array_map(function() { return ['type' => 'text']; }, $row); + $fields = array_map(function() {return ['type' => 'text']; }, $row); return ['fields' => $fields]; } diff --git a/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php index 5e024d6..6f13a4f 100644 --- a/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php +++ b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php @@ -162,6 +162,6 @@ protected function entityQueryExpects($count) { ->will($this->returnValue($this->entityQuery)); $this->entityQuery->expects($this->exactly($count + 1)) ->method('execute') - ->will($this->returnCallback(function () use (&$count) { return $count--;})); + ->will($this->returnCallback(function () use (&$count) {return $count--;})); } } diff --git a/core/modules/migrate/tests/src/Unit/process/GetTest.php b/core/modules/migrate/tests/src/Unit/process/GetTest.php index bdcf27c..335f080 100644 --- a/core/modules/migrate/tests/src/Unit/process/GetTest.php +++ b/core/modules/migrate/tests/src/Unit/process/GetTest.php @@ -48,7 +48,7 @@ public function testTransformSourceArray() { $this->plugin->setSource(array('test1', 'test2')); $this->row->expects($this->exactly(2)) ->method('getSourceProperty') - ->will($this->returnCallback(function ($argument) use ($map) { return $map[$argument]; } )); + ->will($this->returnCallback(function ($argument) use ($map) {return $map[$argument]; } )); $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); $this->assertSame($value, array('source_value1', 'source_value2')); } @@ -79,7 +79,7 @@ public function testTransformSourceArrayAt() { $this->plugin->setSource(array('test1', '@@test2', '@@test3', 'test4')); $this->row->expects($this->exactly(4)) ->method('getSourceProperty') - ->will($this->returnCallback(function ($argument) use ($map) { return $map[$argument]; } )); + ->will($this->returnCallback(function ($argument) use ($map) {return $map[$argument]; } )); $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); $this->assertSame($value, array('source_value1', 'source_value2', 'source_value3', 'source_value4')); } diff --git a/core/modules/node/src/Entity/NodeRouteProvider.php b/core/modules/node/src/Entity/NodeRouteProvider.php index fa1c02d..584576a 100644 --- a/core/modules/node/src/Entity/NodeRouteProvider.php +++ b/core/modules/node/src/Entity/NodeRouteProvider.php @@ -20,7 +20,7 @@ class NodeRouteProvider implements EntityRouteProviderInterface { /** * {@inheritdoc} */ - public function getRoutes( EntityTypeInterface $entity_type) { + public function getRoutes(EntityTypeInterface $entity_type) { $route_collection = new RouteCollection(); $route = (new Route('/node/{node}')) ->addDefaults([ diff --git a/core/modules/node/src/Plugin/views/filter/Access.php b/core/modules/node/src/Plugin/views/filter/Access.php index 761f8de..2d19d7e 100644 --- a/core/modules/node/src/Plugin/views/filter/Access.php +++ b/core/modules/node/src/Plugin/views/filter/Access.php @@ -19,8 +19,8 @@ */ class Access extends FilterPluginBase { - public function adminSummary() { } - protected function operatorForm(&$form, FormStateInterface $form_state) { } + public function adminSummary() {} + protected function operatorForm(&$form, FormStateInterface $form_state) {} public function canExpose() { return FALSE; } diff --git a/core/modules/node/src/Plugin/views/filter/Status.php b/core/modules/node/src/Plugin/views/filter/Status.php index 5e119e5..6d3e458 100644 --- a/core/modules/node/src/Plugin/views/filter/Status.php +++ b/core/modules/node/src/Plugin/views/filter/Status.php @@ -19,11 +19,11 @@ */ class Status extends FilterPluginBase { - public function adminSummary() { } + public function adminSummary() {} - protected function operatorForm(&$form, FormStateInterface $form_state) { } + protected function operatorForm(&$form, FormStateInterface $form_state) {} - public function canExpose() { return FALSE; } + public function canExpose() {return FALSE; } public function query() { $table = $this->ensureMyTable(); diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php index bbca170..e8a0da9 100644 --- a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php +++ b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php @@ -225,7 +225,7 @@ protected static function extractAllowedValues($string, $has_data) { * @return string * The error message if the specified value is invalid, NULL otherwise. */ - protected static function validateAllowedValue($option) { } + protected static function validateAllowedValue($option) {} /** * Generates a string representation of an array of 'allowed values'. diff --git a/core/modules/options/src/Tests/OptionsFieldUITest.php b/core/modules/options/src/Tests/OptionsFieldUITest.php index d4219c6..1e3db45 100644 --- a/core/modules/options/src/Tests/OptionsFieldUITest.php +++ b/core/modules/options/src/Tests/OptionsFieldUITest.php @@ -98,7 +98,7 @@ function testOptionsAllowedValuesInteger() { $node = $this->drupalCreateNode($settings); // Check that a flat list of values is rejected once the field has data. - $this->assertAllowedValuesInput( "Zero\nOne", 'invalid input', 'Unkeyed lists are rejected once the field has data.'); + $this->assertAllowedValuesInput("Zero\nOne", 'invalid input', 'Unkeyed lists are rejected once the field has data.'); // Check that values can be added but values in use cannot be removed. $string = "0|Zero\n1|One\n2|Two"; diff --git a/core/modules/page_cache/src/StackMiddleware/PageCache.php b/core/modules/page_cache/src/StackMiddleware/PageCache.php index 1629c14..3939722 100644 --- a/core/modules/page_cache/src/StackMiddleware/PageCache.php +++ b/core/modules/page_cache/src/StackMiddleware/PageCache.php @@ -166,7 +166,7 @@ protected function lookup(Request $request, $type = self::MASTER_REQUEST, $catch if ($if_modified_since && $if_none_match && $if_none_match == $response->getEtag() // etag must match - && $if_modified_since == $last_modified->getTimestamp()) { // if-modified-since must match + && $if_modified_since == $last_modified->getTimestamp()) {// if-modified-since must match $response->setStatusCode(304); $response->setContent(NULL); diff --git a/core/modules/page_cache/tests/modules/src/Form/TestForm.php b/core/modules/page_cache/tests/modules/src/Form/TestForm.php index 535f2b2..a48c430 100644 --- a/core/modules/page_cache/tests/modules/src/Form/TestForm.php +++ b/core/modules/page_cache/tests/modules/src/Form/TestForm.php @@ -30,6 +30,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function submitForm(array &$form, FormStateInterface $form_state) { } + public function submitForm(array &$form, FormStateInterface $form_state) {} } diff --git a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php index 2c17ed6..6aee052 100644 --- a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php +++ b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php @@ -181,7 +181,7 @@ function testSearchModuleDisabling() { $this->submitGetForm('node', $terms, t('Search')); $current = $this->getURL(); $expected = \Drupal::url('search.view_' . $entity->id(), array(), array('query' => array('keys' => $info['keys']), 'absolute' => TRUE)); - $this->assertEqual( $current, $expected, 'Block redirected to right search page'); + $this->assertEqual($current, $expected, 'Block redirected to right search page'); // Try an invalid search path, which should 404. $this->drupalGet('search/not_a_plugin_path'); diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php index 41d114e..52de843 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php @@ -178,7 +178,7 @@ function stubTest() { // along by the rethrow. assert(FALSE, 'Lorem Ipsum'); } - catch ( \AssertionError $e ) { + catch (\AssertionError $e ) { $this->assertEqual($e->getMessage(), 'Lorem Ipsum', 'Runtime assertions Enabled and running.'); } } diff --git a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Rotate.php b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Rotate.php index e7e3a6c..be1f1c2 100644 --- a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Rotate.php +++ b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Rotate.php @@ -50,7 +50,7 @@ protected function validateArguments(array $arguments) { // Validate or set background color argument. if (!empty($arguments['background'])) { // Validate the background color: Color::hexToRgb does so for us. - $background = Color::hexToRgb($arguments['background']) + array( 'alpha' => 0 ); + $background = Color::hexToRgb($arguments['background']) + array('alpha' => 0 ); } else { // Background color is not specified: use transparent white as background. diff --git a/core/modules/system/src/Tests/Database/FakeRecord.php b/core/modules/system/src/Tests/Database/FakeRecord.php index a5e94b7..55452fc 100644 --- a/core/modules/system/src/Tests/Database/FakeRecord.php +++ b/core/modules/system/src/Tests/Database/FakeRecord.php @@ -14,4 +14,4 @@ * rather than just a stdClass or array. This class is for testing that * functionality. (See testQueryFetchClass() below) */ -class FakeRecord { } +class FakeRecord {} diff --git a/core/modules/system/src/Tests/Entity/Element/EntityAutocompleteElementFormTest.php b/core/modules/system/src/Tests/Entity/Element/EntityAutocompleteElementFormTest.php index 0fdd9af..a9eb593 100644 --- a/core/modules/system/src/Tests/Entity/Element/EntityAutocompleteElementFormTest.php +++ b/core/modules/system/src/Tests/Entity/Element/EntityAutocompleteElementFormTest.php @@ -160,12 +160,12 @@ public function buildForm(array $form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function submitForm(array &$form, FormStateInterface $form_state) { } + public function submitForm(array &$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function validateForm(array &$form, FormStateInterface $form_state) { } + public function validateForm(array &$form, FormStateInterface $form_state) {} /** * Tests valid entries in the EntityAutocomplete Form API element. diff --git a/core/modules/system/src/Tests/Form/ElementsTableSelectTest.php b/core/modules/system/src/Tests/Form/ElementsTableSelectTest.php index 22622e7..39dd347 100644 --- a/core/modules/system/src/Tests/Form/ElementsTableSelectTest.php +++ b/core/modules/system/src/Tests/Form/ElementsTableSelectTest.php @@ -77,7 +77,7 @@ function testTableselectColSpan() { // The first two body rows should each have 5 table cells: One for the // radio, one cell in the first column, one cell in the second column, // and two cells in the third column which has colspan 2. - for ( $i = 0; $i <= 1; $i++) { + for ($i = 0; $i <= 1; $i++) { $this->assertEqual(count($table_body[0]->tr[$i]->td), 5, format_string('There are five cells in row @row.', array('@row' => $i))); } // The third row should have 3 cells, one for the radio, one spanning the diff --git a/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObject.php b/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObject.php index b2f8f8b..c025dad 100644 --- a/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObject.php +++ b/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObject.php @@ -7,4 +7,4 @@ namespace Drupal\early_rendering_controller_test; -class TestDomainObject { } +class TestDomainObject {} diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/FruitInterface.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/FruitInterface.php index 4c26071..6cc11ae 100644 --- a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/FruitInterface.php +++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/FruitInterface.php @@ -10,5 +10,5 @@ /** * Provides an interface for test plugins. */ -interface FruitInterface { } +interface FruitInterface {} diff --git a/core/modules/system/tests/themes/test_theme/src/ThemeClass.php b/core/modules/system/tests/themes/test_theme/src/ThemeClass.php index 4ed3f53..917b8b1 100644 --- a/core/modules/system/tests/themes/test_theme/src/ThemeClass.php +++ b/core/modules/system/tests/themes/test_theme/src/ThemeClass.php @@ -10,4 +10,4 @@ /** * Represents a random class, used to test if themes can provide classes. */ -class ThemeClass { } +class ThemeClass {} diff --git a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php index bede035..9e55b88 100644 --- a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php +++ b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php @@ -22,9 +22,9 @@ */ class IndexTidDepthModifier extends ArgumentPluginBase { - public function buildOptionsForm(&$form, FormStateInterface $form_state) { } + public function buildOptionsForm(&$form, FormStateInterface $form_state) {} - public function query($group_by = FALSE) { } + public function query($group_by = FALSE) {} public function preQuery() { // We don't know our argument yet, but it's based upon our position: diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php index 01086b0..9b63115 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -89,9 +89,9 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o } } - public function hasExtraOptions() { return TRUE; } + public function hasExtraOptions() {return TRUE; } - public function getValueOptions() { /* don't overwrite the value options */ } + public function getValueOptions() {/* don't overwrite the value options */ } protected function defineOptions() { $options = parent::defineOptions(); diff --git a/core/modules/taxonomy/src/Tests/TermKernelTest.php b/core/modules/taxonomy/src/Tests/TermKernelTest.php index 9074375..d20329d 100644 --- a/core/modules/taxonomy/src/Tests/TermKernelTest.php +++ b/core/modules/taxonomy/src/Tests/TermKernelTest.php @@ -23,7 +23,7 @@ class TermKernelTest extends KernelTestBase { /** * {@inheritdoc} */ - public static $modules = array( 'filter', 'taxonomy', 'text', 'user' ); + public static $modules = array('filter', 'taxonomy', 'text', 'user' ); /** * {@inheritdoc} diff --git a/core/modules/text/src/Plugin/Field/FieldFormatter/TextSummaryOrTrimmedFormatter.php b/core/modules/text/src/Plugin/Field/FieldFormatter/TextSummaryOrTrimmedFormatter.php index 604e7b9..f3f8d99 100644 --- a/core/modules/text/src/Plugin/Field/FieldFormatter/TextSummaryOrTrimmedFormatter.php +++ b/core/modules/text/src/Plugin/Field/FieldFormatter/TextSummaryOrTrimmedFormatter.php @@ -21,4 +21,4 @@ * } * ) */ -class TextSummaryOrTrimmedFormatter extends TextTrimmedFormatter { } +class TextSummaryOrTrimmedFormatter extends TextTrimmedFormatter {} diff --git a/core/modules/toolbar/toolbar.api.php b/core/modules/toolbar/toolbar.api.php index bcddaf8..bba2568 100644 --- a/core/modules/toolbar/toolbar.api.php +++ b/core/modules/toolbar/toolbar.api.php @@ -108,7 +108,7 @@ function hook_toolbar() { '#heading' => t('Shopping cart actions'), 'shopping_cart' => array( '#theme' => 'item_list', - '#items' => array( /* An item list renderable array */ ), + '#items' => array(/* An item list renderable array */ ), ), ), '#weight' => 150, diff --git a/core/modules/user/src/Plugin/views/filter/Name.php b/core/modules/user/src/Plugin/views/filter/Name.php index 5794b62..0ca1426 100644 --- a/core/modules/user/src/Plugin/views/filter/Name.php +++ b/core/modules/user/src/Plugin/views/filter/Name.php @@ -103,7 +103,7 @@ protected function valueSubmit($form, FormStateInterface $form_state) { } // Override to do nothing. - public function getValueOptions() { } + public function getValueOptions() {} public function adminSummary() { // set up $this->valueOptions for the parent summary diff --git a/core/modules/user/src/Tests/UserPasswordResetTest.php b/core/modules/user/src/Tests/UserPasswordResetTest.php index e54dc96..97f1602 100644 --- a/core/modules/user/src/Tests/UserPasswordResetTest.php +++ b/core/modules/user/src/Tests/UserPasswordResetTest.php @@ -138,7 +138,7 @@ function testUserPasswordReset() { $before = count($this->drupalGetMails(array('id' => 'user_password_reset'))); $edit = array('name' => $this->account->getEmail()); $this->drupalPostForm(NULL, $edit, t('Submit')); - $this->assertTrue( count($this->drupalGetMails(array('id' => 'user_password_reset'))) === $before + 1, 'Email sent when requesting password reset using email address.'); + $this->assertTrue(count($this->drupalGetMails(array('id' => 'user_password_reset'))) === $before + 1, 'Email sent when requesting password reset using email address.'); // Create a password reset link as if the request time was 60 seconds older than the allowed limit. $timeout = $this->config('user.settings')->get('password_reset_timeout'); diff --git a/core/modules/user/src/Tests/UserValidationTest.php b/core/modules/user/src/Tests/UserValidationTest.php index b419103..51950c9 100644 --- a/core/modules/user/src/Tests/UserValidationTest.php +++ b/core/modules/user/src/Tests/UserValidationTest.php @@ -47,7 +47,7 @@ protected function setUp() { * Tests user name validation. */ function testUsernames() { - $test_cases = array( // '' => array('', 'assert'), + $test_cases = array(// '' => array('', 'assert'), 'foo' => array('Valid username', 'assertNull'), 'FOO' => array('Valid username', 'assertNull'), 'Foo O\'Bar' => array('Valid username', 'assertNull'), diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php index c6ae4b7..1536668 100644 --- a/core/modules/views/src/Plugin/views/HandlerBase.php +++ b/core/modules/views/src/Plugin/views/HandlerBase.php @@ -377,80 +377,80 @@ public function submitGroupByForm(&$form, FormStateInterface $form_state) { * If a handler has 'extra options' it will get a little settings widget and * another form called extra_options. */ - public function hasExtraOptions() { return FALSE; } + public function hasExtraOptions() {return FALSE; } /** * Provide defaults for the handler. */ - public function defineExtraOptions(&$option) { } + public function defineExtraOptions(&$option) {} /** * Provide a form for setting options. */ - public function buildExtraOptionsForm(&$form, FormStateInterface $form_state) { } + public function buildExtraOptionsForm(&$form, FormStateInterface $form_state) {} /** * Validate the options form. */ - public function validateExtraOptionsForm($form, FormStateInterface $form_state) { } + public function validateExtraOptionsForm($form, FormStateInterface $form_state) {} /** * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - public function submitExtraOptionsForm($form, FormStateInterface $form_state) { } + public function submitExtraOptionsForm($form, FormStateInterface $form_state) {} /** * Determine if a handler can be exposed. */ - public function canExpose() { return FALSE; } + public function canExpose() {return FALSE; } /** * Set new exposed option defaults when exposed setting is flipped * on. */ - public function defaultExposeOptions() { } + public function defaultExposeOptions() {} /** * Get information about the exposed form for the form renderer. */ - public function exposedInfo() { } + public function exposedInfo() {} /** * Render our chunk of the exposed handler form when selecting */ - public function buildExposedForm(&$form, FormStateInterface $form_state) { } + public function buildExposedForm(&$form, FormStateInterface $form_state) {} /** * Validate the exposed handler form */ - public function validateExposed(&$form, FormStateInterface $form_state) { } + public function validateExposed(&$form, FormStateInterface $form_state) {} /** * Submit the exposed handler form */ - public function submitExposed(&$form, FormStateInterface $form_state) { } + public function submitExposed(&$form, FormStateInterface $form_state) {} /** * Form for exposed handler options. */ - public function buildExposeForm(&$form, FormStateInterface $form_state) { } + public function buildExposeForm(&$form, FormStateInterface $form_state) {} /** * Validate the options form. */ - public function validateExposeForm($form, FormStateInterface $form_state) { } + public function validateExposeForm($form, FormStateInterface $form_state) {} /** * Perform any necessary changes to the form exposes prior to storage. * There is no need for this function to actually store the data. */ - public function submitExposeForm($form, FormStateInterface $form_state) { } + public function submitExposeForm($form, FormStateInterface $form_state) {} /** * Shortcut to display the expose/hide button. */ - public function showExposeButton(&$form, FormStateInterface $form_state) { } + public function showExposeButton(&$form, FormStateInterface $form_state) {} /** * Shortcut to display the exposed options form. @@ -504,7 +504,7 @@ public function query() { /** * {@inheritdoc} */ - public function postExecute(&$values) { } + public function postExecute(&$values) {} /** * Provides a unique placeholders for handlers. @@ -558,7 +558,7 @@ public function ensureMyTable() { /** * {@inheritdoc} */ - public function adminSummary() { } + public function adminSummary() {} /** * Determine if this item is 'exposed', meaning it provides form elements @@ -573,24 +573,24 @@ public function isExposed() { /** * Returns TRUE if the exposed filter works like a grouped filter. */ - public function isAGroup() { return FALSE; } + public function isAGroup() {return FALSE; } /** * Define if the exposed input has to be submitted multiple times. * This is TRUE when exposed filters grouped are using checkboxes as * widgets. */ - public function multipleExposedInput() { return FALSE; } + public function multipleExposedInput() {return FALSE; } /** * Take input from exposed handlers and assign to this handler, if necessary. */ - public function acceptExposedInput($input) { return TRUE; } + public function acceptExposedInput($input) {return TRUE; } /** * If set to remember exposed input in the session, store it there. */ - public function storeExposedInput($input, $status) { return TRUE; } + public function storeExposedInput($input, $status) {return TRUE; } /** * {@inheritdoc} @@ -614,7 +614,7 @@ public function getJoin() { /** * {@inheritdoc} */ - public function validate() { return array(); } + public function validate() {return array(); } /** * {@inheritdoc} diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 449cc23..35d22ab 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -160,7 +160,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o * @return array * Returns the options of this handler/plugin. */ - protected function defineOptions() { return array(); } + protected function defineOptions() {return array(); } /** * Fills up the options of the plugin with defaults. @@ -277,17 +277,17 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function validateOptionsForm(&$form, FormStateInterface $form_state) { } + public function validateOptionsForm(&$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function submitOptionsForm(&$form, FormStateInterface $form_state) { } + public function submitOptionsForm(&$form, FormStateInterface $form_state) {} /** * {@inheritdoc} */ - public function query() { } + public function query() {} /** * {@inheritdoc} @@ -299,7 +299,7 @@ public function themeFunctions() { /** * {@inheritdoc} */ - public function validate() { return array(); } + public function validate() {return array(); } /** * {@inheritdoc} diff --git a/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php b/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php index b5c2adf..135b8f0 100644 --- a/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php @@ -48,7 +48,7 @@ * * This needs to be overridden by every default argument handler to properly do what is needed. */ - public function getArgument() { } + public function getArgument() {} /** * Sets the parent argument this plugin is associated with. @@ -64,28 +64,28 @@ public function setArgument(ArgumentPluginBase $argument) { * Retrieve the options when this is a new access * control plugin */ - protected function defineOptions() { return array(); } + protected function defineOptions() {return array(); } /** * Provide the default form for setting options. */ - public function buildOptionsForm(&$form, FormStateInterface $form_state) { } + public function buildOptionsForm(&$form, FormStateInterface $form_state) {} /** * Provide the default form form for validating options */ - public function validateOptionsForm(&$form, FormStateInterface $form_state) { } + public function validateOptionsForm(&$form, FormStateInterface $form_state) {} /** * Provide the default form form for submitting options */ - public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = array()) { } + public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = array()) {} /** * Determine if the administrator has the privileges to use this * plugin */ - public function access() { return TRUE; } + public function access() {return TRUE; } /** * If we don't have access to the form but are showing it anyway, ensure that diff --git a/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php b/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php index 7a6cf67..48e37c2 100644 --- a/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php @@ -60,27 +60,27 @@ public function setArgument(ArgumentPluginBase $argument) { * Retrieve the options when this is a new access * control plugin */ - protected function defineOptions() { return array(); } + protected function defineOptions() {return array(); } /** * Provide the default form for setting options. */ - public function buildOptionsForm(&$form, FormStateInterface $form_state) { } + public function buildOptionsForm(&$form, FormStateInterface $form_state) {} /** * Provide the default form form for validating options */ - public function validateOptionsForm(&$form, FormStateInterface $form_state) { } + public function validateOptionsForm(&$form, FormStateInterface $form_state) {} /** * Provide the default form form for submitting options */ - public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = array()) { } + public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = array()) {} /** * Determine if the administrator has the privileges to use this plugin */ - public function access() { return TRUE; } + public function access() {return TRUE; } /** * If we don't have access to the form but are showing it anyway, ensure that @@ -97,7 +97,7 @@ protected function checkAccess(&$form, $option_name) { } } - public function validateArgument($arg) { return TRUE; } + public function validateArgument($arg) {return TRUE; } /** * Process the summary arguments for displaying. @@ -107,7 +107,7 @@ public function validateArgument($arg) { return TRUE; } * for a faster query. But there are use cases where you want to use * the old value again, for example the summary. */ - public function processSummaryArguments(&$args) { } + public function processSummaryArguments(&$args) {} } diff --git a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php index 3a38dd0..66683b0 100644 --- a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php +++ b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php @@ -176,7 +176,7 @@ public function cacheFlush() { * All of the cached result data will be available in $view->result, as well, * so all ids used in the query should be discoverable. */ - public function postRender(&$output) { } + public function postRender(&$output) {} /** * Calculates and sets a cache ID used for the result cache. diff --git a/core/modules/views/src/Plugin/views/display/DefaultDisplay.php b/core/modules/views/src/Plugin/views/display/DefaultDisplay.php index 8615dd5..86fca35 100644 --- a/core/modules/views/src/Plugin/views/display/DefaultDisplay.php +++ b/core/modules/views/src/Plugin/views/display/DefaultDisplay.php @@ -33,7 +33,7 @@ class DefaultDisplay extends DisplayPluginBase { * Determine if this display is the 'default' display which contains * fallback settings */ - public function isDefaultDisplay() { return TRUE; } + public function isDefaultDisplay() {return TRUE; } /** * The default execute handler fully renders the view. diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 980da73..c1aac97 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -242,7 +242,7 @@ public function destroy() { /** * {@inheritdoc} */ - public function isDefaultDisplay() { return FALSE; } + public function isDefaultDisplay() {return FALSE; } /** * {@inheritdoc} @@ -402,7 +402,7 @@ public function usesAreas() { /** * {@inheritdoc} */ - public function attachTo(ViewExecutable $view, $display_id, array &$build) { } + public function attachTo(ViewExecutable $view, $display_id, array &$build) {} /** * {@inheritdoc} @@ -673,17 +673,17 @@ protected function defineOptions() { /** * {@inheritdoc} */ - public function hasPath() { return FALSE; } + public function hasPath() {return FALSE; } /** * {@inheritdoc} */ - public function usesLinkDisplay() { return !$this->hasPath(); } + public function usesLinkDisplay() {return !$this->hasPath(); } /** * {@inheritdoc} */ - public function usesExposedFormInBlock() { return $this->hasPath(); } + public function usesExposedFormInBlock() {return $this->hasPath(); } /** * {@inheritdoc} @@ -2070,7 +2070,7 @@ public function query() { /** * {@inheritdoc} */ - public function renderFilters() { } + public function renderFilters() {} /** * {@inheritdoc} @@ -2319,7 +2319,7 @@ public function getCacheMetadata() { /** * {@inheritdoc} */ - public function execute() { } + public function execute() {} /** * {@inheritdoc} diff --git a/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php b/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php index aebc614..81c7d2d 100644 --- a/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php +++ b/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php @@ -42,45 +42,45 @@ /** * Provide a form to edit options for this plugin. */ - public function defineOptionsAlter(&$options) { } + public function defineOptionsAlter(&$options) {} /** * Provide a form to edit options for this plugin. */ - public function buildOptionsForm(&$form, FormStateInterface $form_state) { } + public function buildOptionsForm(&$form, FormStateInterface $form_state) {} /** * Validate the options form. */ - public function validateOptionsForm(&$form, FormStateInterface $form_state) { } + public function validateOptionsForm(&$form, FormStateInterface $form_state) {} /** * Handle any special handling on the validate form. */ - public function submitOptionsForm(&$form, FormStateInterface $form_state) { } + public function submitOptionsForm(&$form, FormStateInterface $form_state) {} /** * Set up any variables on the view prior to execution. */ - public function preExecute() { } + public function preExecute() {} /** * Inject anything into the query that the display_extender handler needs. */ - public function query() { } + public function query() {} /** * Provide the default summary for options in the views UI. * * This output is returned as an array. */ - public function optionsSummary(&$categories, &$options) { } + public function optionsSummary(&$categories, &$options) {} /** * Static member function to list which sections are defaultable * and what items each section contains. */ - public function defaultableSections(&$sections, $section = NULL) { } + public function defaultableSections(&$sections, $section = NULL) {} } diff --git a/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php b/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php index 60d0b66..12604f7 100644 --- a/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php +++ b/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php @@ -186,13 +186,13 @@ public function query() { } } - public function preRender($values) { } + public function preRender($values) {} - public function postRender(&$output) { } + public function postRender(&$output) {} - public function preExecute() { } + public function preExecute() {} - public function postExecute() { } + public function postExecute() {} /** * Alters the view exposed form. diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 23eccf2..c79e925 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -1105,7 +1105,7 @@ public function adminSummary() { /** * {@inheritdoc} */ - public function preRender(&$values) { } + public function preRender(&$values) {} /** * {@inheritdoc} @@ -1684,14 +1684,14 @@ protected function getTokenValuesRecursive(array $array, array $parent_keys = ar * field ID is terms, then the tokens might be {{ terms__tid }} and * {{ terms__name }}. */ - protected function addSelfTokens(&$tokens, $item) { } + protected function addSelfTokens(&$tokens, $item) {} /** * Document any special tokens this field might use for itself. * * @see addSelfTokens() */ - protected function documentSelfTokens(&$tokens) { } + protected function documentSelfTokens(&$tokens) {} /** * {@inheritdoc} diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index c60df58..90fafda 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -177,7 +177,7 @@ public function adminSummary() { /** * Determine if a filter can be exposed. */ - public function canExpose() { return TRUE; } + public function canExpose() {return TRUE; } /** * Determine if a filter can be converted into a group. @@ -305,18 +305,18 @@ protected function operatorForm(&$form, FormStateInterface $form_state) { * Provide a list of options for the default operator form. * Should be overridden by classes that don't override operatorForm */ - public function operatorOptions() { return array(); } + public function operatorOptions() {return array(); } /** * Validate the operator form. */ - protected function operatorValidate($form, FormStateInterface $form_state) { } + protected function operatorValidate($form, FormStateInterface $form_state) {} /** * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - public function operatorSubmit($form, FormStateInterface $form_state) { } + public function operatorSubmit($form, FormStateInterface $form_state) {} /** * Shortcut to display the value form. @@ -344,13 +344,13 @@ protected function valueForm(&$form, FormStateInterface $form_state) { /** * Validate the options form. */ - protected function valueValidate($form, FormStateInterface $form_state) { } + protected function valueValidate($form, FormStateInterface $form_state) {} /** * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - protected function valueSubmit($form, FormStateInterface $form_state) { } + protected function valueSubmit($form, FormStateInterface $form_state) {} /** * Shortcut to display the exposed options form. diff --git a/core/modules/views/src/Plugin/views/filter/GroupByNumeric.php b/core/modules/views/src/Plugin/views/filter/GroupByNumeric.php index 656e7c8..49349e4 100644 --- a/core/modules/views/src/Plugin/views/filter/GroupByNumeric.php +++ b/core/modules/views/src/Plugin/views/filter/GroupByNumeric.php @@ -57,6 +57,6 @@ public function adminLabel($short = FALSE) { return $this->getField(parent::adminLabel($short)); } - public function canGroup() { return FALSE; } + public function canGroup() {return FALSE; } } diff --git a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php index 72b578a..86ba9c4 100644 --- a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php +++ b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php @@ -120,12 +120,12 @@ public function getPagerId() { /** * Provide the default form form for validating options */ - public function validateOptionsForm(&$form, FormStateInterface $form_state) { } + public function validateOptionsForm(&$form, FormStateInterface $form_state) {} /** * Provide the default form form for submitting options */ - public function submitOptionsForm(&$form, FormStateInterface $form_state) { } + public function submitOptionsForm(&$form, FormStateInterface $form_state) {} /** * Return a string to display as the clickable title for the @@ -179,22 +179,22 @@ public function updatePageInfo() { * * This is called during the build phase and can directly modify the query. */ - public function query() { } + public function query() {} /** * Perform any needed actions just prior to the query executing. */ - public function preExecute(&$query) { } + public function preExecute(&$query) {} /** * Perform any needed actions just after the query executing. */ - public function postExecute(&$result) { } + public function postExecute(&$result) {} /** * Perform any needed actions just before rendering. */ - public function preRender(&$result) { } + public function preRender(&$result) {} /** * Return the renderable array of the pager. @@ -205,7 +205,7 @@ public function preRender(&$result) { } * Any extra GET parameters that should be retained, such as exposed * input. */ - public function render($input) { } + public function render($input) {} /** * Determine if there are more records available. @@ -217,11 +217,11 @@ public function hasMoreRecords() { && $this->total_items > (intval($this->current_page) + 1) * $this->getItemsPerPage(); } - public function exposedFormAlter(&$form, FormStateInterface $form_state) { } + public function exposedFormAlter(&$form, FormStateInterface $form_state) {} - public function exposedFormValidate(&$form, FormStateInterface $form_state) { } + public function exposedFormValidate(&$form, FormStateInterface $form_state) {} - public function exposedFormSubmit(&$form, FormStateInterface $form_state, &$exclude) { } + public function exposedFormSubmit(&$form, FormStateInterface $form_state, &$exclude) {} public function usesExposed() { return FALSE; diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php index 97498e9..c6167c7 100644 --- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php +++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php @@ -60,7 +60,7 @@ * @param $get_count * Provide a countquery if this is true, otherwise provide a normal query. */ - public function query($get_count = FALSE) { } + public function query($get_count = FALSE) {} /** * Let modules modify the query just prior to finalizing it. @@ -68,7 +68,7 @@ public function query($get_count = FALSE) { } * @param view $view * The view which is executed. */ - function alter(ViewExecutable $view) { } + function alter(ViewExecutable $view) {} /** * Builds the necessary info to execute the query. @@ -76,7 +76,7 @@ function alter(ViewExecutable $view) { } * @param view $view * The view which is executed. */ - function build(ViewExecutable $view) { } + function build(ViewExecutable $view) {} /** * Executes the query and fills the associated view object with according @@ -91,7 +91,7 @@ function build(ViewExecutable $view) { } * @param view $view * The view which is executed. */ - function execute(ViewExecutable $view) { } + function execute(ViewExecutable $view) {} /** * Add a signature to the query, if such a thing is feasible. @@ -102,18 +102,18 @@ function execute(ViewExecutable $view) { } * @param view $view * The view which is executed. */ - public function addSignature(ViewExecutable $view) { } + public function addSignature(ViewExecutable $view) {} /** * Get aggregation info for group by queries. * * If NULL, aggregation is not allowed. */ - public function getAggregationInfo() { } + public function getAggregationInfo() {} - public function validateOptionsForm(&$form, FormStateInterface $form_state) { } + public function validateOptionsForm(&$form, FormStateInterface $form_state) {} - public function submitOptionsForm(&$form, FormStateInterface $form_state) { } + public function submitOptionsForm(&$form, FormStateInterface $form_state) {} public function summaryTitle() { return $this->t('Settings'); diff --git a/core/modules/views/src/Plugin/views/row/RowPluginBase.php b/core/modules/views/src/Plugin/views/row/RowPluginBase.php index 059a415..b0f5ca6 100644 --- a/core/modules/views/src/Plugin/views/row/RowPluginBase.php +++ b/core/modules/views/src/Plugin/views/row/RowPluginBase.php @@ -128,13 +128,13 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { /** * Validate the options form. */ - public function validateOptionsForm(&$form, FormStateInterface $form_state) { } + public function validateOptionsForm(&$form, FormStateInterface $form_state) {} /** * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - public function submitOptionsForm(&$form, FormStateInterface $form_state) { } + public function submitOptionsForm(&$form, FormStateInterface $form_state) {} /** * {@inheritdoc} @@ -157,7 +157,7 @@ public function query() { * @param $result * The full array of results from the query. */ - public function preRender($result) { } + public function preRender($result) {} /** * Render a row object. This usually passes through to a theme template diff --git a/core/modules/views/src/Plugin/views/sort/SortPluginBase.php b/core/modules/views/src/Plugin/views/sort/SortPluginBase.php index 81b4505..bb044e1 100644 --- a/core/modules/views/src/Plugin/views/sort/SortPluginBase.php +++ b/core/modules/views/src/Plugin/views/sort/SortPluginBase.php @@ -32,7 +32,7 @@ /** * Determine if a sort can be exposed. */ - public function canExpose() { return TRUE; } + public function canExpose() {return TRUE; } /** * Called to add the sort to a query. @@ -182,9 +182,9 @@ protected function showSortForm(&$form, FormStateInterface $form_state) { } } - protected function sortValidate(&$form, FormStateInterface $form_state) { } + protected function sortValidate(&$form, FormStateInterface $form_state) {} - public function sortSubmit(&$form, FormStateInterface $form_state) { } + public function sortSubmit(&$form, FormStateInterface $form_state) {} /** * Provide a list of options for the default sort form. diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php index 7274abd..c2ce396 100644 --- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -407,13 +407,13 @@ public function wizardSubmit(&$form, FormStateInterface $form_state, WizardInter * interfere with the sorts. If so it should build; if it returns * any non-TRUE value, normal sorting will NOT be added to the query. */ - public function buildSort() { return TRUE; } + public function buildSort() {return TRUE; } /** * Called by the view builder to let the style build a second set of * sorts that will come after any other sorts in the view. */ - public function buildSortPost() { } + public function buildSortPost() {} /** * Allow the style to do stuff before each row is rendered. diff --git a/core/modules/views/src/Tests/Plugin/PagerTest.php b/core/modules/views/src/Tests/Plugin/PagerTest.php index c1c6c97..0ec5a8f 100644 --- a/core/modules/views/src/Tests/Plugin/PagerTest.php +++ b/core/modules/views/src/Tests/Plugin/PagerTest.php @@ -94,7 +94,7 @@ public function testStorePagerSettings() { $this->assertText('20 items'); // add new display and test the settings again, by override it. - $edit = array( ); + $edit = array(); // Add a display and override the pager settings. $this->drupalPostForm('admin/structure/views/view/test_store_pager_settings/edit', $edit, t('Add Page')); $edit = array( diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc index 6c8e0b8..30a9100 100644 --- a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc +++ b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc @@ -1,3 +1,3 @@