| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 17 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 33 | 	static function wrap( $template ) { | 
            ||
| 34 | self::$main_template = $template;  | 
            ||
| 35 | |||
| 36 | self::$base = substr( basename( self::$main_template ), 0, - 4 );  | 
            ||
| 37 | |||
| 38 | 		if ( 'index' == self::$base ) { | 
            ||
| 39 | self::$base = false;  | 
            ||
| 40 | }  | 
            ||
| 41 | |||
| 42 | $templates = array( 'wrapper.php' );  | 
            ||
| 43 | |||
| 44 | 		if ( false !== self::$base ) { | 
            ||
| 45 | array_unshift( $templates, sprintf( 'wrapper-%s.php', self::$base ) );  | 
            ||
| 46 | }  | 
            ||
| 47 | |||
| 48 | return locate_template( $templates );  | 
            ||
| 49 | }  | 
            ||
| 50 | }  | 
            ||
| 52 | add_filter( 'template_include', array( 'Bitsy_Wrapping', 'wrap' ), 99 );  | 
            
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.