src/classes/CCError/Trace.php
private function parse_source()
	{
		if ( !$this->file() )
		{
			return null;
		}
		
		// get the file
		$lines = file( $this->file );
		
		/*
		 * parse the relevant source
		 */
		$size = 10;
		
		$start = $this->line - ( $size / 2 );
		$end = $this->line + ( $size / 2 );
		
		// check if start is in the middle of a comment
		while( $start > 0 && substr( trim( $lines[$start-1] ), 0, 1 ) === '*' )
		{
			$start--;
		}
		
		$source = array();
		
		for ( $i=$start-1; $i<$end; $i++ )
		{
			if ( array_key_exists( $i, $lines ) )
			{
				$source[$i] = str_replace( "\t", '    ', $lines[$i] );
			}
		}
		
		$this->source = $source;
	}
private function parse_source()
	{
		if ( !$this->file() )
		{
			return null;
		}
		
		// get the file
		$lines = file( $this->file );
		
		/*
		 * parse the relevant source
		 */
		$size = 10;
		
		$start = $this->line - ( $size / 2 );
		$end = $this->line + ( $size / 2 );
		
		// check if start is in the middle of a comment
		while( $start > 0 && substr( trim( $lines[$start-1] ), 0, 1 ) === '*' )
		{
			$start--;
		}
		
		$source = array();
		
		for ( $i=$start-1; $i<$end; $i++ )
		{
			if ( array_key_exists( $i, $lines ) )
			{
				$source[$i] = str_replace( "\t", '    ', $lines[$i] );
			}
		}
		
		$this->source = $source;
	}
private function parse_source ( ) { if ( ! $ this -> file ( ) ) { return null ; } // get the file $ lines = file ( $ this -> file ) ; /*
		 * parse the relevant source
		 */ $ size = 10 ; $ start = $ this -> line - ( $ size / 2 ) ; $ end = $ this -> line + ( $ size / 2 ) ; // check if start is in the middle of a comment while ( $ start > 0 && substr ( trim ( $ lines [ $ start - 1 ] ) , 0 , 1 ) === '*' ) { $ start -- ; } $ source = array ( ) ; for ( $ i = $ start - 1 ; $ i < $ end ; $ i ++ ) { if ( array_key_exists ( $ i , $ lines ) ) { $ source [ $ i ] = str_replace ( "\t" , '    ' , $ lines [ $ i ] ) ; } } $ this -> source = $ source ; }
parse the source file

@return void
parse the source file