Verified Commit 68bf822f authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #2937558 by quietone, nod_, jungle, borisson_, longwave, catch,...

Issue #2937558 by quietone, nod_, jungle, borisson_, longwave, catch, smustgrave: Fix 'Drupal.Commenting.DocComment.ParamNotFirst' coding standard
parent d1a4f6e0
Loading
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -381,10 +381,6 @@ function show(&$element) {
 * longer exist. All following hook_rebuild() operations must be based on fresh
 * and current system data. All modules must be able to rely on this contract.
 *
 * @see \Drupal\Core\Cache\CacheHelper::getBins()
 * @see hook_cache_flush()
 * @see hook_rebuild()
 *
 * This function also resets the theme, which means it is not initialized
 * anymore and all previously added JavaScript and CSS is gone. Normally, this
 * function is called as an end-of-POST-request operation that is followed by a
@@ -394,17 +390,21 @@ function show(&$element) {
 * convenience, this function automatically re-initializes the maintenance theme
 * if it was initialized before.
 *
 * @todo Try to clear page/JS/CSS caches last, so cached pages can still be
 *   served during this possibly long-running operation. (Conflict on bootstrap
 *   cache though.)
 * @todo Add a global lock to ensure that caches are not primed in concurrent
 *   requests.
 *
 * @param \Drupal\Core\DrupalKernel|array $kernel
 *   (optional) The Drupal Kernel. It is the caller's responsibility to rebuild
 *   the container if this is passed in. Sometimes drupal_flush_all_caches is
 *   used as a batch operation so $kernel will be an array, in this instance it
 *   will be treated as if it is NULL.
 *
 * @see \Drupal\Core\Cache\CacheHelper::getBins()
 * @see hook_cache_flush()
 * @see hook_rebuild()
 *
 * @todo Try to clear page/JS/CSS caches last, so cached pages can still be
 *   served during this possibly long-running operation. (Conflict on bootstrap
 *   cache though.)
 * @todo Add a global lock to ensure that caches are not primed in concurrent
 *   requests.
 */
function drupal_flush_all_caches($kernel = NULL) {
  // This is executed based on old/previously known information if $kernel is
+2 −2
Original line number Diff line number Diff line
@@ -286,8 +286,6 @@ function theme_get_setting($setting_name, $theme = NULL) {
/**
 * Converts theme settings to configuration.
 *
 * @see system_theme_settings_submit()
 *
 * @param array $theme_settings
 *   An array of theme settings from system setting form or a Drupal 7 variable.
 * @param \Drupal\Core\Config\Config $config
@@ -295,6 +293,8 @@ function theme_get_setting($setting_name, $theme = NULL) {
 *
 * @return \Drupal\Core\Config\Config
 *   The Config object with updated data.
 *
 * @see system_theme_settings_submit()
 */
function theme_settings_convert_to_config(array $theme_settings, Config $config) {
  foreach ($theme_settings as $key => $value) {
+3 −3
Original line number Diff line number Diff line
@@ -18,9 +18,6 @@ final class DeprecationHelper {
   * The below templates help code editors and PHPStan understand the return
   * value of this function.
   *
   * @template Current
   * @template Deprecated
   *
   * @param string $currentVersion
   *   Version to check against.
   * @param string $deprecatedVersion
@@ -35,6 +32,9 @@ final class DeprecationHelper {
   *   deprecation. The current callback when the current version is greater
   *   than or equal to the version of the deprecation. Otherwise, the
   *   deprecated callback.
   *
   * @template Current
   * @template Deprecated
   */
  public static function backwardsCompatibleCall(string $currentVersion, string $deprecatedVersion, callable $currentCallable, callable $deprecatedCallable): mixed {
    // Normalize the version string when it's a dev version to the first point release of that minor. E.g. 10.2.x-dev
+2 −2
Original line number Diff line number Diff line
@@ -86,8 +86,6 @@ public static function getClass($class) {
   * Link below shows the syntax for valid CSS identifiers (including element
   * names, classes, and IDs in selectors).
   *
   * @see https://www.w3.org/TR/CSS21/syndata.html#characters
   *
   * @param string $identifier
   *   The identifier to clean.
   * @param array $filter
@@ -95,6 +93,8 @@ public static function getClass($class) {
   *
   * @return string
   *   The cleaned identifier.
   *
   * @see https://www.w3.org/TR/CSS21/syndata.html#characters
   */
  public static function cleanCssIdentifier(
    $identifier,
+4 −4
Original line number Diff line number Diff line
@@ -71,13 +71,13 @@ public static function buildQuery(array $query, $parent = '') {
   * compress a string into a URL-safe query parameter which will be shorter
   * than if it was used directly.
   *
   * @see \Drupal\Component\Utility\UrlHelper::uncompressQueryParameter()
   *
   * @param string $data
   *   The data to compress.
   *
   * @return string
   *   The data compressed into a URL-safe string.
   *
   * @see \Drupal\Component\Utility\UrlHelper::uncompressQueryParameter()
   */
  public static function compressQueryParameter(string $data): string {
    // Use 'base64url' encoding. Note that the '=' sign is only used for padding
@@ -90,8 +90,6 @@ public static function compressQueryParameter(string $data): string {
  /**
   * Takes a compressed parameter and converts it back to the original.
   *
   * @see \Drupal\Component\Utility\UrlHelper::compressQueryParameter()
   *
   * @param string $compressed
   *   A string as compressed by
   *   \Drupal\Component\Utility\UrlHelper::compressQueryParameter().
@@ -99,6 +97,8 @@ public static function compressQueryParameter(string $data): string {
   * @return string
   *   The uncompressed data, or the original string if it cannot be
   *   uncompressed.
   *
   * @see \Drupal\Component\Utility\UrlHelper::compressQueryParameter()
   */
  public static function uncompressQueryParameter(string $compressed): string {
    // Because this comes from user data, suppress the PHP warning that
Loading