PHP code example of matheusab / rector-html-output-formatter

1. Go to this page and download the library: Download matheusab/rector-html-output-formatter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

matheusab / rector-html-output-formatter example snippets


return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->singleton(HtmlOutputFormatter::class, HtmlOutputFormatter::class);
    $rectorConfig->tag(HtmlOutputFormatter::class, OutputFormatterInterface::class);
    $rectorConfig
        ->when(HtmlOutputFormatter::class)
        ->needs('$exportedFilePathPrefix')
        ->give(__DIR__ . '/rector-report');

$rectorConfig
    ->when(HtmlOutputFormatter::class)
    ->needs('$customReportTemplatePath')
    ->give(__DIR__ . '/custom_template.php');