From: Kunal Mehta Date: Thu, 29 Jan 2015 04:46:13 +0000 (-0800) Subject: replacers: Set explicit visiblity on functions X-Git-Tag: 1.31.0-rc.0~12573 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=1b05ff21bc4d785c0c82e1720839993d8dcc785f;p=lhc%2Fweb%2Fwiklou.git replacers: Set explicit visiblity on functions Change-Id: I4f35ea9b4bd2503bc612dc25dc8d34fc5ca040a0 --- diff --git a/includes/libs/replacers/DoubleReplacer.php b/includes/libs/replacers/DoubleReplacer.php index ab8ce95906..20a4089a6c 100644 --- a/includes/libs/replacers/DoubleReplacer.php +++ b/includes/libs/replacers/DoubleReplacer.php @@ -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] ); } } diff --git a/includes/libs/replacers/HashtableReplacer.php b/includes/libs/replacers/HashtableReplacer.php index 1bb6fbc269..e1572f2b57 100644 --- a/includes/libs/replacers/HashtableReplacer.php +++ b/includes/libs/replacers/HashtableReplacer.php @@ -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]]; } } diff --git a/includes/libs/replacers/RegexlikeReplacer.php b/includes/libs/replacers/RegexlikeReplacer.php index 2923f5b719..630a754762 100644 --- a/includes/libs/replacers/RegexlikeReplacer.php +++ b/includes/libs/replacers/RegexlikeReplacer.php @@ -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; diff --git a/includes/libs/replacers/Replacer.php b/includes/libs/replacers/Replacer.php index 96f1660dc3..924fb30775 100644 --- a/includes/libs/replacers/Replacer.php +++ b/includes/libs/replacers/Replacer.php @@ -26,7 +26,7 @@ class Replacer { /** * @return array */ - function cb() { + public function cb() { return array( &$this, 'replace' ); } }