Skip to content

Commit

Permalink
Revert "add HTML formatter" (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSteveKing authored Mar 8, 2022
1 parent 889f10c commit 5e84dab
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 2,282 deletions.
8 changes: 2 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,10 @@
"phpunit/phpunit": "^8.0|^9.0",
"rector/rector": "0.11.56",
"symfony/var-dumper": "^4.2|^5.0|^6.0",
"roave/no-floaters": "^1.1",
"symplify/easy-coding-standard": "^6.0",
"thecodingmachine/phpstan-strict-rules": "^0.11.0",
"twig/twig": "^2.0"
"thecodingmachine/phpstan-strict-rules": "^0.12.0"
},
"suggest": {
"ext-simplexml": "It is needed for the checkstyle formatter",
"twig/twig": "Twig:^2.0 is needed to support the HTML formattter"
"ext-simplexml": "It is needed for the checkstyle formatter"
},
"autoload-dev": {
"psr-4": {
Expand Down
2,102 changes: 0 additions & 2,102 deletions dashboard.html

This file was deleted.

8 changes: 0 additions & 8 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,26 +133,18 @@ For changing the output format you can add the `format` flag. The following form
- console
- json
- checkstyle
- html

```bash
./vendor/bin/phpinsights analyse --format=json
```

::: Twig for HTML
The HTML formatter requires Twig to render.
So you have to add it do your dependencies if you want to use it.
`composer require --dev twig/twig: ^2.0`
:::

## Saving output to file

You can pipe the result to a file or to anywhere you like.
A common use case is parsing the output formatted as json to a json file.

```bash
./vendor/bin/phpinsights analyse --format=json > test.json
./vendor/bin/phpinsights analyse --format=html > test.html
```

When piping the result remember to add the no interaction flag `-n`, as the part where you need to interact is also getting piped. (the json format does not have any interaction)
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ parameters:
- '#Access to an undefined property PHP_CodeSniffer\\Sniffs\\Sniff::\$#'
- '#NunoMaduro\\PhpInsights\\Application\\Console\\Formatters\\Json has an unused parameter \$input#'
- '#NunoMaduro\\PhpInsights\\Application\\Console\\Formatters\\Checkstyle has an unused parameter \$input#'
- '#NunoMaduro\\PhpInsights\\Application\\Console\\Formatters\\Html has an unused parameter \$input#'
- '#In method "NunoMaduro\\PhpInsights\\Domain\\File::process", caught "Throwable" must be rethrown#'
- '#In method "NunoMaduro\\PhpInsights\\Domain\\FileProcessors\\FixerFileProcessor::processFile", caught "Throwable" must be rethrown#'
- '#Empty catch block. If you are sure this is meant to be empty, please add a "// @ignoreException" comment in the catch block.#'
Expand Down
1 change: 0 additions & 1 deletion src/Application/Console/Formatters/FormatResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ final class FormatResolver
'checkstyle' => Checkstyle::class,
'github-action' => GithubAction::class,
'codeclimate' => CodeClimate::class,
'html' => Html::class,
];

public static function resolve(
Expand Down
70 changes: 0 additions & 70 deletions src/Application/Console/Formatters/Html.php

This file was deleted.

8 changes: 0 additions & 8 deletions src/Domain/Insights/InsightCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ public function getCollector(): Collector
return $this->collector;
}

/**
* @return array<string, array<\NunoMaduro\PhpInsights\Domain\Contracts\Insight>>
*/
public function getInsightsPerMetric(): array
{
return $this->insightsPerMetric;
}

/**
* Gets all insights.
*
Expand Down
46 changes: 0 additions & 46 deletions views/dashboard.html.twig

This file was deleted.

35 changes: 0 additions & 35 deletions views/partials/insights_per_metric.html.twig

This file was deleted.

5 changes: 0 additions & 5 deletions views/partials/stats_per_metric.html.twig

This file was deleted.

1 comment on commit 5e84dab

@erick-jeronimo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the HTML Formatter was removed?

Please sign in to comment.