Change-Id: I4f35ea9b4bd2503bc612dc25dc8d34fc5ca040a0
* @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;
* @param array $matches
* @return mixed
*/
- function replace( $matches ) {
+ public function replace( $matches ) {
return str_replace( $this->from, $this->to, $matches[$this->index] );
}
}
* @param array $table
* @param int $index
*/
- function __construct( $table, $index = 0 ) {
+ public function __construct( $table, $index = 0 ) {
$this->table = $table;
$this->index = $index;
}
* @param array $matches
* @return mixed
*/
- function replace( $matches ) {
+ public function replace( $matches ) {
return $this->table[$matches[$this->index]];
}
}
/**
* @param string $r
*/
- function __construct( $r ) {
+ public function __construct( $r ) {
$this->r = $r;
}
* @param array $matches
* @return string
*/
- function replace( $matches ) {
+ public function replace( $matches ) {
$pairs = array();
foreach ( $matches as $i => $match ) {
$pairs["\$$i"] = $match;
/**
* @return array
*/
- function cb() {
+ public function cb() {
return array( &$this, 'replace' );
}
}