Quantcast
Viewing all articles
Browse latest Browse all 293174

Document and standardize how @throws should be described.

Spin-off of #1938390: Convert contact_site_page and contact_person_page to a new-style Controller, see #37 and following.

Looking at the output of grep -R "@throws" core/, most place it on the next line if there's any.

core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php-   *
core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php:   * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php-   *   If the query token is missing or invalid.
--
core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php-   *
core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php:   * @throws \Drupal\field\FieldException
core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php-   *   If the field instance definition is invalid.
core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php-   *
core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php:   * @throws \Drupal\Core\Entity\EntityStorageException
core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php-   *   In case of failures at the configuration storage level.
--
core/modules/overlay/lib/Drupal/overlay/Controller/OverlayController.php-   *   The request object.
core/modules/overlay/lib/Drupal/overlay/Controller/OverlayController.php:   * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
core/modules/overlay/lib/Drupal/overlay/Controller/OverlayController.php-   *   Thrown when a non valid token was specified.

There are also some wrong cases, like multiple classes on a single @throws, saw a single case with description a single line, some descriptions are pretty stupid ("throws an exception on failures"... you don't say?! ;)) and some missing spaces. Maybe clean that up here while we're at it?


Viewing all articles
Browse latest Browse all 293174

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>