diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php index 0f02dd76abe1e19fcaeb510b115b55364cb52e39..1fb810b41d5a1ebf58012fc87661eac92f9972dc 100644 --- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php @@ -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 diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php index 70e4f7c7a5b61b36648c0bf58d00636262198df1..f58312106e41f73738938d03db0df24b5b86a50c 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php @@ -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) { diff --git a/core/lib/Drupal/Core/Field/FieldItemListInterface.php b/core/lib/Drupal/Core/Field/FieldItemListInterface.php index abeb9f2a2c2509d2700ce70316eb3bb44e1f3ae9..e8bba024e9a88d31c7cc3aa9dffe528fd7ce765d 100644 --- a/core/lib/Drupal/Core/Field/FieldItemListInterface.php +++ b/core/lib/Drupal/Core/Field/FieldItemListInterface.php @@ -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 diff --git a/core/lib/Drupal/Core/Locale/CountryManager.php b/core/lib/Drupal/Core/Locale/CountryManager.php index ac7f1bff5c86b849ffb4a834b53390c030ba89f9..451758e082734e2cfd2cc8bb04c4969b3a0207da 100644 --- a/core/lib/Drupal/Core/Locale/CountryManager.php +++ b/core/lib/Drupal/Core/Locale/CountryManager.php @@ -21,7 +21,7 @@ class CountryManager implements CountryManagerInterface { */ protected $countries; - /* + /** * Constructor. * * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler diff --git a/core/lib/Drupal/Core/Lock/LockBackendInterface.php b/core/lib/Drupal/Core/Lock/LockBackendInterface.php index 8c65385871b4b55568a3498232f44ac408842e5f..e2912958fc8a946db5f7f24c9f6cf64ce1f3137b 100644 --- a/core/lib/Drupal/Core/Lock/LockBackendInterface.php +++ b/core/lib/Drupal/Core/Lock/LockBackendInterface.php @@ -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 diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php b/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php index 5848bc3c8e289b1ef4a28017deacc80ecfe17645..2a219e93788dad9394fd171054ff2f75e2b78b0d 100644 --- a/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php +++ b/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php @@ -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 diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php index 8c631d7f209ed81feca792db0b1434768a4704ba..53ed6262eed468ad60fda52a1819a63faddb29e4 100644 --- a/core/lib/Drupal/Core/Routing/RouteProvider.php +++ b/core/lib/Drupal/Core/Routing/RouteProvider.php @@ -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 diff --git a/core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php b/core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php index 9a314edd340eb8a0c8c94a3260c83ad448c3697d..f5174f1d26364affa67cc9dd75d4c6c037a07059 100644 --- a/core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php +++ b/core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php @@ -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 diff --git a/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php b/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php index eacd139c66e960fd3826db0382c10ad8aecbb407..782ac6f14b089a4b0730edea92d05e23c83ffa37 100644 --- a/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php +++ b/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php @@ -43,7 +43,7 @@ protected function setUp() { $this->fieldName = 'title'; } - /* + /** * Tests the formatter output. */ public function testStringFormatter() { diff --git a/core/modules/block/src/Tests/BlockHookOperationTest.php b/core/modules/block/src/Tests/BlockHookOperationTest.php index 1f3b55db3e5b3cdf79376d7d3c8a91d10dbc9d3a..91ea84300f2d94205cb07c5939979d86115885cd 100644 --- a/core/modules/block/src/Tests/BlockHookOperationTest.php +++ b/core/modules/block/src/Tests/BlockHookOperationTest.php @@ -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() { diff --git a/core/modules/field/src/Tests/FormTest.php b/core/modules/field/src/Tests/FormTest.php index 51c80b39a22508f6347044e2c883476ee574b2db..c2efc175f74be1d7cdc2ec63630934026d0c4529 100644 --- a/core/modules/field/src/Tests/FormTest.php +++ b/core/modules/field/src/Tests/FormTest.php @@ -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']; diff --git a/core/modules/locale/src/Tests/LocaleTranslationUiTest.php b/core/modules/locale/src/Tests/LocaleTranslationUiTest.php index ba1678244ebd9d24da402c3fbf2b388de7abe777..aad0119fa2387d5cbd40ae7ae28d2ce2b67af000 100644 --- a/core/modules/locale/src/Tests/LocaleTranslationUiTest.php +++ b/core/modules/locale/src/Tests/LocaleTranslationUiTest.php @@ -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. */ diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index 927861c179294ea636d7aabc1d22b26bed936379..d161a0a0d783cd98447061620a2a55525d94cad0 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -623,7 +623,7 @@ public function searchFormAlter(array &$form, FormStateInterface $form_state) { } } - /* + /** * {@inheritdoc} */ public function buildSearchUrlQuery(FormStateInterface $form_state) { diff --git a/core/modules/node/src/Tests/NodeFieldMultilingualTest.php b/core/modules/node/src/Tests/NodeFieldMultilingualTest.php index e9a96a95ca7c87fa2f0efa2ab13d95cc5b32b2cd..9beae5df8588195e16258a90d63e643fc282e262 100644 --- a/core/modules/node/src/Tests/NodeFieldMultilingualTest.php +++ b/core/modules/node/src/Tests/NodeFieldMultilingualTest.php @@ -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() { diff --git a/core/modules/search/src/Plugin/SearchPluginBase.php b/core/modules/search/src/Plugin/SearchPluginBase.php index c7beea85da81416374a038ed5ddb49ec96e39acd..d253972ce16d16c045cacfea592982d77de296bf 100644 --- a/core/modules/search/src/Plugin/SearchPluginBase.php +++ b/core/modules/search/src/Plugin/SearchPluginBase.php @@ -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() { diff --git a/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php b/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php index 0cb58335528e8ffc7f4a54c4bbc553022ec0e91e..16775534f6b075e39a035b749e366d26c41d7c1d 100644 --- a/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php +++ b/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php @@ -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. diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php index 290403b71273f002d991eff30179d97de1ee0060..19ab17f586a4a762f8d252f8bd32ab38680184bc 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php @@ -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. */ diff --git a/core/modules/system/system.install b/core/modules/system/system.install index c7168919db25ff4098083646643ab5818c7a9a8c..cdaeba680e30478a501deb50a511111cb4665858 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -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) { diff --git a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module index 0d6bad8a9413bca900e7c527d4946faae9928edb..550b5ca1730beaa4610c839c3bcc9a22d155ddcc 100644 --- a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module +++ b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module @@ -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() { diff --git a/core/modules/tour/tests/src/Unit/Entity/TourTest.php b/core/modules/tour/tests/src/Unit/Entity/TourTest.php index f08ea2d90fc8dd3fe2183683361d6869bf0c6680..2c71aa9650c6fb83a60651c1b957974adcaffa31 100644 --- a/core/modules/tour/tests/src/Unit/Entity/TourTest.php +++ b/core/modules/tour/tests/src/Unit/Entity/TourTest.php @@ -41,7 +41,7 @@ public function testHasMatchingRoute($routes, $route_name, $route_params, $resul $tour->resetKeyedRoutes(); } - /* + /** * Provides sample routes for testing. */ public function routeProvider() { diff --git a/core/modules/user/src/Plugin/Search/UserSearch.php b/core/modules/user/src/Plugin/Search/UserSearch.php index 5332939cb85e88d2e1e6bbaa1f09f7c3c9acf5cb..f8471211d7a765fb6bf09d7267b9cebef0e49aa2 100644 --- a/core/modules/user/src/Plugin/Search/UserSearch.php +++ b/core/modules/user/src/Plugin/Search/UserSearch.php @@ -158,7 +158,7 @@ public function execute() { return $results; } - /* + /** * {@inheritdoc} */ public function getHelp() { diff --git a/core/modules/views/src/Entity/Render/EntityFieldRenderer.php b/core/modules/views/src/Entity/Render/EntityFieldRenderer.php index cf76b8866c91ab7447dbee02b67cbde4e36caea3..1b05c1b2a3605952b197aba5ea94a9cf8c2d4b36 100644 --- a/core/modules/views/src/Entity/Render/EntityFieldRenderer.php +++ b/core/modules/views/src/Entity/Render/EntityFieldRenderer.php @@ -88,7 +88,6 @@ protected function getEntityManager() { /** * {@inheritdoc} */ - protected function getLanguageManager() { return $this->languageManager; } diff --git a/core/modules/views/src/Plugin/views/filter/Combine.php b/core/modules/views/src/Plugin/views/filter/Combine.php index 292986f2bc4cb1290f188a5e680f52225e9d5d55..f5a6035f7885ab7627605edfeecfb6567f98cca2 100644 --- a/core/modules/views/src/Plugin/views/filter/Combine.php +++ b/core/modules/views/src/Plugin/views/filter/Combine.php @@ -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(); diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index cf00bf742a43b2eec5953343b23437f41f625796..c458e6344ad3912ee4b43ccf74042612ebea8b09 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -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 diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php index 190f476c82f3958c2b7b2ff5642640fa5dd699b3..12f68ede749a446d147d619d5b78aea1dbd2b391 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php @@ -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() { } diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 5195a2595190e102a55f6da3ab64df01a36383ea..f558eecb9adb27d09a822c312d27c41dff43e8d9 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -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"/> diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module index 1555aec793ae1a266f3105b5def414d997bf9fc3..4689c02ce427939139790d17eae919261b1c0328 100644 --- a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module +++ b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module @@ -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); } diff --git a/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php b/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php index 4bebf4cec72aa9d635ee25576363f13660d41222..5c378ed622aa7ba196025f23731c714f6315f391 100644 --- a/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php +++ b/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php @@ -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); }