Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/22/2025 06:05:25 AM (5 months ago)
Author:
johnjamesjacoby
Message:

Tools - Code Improvement: stop ignoring these PHPCS sniffs:

  • Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
  • Generic.CodeAnalysis.EmptyStatement.DetectedElseif
  • Generic.CodeAnalysis.EmptyStatement.DetectedIf
  • Generic.CodeAnalysis.UselessOverridingMethod.Found
  • Generic.ControlStructures.InlineControlStructure.NotAllowed
  • Generic.Files.LineEndings.InvalidEOLChar
  • Generic.Formatting.DisallowMultipleStatements.SameLine
  • Generic.Formatting.SpaceAfterCast.TooMuchSpace
  • Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace
  • Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
  • NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceAfterArrayOpenerMultiLine
  • NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceAfterArrayOpenerSingleLine
  • NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceBeforeArrayCloserMultiLine
  • NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLineCloserSameLine
  • PEAR.Functions.FunctionCallSignature.CloseBracketLine
  • PEAR.Functions.FunctionCallSignature.EmptyLine
  • PEAR.Functions.FunctionCallSignature.Indent
  • PEAR.Functions.FunctionCallSignature.MultipleArguments
  • PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
  • PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess.Found
  • PSR2.Classes.ClassDeclaration.CloseBraceAfterBody
  • PSR2.Classes.PropertyDeclaration.ScopeMissing
  • PSR2.Classes.PropertyDeclaration.Underscore
  • PSR2.Classes.PropertyDeclaration.VarUsed
  • PSR2.ControlStructures.ElseIfDeclaration.NotAllowed
  • PSR2.ControlStructures.SwitchDeclaration.BreakIndent
  • PSR2.Methods.MethodDeclaration.Underscore
  • Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace
  • Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen
  • Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose
  • Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace
  • Squiz.PHP.DisallowSizeFunctionsInLoops.Found
  • Squiz.Scope.MethodScope.Missing
  • Squiz.WhiteSpace.SuperfluousWhitespace.EndLine
  • Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound
  • Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound
  • Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound
  • Universal.Operators.DisallowStandalonePostIncrementDecrement.PostDecrementFound
  • Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound
  • Universal.Operators.StrictComparisons.LooseEqual
  • Universal.Operators.StrictComparisons.LooseNotEqual
  • WordPress.Arrays.ArrayKeySpacingRestrictions.TooMuchSpaceAfterKey
  • WordPress.DateTime.CurrentTimeTimestamp.Requested
  • WordPress.DateTime.RestrictedFunctions.date_date
  • WordPress.Files.FileName.NotHyphenatedLowercase
  • WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound
  • WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
  • WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
  • WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
  • WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
  • WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
  • WordPress.PHP.IniSet.Risky
  • WordPress.PHP.PregQuoteDelimiter.Missing
  • WordPress.PHP.StrictInArray.MissingTrueStrict
  • WordPress.WP.AlternativeFunctions.parse_url_parse_url
  • WordPress.WP.AlternativeFunctions.rand_mt_rand
  • WordPress.WP.AlternativeFunctions.strip_tags_strip_tag
  • WordPress.WP.AlternativeFunctions.strip_tags_strip_tags
  • WordPress.WP.Capabilities.Unknown
  • WordPress.WP.DeprecatedParameters.Get_termsParam2Found
  • WordPress.WP.DeprecatedParameters.Wp_count_termsParam2Found
  • WordPress.WP.DiscouragedFunctions.query_posts_query_posts
  • WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query
  • WordPress.WP.EnqueuedResourceParameters.NotInFooter
  • WordPress.WP.GlobalVariablesOverride.Prohibited
  • WordPress.WP.I18n.LowLevelTranslationFunction

This commit includes code formatting changes for the above sniffs.

See #3658.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools/common.php

    r7360 r7378  
    5656
    5757    // Parse arguments
    58     $r = wp_parse_args( $args, array(
    59         'page' => bbp_get_admin_repair_tool_page()
    60     ) );
     58    $r = wp_parse_args(
     59        $args,
     60        array(
     61            'page' => bbp_get_admin_repair_tool_page()
     62        )
     63    );
    6164
    6265    return add_query_arg( $r, admin_url( 'tools.php' ) );
     
    744747
    745748    // Parse args
    746     $r = bbp_parse_args( $args, array(
    747         'before'       => '<ul class="subsubsub">',
    748         'after'        => '</ul>',
    749         'link_before'  => '<li>',
    750         'link_after'   => '</li>',
    751         'count_before' => ' <span class="count">(',
    752         'count_after'  => ')</span>',
    753         'sep'          => ' | ',
    754 
    755         // Retired, use 'sep' instead
    756         'separator'    => false
    757     ), 'get_admin_repair_tool_overhead_filters' );
     749    $r = bbp_parse_args(
     750        $args,
     751        array(
     752            'before'       => '<ul class="subsubsub">',
     753            'after'        => '</ul>',
     754            'link_before'  => '<li>',
     755            'link_after'   => '</li>',
     756            'count_before' => ' <span class="count">(',
     757            'count_after'  => ')</span>',
     758            'sep'          => ' | ',
     759
     760            // Retired, use 'sep' instead
     761            'separator'    => false
     762        ),
     763        'get_admin_repair_tool_overhead_filters'
     764    );
    758765
    759766    /**
     
    787794
    788795            // Bump the overhead count
    789             $overheads[ $overhead ]++;
     796            ++$overheads[ $overhead ];
    790797        }
    791798    }
     
    874881
    875882    // Parse args
    876     $r = bbp_parse_args( $args, array(
    877         'before'       => '<ul class="subsubsub">',
    878         'after'        => '</ul>',
    879         'link_before'  => '<li>',
    880         'link_after'   => '</li>',
    881         'count_before' => ' <span class="count">(',
    882         'count_after'  => ')</span>',
    883         'sep'          => ' | ',
    884 
    885         // Retired, use 'sep' instead
    886         'separator'    => false
    887     ), 'get_admin_repair_tool_status_filters' );
     883    $r = bbp_parse_args(
     884        $args,
     885        array(
     886            'before'       => '<ul class="subsubsub">',
     887            'after'        => '</ul>',
     888            'link_before'  => '<li>',
     889            'link_after'   => '</li>',
     890            'count_before' => ' <span class="count">(',
     891            'count_after'  => ')</span>',
     892            'sep'          => ' | ',
     893
     894            // Retired, use 'sep' instead
     895            'separator'    => false
     896        ),
     897        'get_admin_repair_tool_status_filters'
     898    );
    888899
    889900    /**
     
    926937
    927938    // Build the filter URL
    928     $filter_url = add_query_arg( array(
    929         'status' => 'pending'
    930     ), $tools_url );
     939    $filter_url = add_query_arg(
     940        array(
     941            'status' => 'pending'
     942        ),
     943        $tools_url
     944    );
    931945
    932946    // Count HTML
Note: See TracChangeset for help on using the changeset viewer.