Making WordPress.org


Ignore:
Timestamp:
06/19/2016 08:40:01 PM (10 years ago)
Author:
obenland
Message:

Plugin Directory: Move readme classes into their own namespace.

See #1584.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php

    r3476 r3477  
    11<?php
    2 namespace WordPressdotorg\Plugin_Directory\Admin;
    3 use \WordPressdotorg\Plugin_Directory\Readme_Parser;
     2namespace WordPressdotorg\Plugin_Directory\Readme;
    43use WordPressdotorg\Plugin_Directory\Tools\Filesystem;
    54
    … …  
    76 * A wp-admin interface to validate readme files.
    87 *
    9  * @package WordPressdotorg\Plugin_Directory\Admin
     8 * @package WordPressdotorg\Plugin_Directory\Readme
    109 */
    11 class Readme_Validator {
    12 
    13         /**
    14          * Fetch the instance of the Readme_Validator class.
     10class Validator {
     11
     12        /**
     13         * Fetch the instance of the Validator class.
    1514         *
    1615         * @static
    … …  
    1918                static $instance = null;
    2019
    21                 return ! is_null( $instance ) ? $instance : $instance = new Readme_Validator();
    22         }
    23 
    24         /**
    25          * Constructor.
     20                return ! is_null( $instance ) ? $instance : $instance = new Validator();
     21        }
     22
     23        /**
     24         * Validator constructor.
    2625         */
    2726        private function __construct() {
    … …  
    10099
    101100                file_put_contents( $temp_file, $readme );
    102                 $readme = new Readme_Parser( $temp_file );
     101                $readme = new Parser( $temp_file );
    103102
    104103                // Fatal errors.
Note: See TracChangeset for help on using the changeset viewer.