Skip to content

Commit ecdfe0e

Browse files
committed
init commit
# Conflicts: # LICENSE # README.md
1 parent 0bd171e commit ecdfe0e

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

LICENSE.orig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
MIT License
2+
3+
<<<<<<< HEAD
4+
Copyright (c) 2019 Tomas Pospisil
5+
=======
6+
Copyright (c) 2018 Tomas Pospisil
7+
>>>>>>> 0bd171e... init commit
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy
10+
of this software and associated documentation files (the "Software"), to deal
11+
in the Software without restriction, including without limitation the rights
12+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the Software is
14+
furnished to do so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.

README.md.orig

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<<<<<<< HEAD
2+
# easycodingstandard-fileoutput
3+
File Output formatter for Easy Coding Standard
4+
=======
5+
# PHPStan FileOutput
6+
An error formatter for [Easy Coding Standard](https://github.com/phpstan/phpstan) that exports analysis result into HTML file
7+
8+
## Installation
9+
```
10+
composer require noximo/phpstan-fileoutput
11+
```
12+
13+
## Usage
14+
Edit or create your phpstan.neon file and register new error formatter.
15+
First two parameters are mandatory.
16+
17+
- First specifies path to file in which data will be outputed.
18+
19+
- Second specifies which other formatter will be used with FileOutput formatter running silently in the background. You can set it to null if you wish to only work with FileOutput-generated files.
20+
```
21+
services:
22+
errorFormatter.fileoutput: # Can be any name after errorFormatter
23+
class: noximo\FileOutput(./example/phpstan.html, null)
24+
```
25+
26+
You can (and should) specify second parameter to use one of the other formatters as well, so console output will be unaffected:
27+
```
28+
class: noximo\FileOutput(./example/phpstan.html, @errorFormatter.raw)
29+
```
30+
At the time of writing of this readme these formatters were available by default in PHPStan:
31+
- ```errorFormatter.checkstyle```,
32+
- ```errorFormatter.json```,
33+
- ```errorFormatter.prettyJson```,
34+
- ```errorFormatter.raw```,
35+
- ```errorFormatter.table```
36+
37+
_Check [PHPStan repository](https://github.com/phpstan/phpstan) for possible updates._
38+
39+
Third parameter sets custom output template.
40+
```
41+
class: noximo\FileOutput(./example/phpstan.html, null, ./tests/alternative_table.phtml)
42+
```
43+
See [table.phtml](/src/table.phtml) for implementation details and data structure.
44+
45+
## Output
46+
FileOutputer will generate HTML file (assuming default template) with hyperlinks directly into PHP files where errors were encountered. If you want to leverage clickable links, set up your enviromenent according to this article: [https://tracy.nette.org/en/open-files-in-ide](https://tracy.nette.org/en/open-files-in-ide)
47+
48+
Note: When you fix an error, file structure and line numbers can no longer correspond to line number at the time of analysis. You'll need to re-run PHPStan to regenerate output file. Errors are outputed in descending order (line-number wise) so there's bigger chance that you won't lines out of their current positions.
49+
>>>>>>> 0bd171e... init commit

0 commit comments

Comments
 (0)