Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/22/2025 06:05:25 AM (7 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/extend/buddypress/groups.php

    r7372 r7378  
    605605
    606606            // Create the initial forum
    607             $forum_id = bbp_insert_forum( array(
    608                 'post_parent'  => bbp_get_group_forums_root_id(),
    609                 'post_title'   => $group->name,
    610                 'post_content' => $group->description,
    611                 'post_status'  => $status
    612             ) );
     607            $forum_id = bbp_insert_forum(
     608                array(
     609                    'post_parent'  => bbp_get_group_forums_root_id(),
     610                    'post_title'   => $group->name,
     611                    'post_content' => $group->description,
     612                    'post_status'  => $status
     613                )
     614            );
    613615
    614616            // Setup forum args with forum ID
     
    739741
    740742                // Create the initial forum
    741                 $forum_id = bbp_insert_forum( array(
    742                     'post_parent'  => bbp_get_group_forums_root_id(),
    743                     'post_title'   => bp_get_new_group_name(),
    744                     'post_content' => bp_get_new_group_description(),
    745                     'post_status'  => $status
    746                 ) );
     743                $forum_id = bbp_insert_forum(
     744                    array(
     745                        'post_parent'  => bbp_get_group_forums_root_id(),
     746                        'post_title'   => bp_get_new_group_name(),
     747                        'post_content' => bp_get_new_group_description(),
     748                        'post_status'  => $status
     749                    )
     750                );
    747751
    748752                // Run the BP-specific functions for new groups
     
    812816        // Validate forum_id
    813817        $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
    814         $group_id = ! empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
     818        $group_id = ! empty( $forum_args['group_id'] )
     819            ? $forum_args['group_id']
     820            : bp_get_current_group_id();
    815821
    816822        bbp_add_forum_id_to_group( $group_id, $forum_id );
     
    836842        // Validate forum_id
    837843        $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
    838         $group_id = ! empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
     844        $group_id = ! empty( $forum_args['group_id'] )
     845            ? $forum_args['group_id']
     846            : bp_get_current_group_id();
    839847
    840848        bbp_remove_forum_id_from_group( $group_id, $forum_id );
     
    865873
    866874        // Get the first forum ID
    867         $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
    868         $this->remove_forum( array(
    869             'forum_id' => $forum_id,
    870             'group_id' => $group_id
    871         ) );
     875        $forum_id = (int) is_array( $forum_ids )
     876            ? $forum_ids[0]
     877            : $forum_ids;
     878
     879        $this->remove_forum(
     880            array(
     881                'forum_id' => $forum_id,
     882                'group_id' => $group_id
     883            )
     884        );
    872885    }
    873886
     
    10171030
    10181031        // Always load up the group forum
    1019         bbp_has_forums( array(
    1020             'p'           => $forum_id,
    1021             'post_parent' => null
    1022         ) );
     1032        bbp_has_forums(
     1033            array(
     1034                'p'           => $forum_id,
     1035                'post_parent' => null
     1036            )
     1037        );
    10231038
    10241039        // Set the global forum ID
     
    10771092
    10781093                    // Get the topic
    1079                     bbp_has_topics( array(
    1080                         'name'           => bp_action_variable( $offset + 1 ),
    1081                         'posts_per_page' => 1,
    1082                         'show_stickies'  => false
    1083                     ) );
     1094                    bbp_has_topics(
     1095                        array(
     1096                            'name'           => bp_action_variable( $offset + 1 ),
     1097                            'posts_per_page' => 1,
     1098                            'show_stickies'  => false
     1099                        )
     1100                    );
    10841101
    10851102                    // If no topic, 404
     
    11521169
    11531170                    // Get the reply
    1154                     bbp_has_replies( array(
    1155                         'name'           => bp_action_variable( $offset + 1 ),
    1156                         'posts_per_page' => 1
    1157                     ) );
     1171                    bbp_has_replies(
     1172                        array(
     1173                            'name'           => bp_action_variable( $offset + 1 ),
     1174                            'posts_per_page' => 1
     1175                        )
     1176                    );
    11581177
    11591178                    // If no topic, 404
     
    12081227
    12091228            // Reset the query
     1229            // phpcs:ignore WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query
    12101230            wp_reset_query(); ?>
    12111231
Note: See TracChangeset for help on using the changeset viewer.