}
}
- protected static function trimStars( $str ) {
+ protected function trimStars( $str ) {
$i = $count = 0;
- $length = strlen( $str );
- for ( $i = 0; $i < $length; $i++ ) {
- if ( $str[$i] != '*' )
- return array( $i, ltrim( $str, '* ' ) );
- }
+ $numStars = strspn( $str, '*' );
+ return array( $numStars, ltrim( substr( $str, $numStars ), ' ' ) );
}
protected function stackItem( &$list, $path, $item ) {
$position[] = $item;
}
- protected function makeHtml( &$tagset, $depth = 0 ) {
+ protected function makeHtml( $tagset, $depth = 0 ) {
foreach ( $tagset as $key => $val )
if ( is_array( $val ) ) {
$this->html .= $this->outputOption(