}
}
- protected static function trimStars( $str ) {
- $i = $count = 0;
-
- $length = strlen( $str );
- for ( $i = 0; $i < $length; $i++ ) {
- if ( $str[$i] != '*' )
- return array( $i, ltrim( $str, '* ' ) );
- }
+ protected function trimStars( $str ) {
+ $numStars = strspn( $str, '*' );
+ return array( $numStars, ltrim( substr( $str, $numStars ), ' ' ) );
}
protected function stackItem( &$list, $path, $item ) {
*
* @param $str String: license name??
*/
- function License( $str ) {
+ function __construct( $str ) {
list( $text, $template ) = explode( '|', strrev( $str ), 2 );
$this->template = strrev( $template );