Make WordPress Core


Ignore:
Timestamp:
10/18/2021 05:51:17 PM (4 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add public visibility to methods in src directory.

This commit adds the public visibility keyword to each method which did not have an explicit visibility keyword.

Why public?

With no visibility previously declared, these methods are implicitly public and available for use. Changing them to anything else would be a backwards-compatibility break.

Props costdev, jrf.
See #54177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pomo/entry.php

    r49184 r51919  
    4141         *  - flags (array) -- flags like php-format
    4242         */
    43         function __construct( $args = array() ) {
     43        public function __construct( $args = array() ) {
    4444            // If no singular -- empty object.
    4545            if ( ! isset( $args['singular'] ) ) {
     
    8181         * @return string|bool the key or false if the entry is empty
    8282         */
    83         function key() {
     83        public function key() {
    8484            if ( null === $this->singular || '' === $this->singular ) {
    8585                return false;
     
    9797         * @param object $other
    9898         */
    99         function merge_with( &$other ) {
     99        public function merge_with( &$other ) {
    100100            $this->flags      = array_unique( array_merge( $this->flags, $other->flags ) );
    101101            $this->references = array_unique( array_merge( $this->references, $other->references ) );
Note: See TracChangeset for help on using the changeset viewer.