Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/24/2025 07:23:06 PM (11 months ago)
Author:
johnjamesjacoby
Message:

Tools - Code Improvement: stop ignoring these PHPCS sniffs:

  • PEAR.Files.IncludingFile.UseRequire
  • PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineDEFAULT
  • PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose
  • Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
  • Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
  • Squiz.PHP.EmbeddedPhp.MultipleStatements
  • Squiz.PHP.NonExecutableCode.Unreachable
  • Universal.Arrays.DuplicateArrayKey.Found
  • Universal.ControlStructures.DisallowLonelyIf.Found
  • WordPress.PHP.NoSilencedErrors.Discouraged

This commit includes code formatting changes for the above sniffs.

See #3658.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/locks.php

    r7378 r7379  
    2424
    2525        // Bail if no post
    26         if ( ! $post = get_post( $post_id ) ) {
     26        $post = get_post( $post_id );
     27        if ( empty( $post ) ) {
    2728                return false;
    2829        }
    2930
    3031        // Bail if no lock
    31         if ( ! $lock = get_post_meta( $post->ID, '_edit_lock', true ) ) {
     32        $lock = get_post_meta( $post->ID, '_edit_lock', true );
     33        if ( empty( $lock ) ) {
    3234                return false;
    3335        }
    … …  
    6365
    6466        // Bail if no post
    65         if ( ! $post = get_post( $post_id ) ) {
     67        $post = get_post( $post_id );
     68        if ( empty( $post ) ) {
    6669                return false;
    6770        }
    6871
    6972        // Bail if no user
    70         if ( 0 === ( $user_id = get_current_user_id() ) ) {
     73        $user_id = get_current_user_id();
     74        if ( empty( $user_id ) ) {
    7175                return false;
    7276        }
Note: See TracChangeset for help on using the changeset viewer.