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.
|
||||
*
|
||||
* @param mixed $file The resource
|
||||
* @param mixed $file
|
||||
* The resource
|
||||
*/
|
||||
public function load($file)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ interface FieldItemListInterface extends ListInterface, AccessibleInterface {
|
|||
*/
|
||||
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 @@ interface LockBackendInterface {
|
|||
*
|
||||
* @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 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
|
|||
* 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
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class AggregatorTitleTest extends KernelTestBase {
|
|||
$this->fieldName = 'title';
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Tests the formatter output.
|
||||
*/
|
||||
public function testStringFormatter() {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class BlockHookOperationTest extends WebTestBase {
|
|||
$this->drupalLogin($admin_user);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Tests the block list to see if the test_operation link is added.
|
||||
*/
|
||||
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');
|
||||
}
|
||||
|
||||
// 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 @@ class LocaleTranslationUiTest extends WebTestBase {
|
|||
$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 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
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');
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Tests multilingual field display settings.
|
||||
*/
|
||||
function testMultilingualDisplaySettings() {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ abstract class SearchPluginBase extends PluginBase implements ContainerFactoryPl
|
|||
return $this->t('Search');
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildSearchUrlQuery(FormStateInterface $form_state) {
|
||||
|
|
@ -140,7 +140,7 @@ abstract class SearchPluginBase extends PluginBase implements ContainerFactoryPl
|
|||
return $query;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getHelp() {
|
||||
|
|
|
|||
|
|
@ -284,11 +284,16 @@ EOD;
|
|||
/**
|
||||
* 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 @@ class TourTest extends UnitTestCase {
|
|||
$tour->resetKeyedRoutes();
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides sample routes for testing.
|
||||
*/
|
||||
public function routeProvider() {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class UserSearch extends SearchPluginBase implements AccessibleInterface {
|
|||
return $results;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getHelp() {
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ class EntityFieldRenderer extends RendererBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
||||
protected function getLanguageManager() {
|
||||
return $this->languageManager;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,9 +118,10 @@ class Combine extends StringFilter {
|
|||
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 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen
|
|||
);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* 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 @@ 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)));
|
||||
}
|
||||
|
||||
// @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 @@ class FakePhpassHashedPassword extends PhpassHashedPassword {
|
|||
// 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue