Issue #2708185 by anoopjohn: Fix 'Drupal.Commenting.FunctionComment' coding standard - Issues related to spacing and styling
parent
56ebb39a70
commit
b5969b69bd
|
|
@ -52,7 +52,8 @@ class YamlFileLoader
|
||||||
/**
|
/**
|
||||||
* Loads a Yaml file.
|
* Loads a Yaml file.
|
||||||
*
|
*
|
||||||
* @param mixed $file The resource
|
* @param mixed $file
|
||||||
|
* The resource
|
||||||
*/
|
*/
|
||||||
public function load($file)
|
public function load($file)
|
||||||
{
|
{
|
||||||
|
|
@ -99,7 +100,7 @@ class YamlFileLoader
|
||||||
/**
|
/**
|
||||||
* Parses definitions
|
* Parses definitions
|
||||||
*
|
*
|
||||||
* @param array $content
|
* @param array $content
|
||||||
* @param string $file
|
* @param string $file
|
||||||
*/
|
*/
|
||||||
private function parseDefinitions($content, $file)
|
private function parseDefinitions($content, $file)
|
||||||
|
|
@ -121,7 +122,7 @@ class YamlFileLoader
|
||||||
* Parses a definition.
|
* Parses a definition.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @param array $service
|
* @param array $service
|
||||||
* @param string $file
|
* @param string $file
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException When tags are invalid
|
* @throws InvalidArgumentException When tags are invalid
|
||||||
|
|
@ -336,7 +337,7 @@ class YamlFileLoader
|
||||||
/**
|
/**
|
||||||
* Validates a YAML file.
|
* Validates a YAML file.
|
||||||
*
|
*
|
||||||
* @param mixed $content
|
* @param mixed $content
|
||||||
* @param string $file
|
* @param string $file
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ abstract class EntityStorageBase extends EntityHandlerBase implements EntityStor
|
||||||
* @param string $hook
|
* @param string $hook
|
||||||
* One of 'presave', 'insert', 'update', 'predelete', 'delete', or
|
* One of 'presave', 'insert', 'update', 'predelete', 'delete', or
|
||||||
* 'revision_delete'.
|
* 'revision_delete'.
|
||||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
* @param \Drupal\Core\Entity\EntityInterface $entity
|
||||||
* The entity object.
|
* The entity object.
|
||||||
*/
|
*/
|
||||||
protected function invokeHook($hook, EntityInterface $entity) {
|
protected function invokeHook($hook, EntityInterface $entity) {
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ interface FieldItemListInterface extends ListInterface, AccessibleInterface {
|
||||||
*/
|
*/
|
||||||
public function view($display_options = array());
|
public function view($display_options = array());
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Populates a specified number of field items with valid sample data.
|
* Populates a specified number of field items with valid sample data.
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class CountryManager implements CountryManagerInterface {
|
||||||
*/
|
*/
|
||||||
protected $countries;
|
protected $countries;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ interface LockBackendInterface {
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* Lock name. Limit of name's length is 255 characters.
|
* Lock name. Limit of name's length is 255 characters.
|
||||||
* @param float $timeout = 30.0
|
* @param float $timeout
|
||||||
* (optional) Lock lifetime in seconds.
|
* (optional) Lock lifetime in seconds. Defaults to 30.0.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|
@ -95,8 +95,8 @@ interface LockBackendInterface {
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* Lock name currently being locked.
|
* Lock name currently being locked.
|
||||||
* @param int $delay = 30
|
* @param int $delay
|
||||||
* Milliseconds to wait for.
|
* Milliseconds to wait for. Defaults to 30.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* TRUE if the lock holds, FALSE if it may be available. You still need to
|
* TRUE if the lock holds, FALSE if it may be available. You still need to
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ interface ContextHandlerInterface {
|
||||||
*
|
*
|
||||||
* @param \Drupal\Component\Plugin\Context\ContextInterface[] $contexts
|
* @param \Drupal\Component\Plugin\Context\ContextInterface[] $contexts
|
||||||
* An array of contexts.
|
* An array of contexts.
|
||||||
* @param array $definitions .
|
* @param array $definitions
|
||||||
* An array of plugin definitions.
|
* An array of plugin definitions.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,8 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
|
||||||
* very large route sets to be filtered down to likely candidates, which
|
* very large route sets to be filtered down to likely candidates, which
|
||||||
* may then be filtered in memory more completely.
|
* may then be filtered in memory more completely.
|
||||||
*
|
*
|
||||||
* @param Request $request A request against which to match.
|
* @param Request $request
|
||||||
|
* A request against which to match.
|
||||||
*
|
*
|
||||||
* @return \Symfony\Component\Routing\RouteCollection with all urls that
|
* @return \Symfony\Component\Routing\RouteCollection with all urls that
|
||||||
* could potentially match $request. Empty collection if nothing can
|
* could potentially match $request. Empty collection if nothing can
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ interface UrlGeneratorInterface extends VersatileGeneratorInterface {
|
||||||
*
|
*
|
||||||
* @param string|\Symfony\Component\Routing\Route $name
|
* @param string|\Symfony\Component\Routing\Route $name
|
||||||
* The route name or a route object.
|
* The route name or a route object.
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
* An associative array of parameter names and values.
|
* An associative array of parameter names and values.
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* (optional) An associative array of additional options, with the following
|
* (optional) An associative array of additional options, with the following
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class AggregatorTitleTest extends KernelTestBase {
|
||||||
$this->fieldName = 'title';
|
$this->fieldName = 'title';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Tests the formatter output.
|
* Tests the formatter output.
|
||||||
*/
|
*/
|
||||||
public function testStringFormatter() {
|
public function testStringFormatter() {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class BlockHookOperationTest extends WebTestBase {
|
||||||
$this->drupalLogin($admin_user);
|
$this->drupalLogin($admin_user);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Tests the block list to see if the test_operation link is added.
|
* Tests the block list to see if the test_operation link is added.
|
||||||
*/
|
*/
|
||||||
public function testBlockOperationAlter() {
|
public function testBlockOperationAlter() {
|
||||||
|
|
|
||||||
|
|
@ -230,14 +230,6 @@ class FormTest extends FieldTestBase {
|
||||||
$this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation');
|
$this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation');
|
||||||
}
|
}
|
||||||
|
|
||||||
// function testFieldFormMultiple() {
|
|
||||||
// $this->field = $this->field_multiple;
|
|
||||||
// $field_name = $this->field['field_name'];
|
|
||||||
// $this->instance['field_name'] = $field_name;
|
|
||||||
// FieldStorageConfig::create($this->field)->save();
|
|
||||||
// FieldConfig::create($this->instance)->save();
|
|
||||||
// }
|
|
||||||
|
|
||||||
function testFieldFormUnlimited() {
|
function testFieldFormUnlimited() {
|
||||||
$field_storage = $this->fieldStorageUnlimited;
|
$field_storage = $this->fieldStorageUnlimited;
|
||||||
$field_name = $field_storage['field_name'];
|
$field_name = $field_storage['field_name'];
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ class LocaleTranslationUiTest extends WebTestBase {
|
||||||
$this->assertNoText(t('No strings available.'), 'The translation has been removed');
|
$this->assertNoText(t('No strings available.'), 'The translation has been removed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Adds a language and checks that the JavaScript translation files are
|
* Adds a language and checks that the JavaScript translation files are
|
||||||
* properly created and rebuilt on deletion.
|
* properly created and rebuilt on deletion.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -623,7 +623,7 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function buildSearchUrlQuery(FormStateInterface $form_state) {
|
public function buildSearchUrlQuery(FormStateInterface $form_state) {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class NodeFieldMultilingualTest extends WebTestBase {
|
||||||
$this->assertRaw($body_value, 'Body correctly displayed using English as requested language');
|
$this->assertRaw($body_value, 'Body correctly displayed using English as requested language');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Tests multilingual field display settings.
|
* Tests multilingual field display settings.
|
||||||
*/
|
*/
|
||||||
function testMultilingualDisplaySettings() {
|
function testMultilingualDisplaySettings() {
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ abstract class SearchPluginBase extends PluginBase implements ContainerFactoryPl
|
||||||
return $this->t('Search');
|
return $this->t('Search');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function buildSearchUrlQuery(FormStateInterface $form_state) {
|
public function buildSearchUrlQuery(FormStateInterface $form_state) {
|
||||||
|
|
@ -140,7 +140,7 @@ abstract class SearchPluginBase extends PluginBase implements ContainerFactoryPl
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getHelp() {
|
public function getHelp() {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class SerializationTestNormalizer implements NormalizerInterface {
|
||||||
/**
|
/**
|
||||||
* Checks whether format is supported by this normalizer.
|
* Checks whether format is supported by this normalizer.
|
||||||
*
|
*
|
||||||
* @param mixed $data
|
* @param mixed $data
|
||||||
* Data to normalize.
|
* Data to normalize.
|
||||||
* @param string $format
|
* @param string $format
|
||||||
* Format the normalization result will be encoded as.
|
* Format the normalization result will be encoded as.
|
||||||
|
|
|
||||||
|
|
@ -284,11 +284,16 @@ EOD;
|
||||||
/**
|
/**
|
||||||
* Asserts that an assertion with specified values is displayed in results.
|
* Asserts that an assertion with specified values is displayed in results.
|
||||||
*
|
*
|
||||||
* @param string $message Assertion message.
|
* @param string $message
|
||||||
* @param string $type Assertion type.
|
* Assertion message.
|
||||||
* @param string $status Assertion status.
|
* @param string $type
|
||||||
* @param string $file File where the assertion originated.
|
* Assertion type.
|
||||||
* @param string $function Function where the assertion originated.
|
* @param string $status
|
||||||
|
* Assertion status.
|
||||||
|
* @param string $file
|
||||||
|
* File where the assertion originated.
|
||||||
|
* @param string $function
|
||||||
|
* Function where the assertion originated.
|
||||||
*
|
*
|
||||||
* @return Assertion result.
|
* @return Assertion result.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -996,7 +996,7 @@ function system_schema() {
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Change two fields on the default menu link storage to be serialized data.
|
* Change two fields on the default menu link storage to be serialized data.
|
||||||
*/
|
*/
|
||||||
function system_update_8001(&$sandbox = NULL) {
|
function system_update_8001(&$sandbox = NULL) {
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ function twig_theme_test_theme($existing, $type, $theme, $path) {
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Helper function to test PHP variables in the Twig engine.
|
* Helper function to test PHP variables in the Twig engine.
|
||||||
*/
|
*/
|
||||||
function _test_theme_twig_php_values() {
|
function _test_theme_twig_php_values() {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class TourTest extends UnitTestCase {
|
||||||
$tour->resetKeyedRoutes();
|
$tour->resetKeyedRoutes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Provides sample routes for testing.
|
* Provides sample routes for testing.
|
||||||
*/
|
*/
|
||||||
public function routeProvider() {
|
public function routeProvider() {
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ class UserSearch extends SearchPluginBase implements AccessibleInterface {
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getHelp() {
|
public function getHelp() {
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,6 @@ class EntityFieldRenderer extends RendererBase {
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected function getLanguageManager() {
|
protected function getLanguageManager() {
|
||||||
return $this->languageManager;
|
return $this->languageManager;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,9 +118,10 @@ class Combine extends StringFilter {
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
// By default things like opEqual uses add_where, that doesn't support
|
/**
|
||||||
// complex expressions, so override all operators.
|
* By default things like opEqual uses add_where, that doesn't support
|
||||||
|
* complex expressions, so override opEqual (and all operators below).
|
||||||
|
*/
|
||||||
function opEqual($expression) {
|
function opEqual($expression) {
|
||||||
$placeholder = $this->placeholder();
|
$placeholder = $this->placeholder();
|
||||||
$operator = $this->operator();
|
$operator = $this->operator();
|
||||||
|
|
|
||||||
|
|
@ -1227,7 +1227,7 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Transform the input from a grouped filter into a standard filter.
|
* Transform the input from a grouped filter into a standard filter.
|
||||||
*
|
*
|
||||||
* When a filter is a group, find the set of operator and values
|
* When a filter is a group, find the set of operator and values
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,9 @@ class FieldCounterTest extends ViewsKernelTestBase {
|
||||||
$this->assertEqual($counter, (string) $expected_number, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => $expected_number, '@counter' => $counter)));
|
$this->assertEqual($counter, (string) $expected_number, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => $expected_number, '@counter' => $counter)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// @TODO: Write tests for pager.
|
/**
|
||||||
|
* @todo: Write tests for pager.
|
||||||
|
*/
|
||||||
function testPager() {
|
function testPager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,20 +64,16 @@
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
|
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/>
|
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
|
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentNewLine"/>
|
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentNotCapital"/>
|
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentNotCapital"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ParamNameNoMatch"/>
|
<exclude name="Drupal.Commenting.FunctionComment.ParamNameNoMatch"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ReturnCommentIndentation"/>
|
<exclude name="Drupal.Commenting.FunctionComment.ReturnCommentIndentation"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.SeeAdditionalText"/>
|
<exclude name="Drupal.Commenting.FunctionComment.SeeAdditionalText"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.SeePunctuation"/>
|
<exclude name="Drupal.Commenting.FunctionComment.SeePunctuation"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.SpacingAfter"/>
|
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.SpacingAfterParamType"/>
|
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ThrowsComment"/>
|
<exclude name="Drupal.Commenting.FunctionComment.ThrowsComment"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ThrowsNoFullStop"/>
|
<exclude name="Drupal.Commenting.FunctionComment.ThrowsNoFullStop"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.ThrowsNotCapital"/>
|
<exclude name="Drupal.Commenting.FunctionComment.ThrowsNotCapital"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
|
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.VoidReturn"/>
|
<exclude name="Drupal.Commenting.FunctionComment.VoidReturn"/>
|
||||||
<exclude name="Drupal.Commenting.FunctionComment.WrongStyle"/>
|
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="Drupal.ControlStructures.ElseIf"/>
|
<rule ref="Drupal.ControlStructures.ElseIf"/>
|
||||||
<rule ref="Drupal.ControlStructures.ControlSignature"/>
|
<rule ref="Drupal.ControlStructures.ControlSignature"/>
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,7 @@
|
||||||
* Test module.
|
* Test module.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// return an array to test nested merge in invoke all.
|
/**
|
||||||
|
* Returns an array to test nested merge in invoke all.
|
||||||
|
*/
|
||||||
function module_handler_test_all1_hook($arg) { return array($arg); }
|
function module_handler_test_all1_hook($arg) { return array($arg); }
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,9 @@ class FakePhpassHashedPassword extends PhpassHashedPassword {
|
||||||
// Noop.
|
// Noop.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose this method as public for tests.
|
/**
|
||||||
|
* Exposes this method as public for tests.
|
||||||
|
*/
|
||||||
public function enforceLog2Boundaries($count_log2) {
|
public function enforceLog2Boundaries($count_log2) {
|
||||||
return parent::enforceLog2Boundaries($count_log2);
|
return parent::enforceLog2Boundaries($count_log2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue