diff --git a/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php b/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php index 71321454e619aa6e346ad4d64df226fc2a6d8105..ca526cd7ea0631bd8fd7c65f05c1bf570bbccb12 100644 --- a/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php +++ b/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php @@ -30,7 +30,7 @@ class ConfigCollectionInfo extends Event { * * @throws \InvalidArgumentException * Exception thrown if $collection is equal to - * \Drupal\Core\Config\StorageInterface::DEFAULT_COLLECTION + * \Drupal\Core\Config\StorageInterface::DEFAULT_COLLECTION. */ public function addCollection($collection, ConfigFactoryOverrideInterface $override_service = NULL) { if ($collection == StorageInterface::DEFAULT_COLLECTION) { diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php index 930eea1ad0fa0e09d64ca4d3cd9df76fff83f4f3..4e0c1844b8838f29b93475eef1be8ab2519a74e9 100644 --- a/core/lib/Drupal/Core/Config/DatabaseStorage.php +++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php @@ -252,7 +252,8 @@ public function encode($data) { * Implements Drupal\Core\Config\StorageInterface::decode(). * * @throws ErrorException - * unserialize() triggers E_NOTICE if the string cannot be unserialized. + * The unserialize() call will trigger E_NOTICE if the string cannot + * be unserialized. */ public function decode($raw) { $data = @unserialize($raw); diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php index 1fb810b41d5a1ebf58012fc87661eac92f9972dc..c0a8747495b92d149ce21a10d610c0a5283bcdce 100644 --- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php @@ -125,7 +125,8 @@ private function parseDefinitions($content, $file) * @param array $service * @param string $file * - * @throws InvalidArgumentException When tags are invalid + * @throws InvalidArgumentException + * When tags are invalid. */ private function parseDefinition($id, $service, $file) { @@ -319,7 +320,8 @@ private function parseDefinition($id, $service, $file) * * @return array The file content * - * @throws InvalidArgumentException when the given file is not a local file or when it does not exist + * @throws InvalidArgumentException + * When the given file is not a local file or when it does not exist. */ protected function loadFile($file) { @@ -342,7 +344,8 @@ protected function loadFile($file) * * @return array * - * @throws InvalidArgumentException When service file is not valid + * @throws InvalidArgumentException + * When service file is not valid. */ private function validate($content, $file) { diff --git a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php index 3b8904733a643fa828a177aa2b208a8008020d78..33ad5027acfdab371d74b7c58677a6bef27d5ee4 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php @@ -21,7 +21,7 @@ interface ThemeHandlerInterface { * Whether any of the given themes have been installed. * * @throws \Drupal\Core\Extension\ExtensionNameLengthException - * Thrown when the theme name is to long + * Thrown when the theme name is to long. * * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0. * Use the theme_installer service instead. diff --git a/core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php b/core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php index 3e5096fe338b05bf2c953e1729d1a5861fea9ae3..ad80762ed1cbf6342b6b8d1fd921cb7ecdf532a7 100644 --- a/core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php +++ b/core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php @@ -21,7 +21,7 @@ interface ThemeInstallerInterface { * Whether any of the given themes have been installed. * * @throws \Drupal\Core\Extension\ExtensionNameLengthException - * Thrown when the theme name is to long + * Thrown when the theme name is to long. */ public function install(array $theme_list, $install_dependencies = TRUE); diff --git a/core/lib/Drupal/Core/Render/RendererInterface.php b/core/lib/Drupal/Core/Render/RendererInterface.php index a7516b4ec62f504207ca5b7d111e3c8af294b831..5f8802d4c68314d27f7161cb5ff2243b75583d1f 100644 --- a/core/lib/Drupal/Core/Render/RendererInterface.php +++ b/core/lib/Drupal/Core/Render/RendererInterface.php @@ -319,8 +319,8 @@ public function renderPlaceholder($placeholder, array $elements); * The rendered HTML. * * @throws \LogicException - * When called outside of a render context. (i.e. outside of a renderRoot(), - * renderPlain() or executeInRenderContext() call.) + * When called outside of a render context (i.e. outside of a renderRoot(), + * renderPlain() or executeInRenderContext() call). * @throws \Exception * If a #pre_render callback throws an exception, it is caught to mark the * renderer as no longer being in a root render call, if any. Then the diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php index 71bf3326523b7936f0c0f1aefd5bdc9126530a02..9291c40fd3ecdfdb355cc41bb6b057bc63c92ae2 100644 --- a/core/lib/Drupal/Core/Routing/UrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php @@ -157,10 +157,10 @@ public function getPathFromRoute($name, $parameters = array()) { * The url path, without any base path, including possible query string. * * @throws MissingMandatoryParametersException - * When some parameters are missing that are mandatory for the route + * When some parameters are missing that are mandatory for the route. * @throws InvalidParameterException * When a parameter value for a placeholder is not correct because it does - * not match the requirement + * not match the requirement. */ protected function doGenerate(array $variables, array $defaults, array $tokens, array $parameters, array $query_params, $name) { $variables = array_flip($variables); diff --git a/core/modules/field/src/Entity/FieldStorageConfig.php b/core/modules/field/src/Entity/FieldStorageConfig.php index d04454ed38c47d9669adeaeaef03307aa1a5f52a..00883d61aa52fb79745fdeccbc87498fd1d59fcb 100644 --- a/core/modules/field/src/Entity/FieldStorageConfig.php +++ b/core/modules/field/src/Entity/FieldStorageConfig.php @@ -298,7 +298,8 @@ public function preSave(EntityStorageInterface $storage) { * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. * - * @throws \Drupal\Core\Field\FieldException If the field definition is invalid. + * @throws \Drupal\Core\Field\FieldException + * If the field definition is invalid. */ protected function preSaveNew(EntityStorageInterface $storage) { $entity_manager = \Drupal::entityManager(); diff --git a/core/modules/locale/src/StreamWrapper/TranslationsStream.php b/core/modules/locale/src/StreamWrapper/TranslationsStream.php index d59949b74996edffcf95fece5786df8e417e8673..8a1c1c9fb6433dd42249a41a8c447dfb42e01dfa 100644 --- a/core/modules/locale/src/StreamWrapper/TranslationsStream.php +++ b/core/modules/locale/src/StreamWrapper/TranslationsStream.php @@ -42,7 +42,8 @@ function getDirectoryPath() { /** * Implements Drupal\Core\StreamWrapper\StreamWrapperInterface::getExternalUrl(). - * @throws \LogicException PO files URL should not be public. + * @throws \LogicException + * PO files URL should not be public. */ function getExternalUrl() { throw new \LogicException('PO files URL should not be public.'); diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 15416eee01b2e892ba9422b0e9b44beff9306374..870650952cc4b7f3e53dc3a2daac014319e22d65 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -62,9 +62,6 @@ <exclude name="Drupal.Commenting.FunctionComment.ReturnCommentIndentation"/> <exclude name="Drupal.Commenting.FunctionComment.SeeAdditionalText"/> <exclude name="Drupal.Commenting.FunctionComment.SeePunctuation"/> - <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"/> </rule>