static function run_php_loc_report( $task=null, $args=array(), $cliopts=array() )
    {
        $opts = self::getOpts( @$args[0], @$args[1], $cliopts );
        if ( !SharedLock::acquire( $opts['extension']['name'], LOCK_SH, $opts ) )
            throw new PakeException( "Source code locked by another process" );

        $destdir = self::getReportDir( $opts ) . '/' . $opts['extension']['name'];
        $phploc = self::getTool( 'phploc', $opts, true );

        $out = pake_sh( "$phploc -n " .
            escapeshellarg( self::getBuildDir( $opts ) . '/' . $opts['extension']['name'] ) );

        pake_mkdirs( $destdir );
        pake_write_file( $destdir . '/phploc.txt', $out, true );

        SharedLock::release( $opts['extension']['name'], LOCK_SH, $opts );
    }