replacers: Set explicit visiblity on functions
authorKunal Mehta <legoktm@gmail.com>
Thu, 29 Jan 2015 04:46:13 +0000 (20:46 -0800)
committerKunal Mehta <legoktm@gmail.com>
Thu, 29 Jan 2015 04:46:13 +0000 (20:46 -0800)
Change-Id: I4f35ea9b4bd2503bc612dc25dc8d34fc5ca040a0

includes/libs/replacers/DoubleReplacer.php
includes/libs/replacers/HashtableReplacer.php
includes/libs/replacers/RegexlikeReplacer.php
includes/libs/replacers/Replacer.php

index ab8ce95..20a4089 100644 (file)
@@ -27,7 +27,7 @@ class DoubleReplacer extends Replacer {
         * @param mixed $to
         * @param int $index
         */
-       function __construct( $from, $to, $index = 0 ) {
+       public function __construct( $from, $to, $index = 0 ) {
                $this->from = $from;
                $this->to = $to;
                $this->index = $index;
@@ -37,7 +37,7 @@ class DoubleReplacer extends Replacer {
         * @param array $matches
         * @return mixed
         */
-       function replace( $matches ) {
+       public function replace( $matches ) {
                return str_replace( $this->from, $this->to, $matches[$this->index] );
        }
 }
index 1bb6fbc..e1572f2 100644 (file)
@@ -28,7 +28,7 @@ class HashtableReplacer extends Replacer {
         * @param array $table
         * @param int $index
         */
-       function __construct( $table, $index = 0 ) {
+       public function __construct( $table, $index = 0 ) {
                $this->table = $table;
                $this->index = $index;
        }
@@ -37,7 +37,7 @@ class HashtableReplacer extends Replacer {
         * @param array $matches
         * @return mixed
         */
-       function replace( $matches ) {
+       public function replace( $matches ) {
                return $this->table[$matches[$this->index]];
        }
 }
index 2923f5b..630a754 100644 (file)
@@ -27,7 +27,7 @@ class RegexlikeReplacer extends Replacer {
        /**
         * @param string $r
         */
-       function __construct( $r ) {
+       public function __construct( $r ) {
                $this->r = $r;
        }
 
@@ -35,7 +35,7 @@ class RegexlikeReplacer extends Replacer {
         * @param array $matches
         * @return string
         */
-       function replace( $matches ) {
+       public function replace( $matches ) {
                $pairs = array();
                foreach ( $matches as $i => $match ) {
                        $pairs["\$$i"] = $match;
index 96f1660..924fb30 100644 (file)
@@ -26,7 +26,7 @@ class Replacer {
        /**
         * @return array
         */
-       function cb() {
+       public function cb() {
                return array( &$this, 'replace' );
        }
 }