Commit b5969b69 authored by alexpott's avatar alexpott

Issue #2708185 by anoopjohn: Fix 'Drupal.Commenting.FunctionComment' coding...

Issue #2708185 by anoopjohn: Fix 'Drupal.Commenting.FunctionComment' coding standard - Issues related to spacing and styling
parent 56ebb39a
......@@ -52,7 +52,8 @@ public function __construct(ContainerBuilder $container)
/**
* Loads a Yaml file.
*
* @param mixed $file The resource
* @param mixed $file
* The resource
*/
public function load($file)
{
......@@ -99,7 +100,7 @@ public function load($file)
/**
* Parses definitions
*
* @param array $content
* @param array $content
* @param string $file
*/
private function parseDefinitions($content, $file)
......@@ -121,7 +122,7 @@ private function parseDefinitions($content, $file)
* Parses a definition.
*
* @param string $id
* @param array $service
* @param array $service
* @param string $file
*
* @throws InvalidArgumentException When tags are invalid
......@@ -336,7 +337,7 @@ protected function loadFile($file)
/**
* Validates a YAML file.
*
* @param mixed $content
* @param mixed $content
* @param string $file
*
* @return array
......
......@@ -159,7 +159,7 @@ protected function setStaticCache(array $entities) {
* @param string $hook
* One of 'presave', 'insert', 'update', 'predelete', 'delete', or
* 'revision_delete'.
* @param \Drupal\Core\Entity\EntityInterface $entity
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity object.
*/
protected function invokeHook($hook, EntityInterface $entity) {
......
......@@ -181,7 +181,7 @@ public function deleteRevision();
*/
public function view($display_options = array());
/*
/**
* Populates a specified number of field items with valid sample data.
*
* @param int $count
......
......@@ -21,7 +21,7 @@ class CountryManager implements CountryManagerInterface {
*/
protected $countries;
/*
/**
* Constructor.
*
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
......
......@@ -68,8 +68,8 @@ interface LockBackendInterface {
*
* @param string $name
* Lock name. Limit of name's length is 255 characters.
* @param float $timeout = 30.0
* (optional) Lock lifetime in seconds.
* @param float $timeout
* (optional) Lock lifetime in seconds. Defaults to 30.0.
*
* @return bool
*/
......@@ -95,8 +95,8 @@ public function lockMayBeAvailable($name);
*
* @param string $name
* Lock name currently being locked.
* @param int $delay = 30
* Milliseconds to wait for.
* @param int $delay
* Milliseconds to wait for. Defaults to 30.
*
* @return bool
* 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
* An array of contexts.
* @param array $definitions .
* @param array $definitions
* An array of plugin definitions.
*
* @return array
......
......@@ -134,7 +134,8 @@ public function __construct(Connection $connection, StateInterface $state, Curre
* very large route sets to be filtered down to likely candidates, which
* 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
* could potentially match $request. Empty collection if nothing can
......
......@@ -34,7 +34,7 @@ public function getPathFromRoute($name, $parameters = array());
*
* @param string|\Symfony\Component\Routing\Route $name
* The route name or a route object.
* @param array $parameters
* @param array $parameters
* An associative array of parameter names and values.
* @param array $options
* (optional) An associative array of additional options, with the following
......
......@@ -43,7 +43,7 @@ protected function setUp() {
$this->fieldName = 'title';
}
/*
/**
* Tests the formatter output.
*/
public function testStringFormatter() {
......
......@@ -31,7 +31,7 @@ protected function setUp() {
$this->drupalLogin($admin_user);
}
/*
/**
* Tests the block list to see if the test_operation link is added.
*/
public function testBlockOperationAlter() {
......
......@@ -230,14 +230,6 @@ function testFieldFormSingleRequired() {
$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() {
$field_storage = $this->fieldStorageUnlimited;
$field_name = $field_storage['field_name'];
......
......@@ -205,7 +205,7 @@ public function testStringTranslation() {
$this->assertNoText(t('No strings available.'), 'The translation has been removed');
}
/*
/**
* Adds a language and checks that the JavaScript translation files are
* properly created and rebuilt on deletion.
*/
......
......@@ -623,7 +623,7 @@ public function searchFormAlter(array &$form, FormStateInterface $form_state) {
}
}
/*
/**
* {@inheritdoc}
*/
public function buildSearchUrlQuery(FormStateInterface $form_state) {
......
......@@ -97,7 +97,7 @@ function testMultilingualNodeForm() {
$this->assertRaw($body_value, 'Body correctly displayed using English as requested language');
}
/*
/**
* Tests multilingual field display settings.
*/
function testMultilingualDisplaySettings() {
......
......@@ -129,7 +129,7 @@ public function suggestedTitle() {
return $this->t('Search');
}
/*
/**
* {@inheritdoc}
*/
public function buildSearchUrlQuery(FormStateInterface $form_state) {
......@@ -140,7 +140,7 @@ public function buildSearchUrlQuery(FormStateInterface $form_state) {
return $query;
}
/*
/**
* {@inheritdoc}
*/
public function getHelp() {
......
......@@ -36,7 +36,7 @@ public function normalize($object, $format = NULL, array $context = array()) {
/**
* Checks whether format is supported by this normalizer.
*
* @param mixed $data
* @param mixed $data
* Data to normalize.
* @param string $format
* Format the normalization result will be encoded as.
......
......@@ -284,11 +284,16 @@ function getTestIdFromResults() {
/**
* Asserts that an assertion with specified values is displayed in results.
*
* @param string $message Assertion message.
* @param string $type Assertion type.
* @param string $status Assertion status.
* @param string $file File where the assertion originated.
* @param string $function Function where the assertion originated.
* @param string $message
* Assertion message.
* @param string $type
* Assertion type.
* @param string $status
* Assertion status.
* @param string $file
* File where the assertion originated.
* @param string $function
* Function where the assertion originated.
*
* @return Assertion result.
*/
......
......@@ -996,7 +996,7 @@ function system_schema() {
* @{
*/
/*
/**
* Change two fields on the default menu link storage to be serialized data.
*/
function system_update_8001(&$sandbox = NULL) {
......
......@@ -76,7 +76,7 @@ function twig_theme_test_theme($existing, $type, $theme, $path) {
return $items;
}
/*
/**
* Helper function to test PHP variables in the Twig engine.
*/
function _test_theme_twig_php_values() {
......
......@@ -41,7 +41,7 @@ public function testHasMatchingRoute($routes, $route_name, $route_params, $resul
$tour->resetKeyedRoutes();
}
/*
/**
* Provides sample routes for testing.
*/
public function routeProvider() {
......
......@@ -158,7 +158,7 @@ public function execute() {
return $results;
}
/*
/**
* {@inheritdoc}
*/
public function getHelp() {
......
......@@ -88,7 +88,6 @@ protected function getEntityManager() {
/**
* {@inheritdoc}
*/
protected function getLanguageManager() {
return $this->languageManager;
}
......
......@@ -118,9 +118,10 @@ public function validate() {
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) {
$placeholder = $this->placeholder();
$operator = $this->operator();
......
......@@ -1227,7 +1227,7 @@ public function exposedInfo() {
);
}
/*
/**
* Transform the input from a grouped filter into a standard filter.
*
* When a filter is a group, find the set of operator and values
......
......@@ -84,7 +84,9 @@ function testSimple() {
$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() {
}
......
......@@ -64,20 +64,16 @@
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentNewLine"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentNotCapital"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamNameNoMatch"/>
<exclude name="Drupal.Commenting.FunctionComment.ReturnCommentIndentation"/>
<exclude name="Drupal.Commenting.FunctionComment.SeeAdditionalText"/>
<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.ThrowsNoFullStop"/>
<exclude name="Drupal.Commenting.FunctionComment.ThrowsNotCapital"/>
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
<exclude name="Drupal.Commenting.FunctionComment.VoidReturn"/>
<exclude name="Drupal.Commenting.FunctionComment.WrongStyle"/>
</rule>
<rule ref="Drupal.ControlStructures.ElseIf"/>
<rule ref="Drupal.ControlStructures.ControlSignature"/>
......
......@@ -5,5 +5,7 @@
* 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); }
......@@ -181,7 +181,9 @@ function __construct() {
// Noop.
}
// Expose this method as public for tests.
/**
* Exposes this method as public for tests.
*/
public function enforceLog2Boundaries($count_log2) {
return parent::enforceLog2Boundaries($count_log2);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment