1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Funivan\Cs\Configuration; |
4
|
|
|
|
5
|
|
|
use Funivan\Cs\Review\Tools\ComposerReview; |
6
|
|
|
use Funivan\Cs\Review\Tools\PhpFileCloseTagReview; |
7
|
|
|
use Funivan\Cs\Review\Tools\PhpFileStartReview; |
8
|
|
|
use Funivan\Cs\Review\Tools\PhpSyntaxCheckReview; |
9
|
|
|
use Funivan\Cs\ToolBag\Php\LineBeforeClassEnd\LineBeforeClassEndFixer; |
10
|
|
|
use Funivan\Cs\ToolBag\Php\LineBeforeClassEnd\LineBeforeClassEndReview; |
11
|
|
|
use Funivan\Cs\ToolBag\PhpOpenTagLineDelimiter\LineAfterOpenTagFixer; |
12
|
|
|
use Funivan\Cs\ToolBag\PhpOpenTagLineDelimiter\LineAfterOpenTagReview; |
13
|
|
|
use Funivan\Cs\Tools\LineEnding\LineEndingFixer; |
14
|
|
|
use Funivan\Cs\Tools\LineEnding\LineEndingReview; |
15
|
|
|
use Funivan\Cs\Tools\PhpOpenTags\PhpOpenTagsConfiguration; |
16
|
|
|
use Funivan\Cs\Tools\SpacesInEmptyLines\SpacesInEmptyLinesFixer; |
17
|
|
|
use Funivan\Cs\Tools\SpacesInEmptyLines\SpacesInEmptyLinesReview; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* List of default fixers and review tools |
21
|
|
|
*/ |
22
|
|
|
final class DefaultTools { |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @return ToolConfiguration[] |
26
|
|
|
*/ |
27
|
|
|
public static function getFixers() { |
28
|
|
|
return [ |
29
|
|
|
new ToolConfiguration(LineEndingFixer::NAME, LineEndingFixer::class), |
30
|
|
|
new ToolConfiguration(LineAfterOpenTagFixer::NAME_FIXER, LineAfterOpenTagFixer::class), |
31
|
|
|
new ToolConfiguration(SpacesInEmptyLinesFixer::NAME, SpacesInEmptyLinesFixer::class), |
32
|
|
|
new ToolConfiguration(LineBeforeClassEndFixer::NAME, LineBeforeClassEndFixer::class), |
33
|
|
|
|
34
|
|
|
new PhpOpenTagsConfiguration(PhpOpenTagsConfiguration::TAG_FORMAT_FULL, PhpOpenTagsConfiguration::FIXER), |
35
|
|
|
]; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @return ToolConfiguration[] |
41
|
|
|
*/ |
42
|
|
|
public static function getReviews() { |
43
|
|
|
return [ |
44
|
|
|
new ToolConfiguration(LineEndingReview::NAME, LineEndingReview::class), |
45
|
|
|
new ToolConfiguration(LineBeforeClassEndReview::NAME, LineBeforeClassEndReview::class), |
46
|
|
|
new ToolConfiguration(PhpFileStartReview::NAME, PhpFileStartReview::class), |
47
|
|
|
new ToolConfiguration(PhpSyntaxCheckReview::NAME, PhpSyntaxCheckReview::class), |
48
|
|
|
new ToolConfiguration(PhpFileCloseTagReview::NAME, PhpFileCloseTagReview::class), |
49
|
|
|
new ToolConfiguration(SpacesInEmptyLinesReview::NAME, SpacesInEmptyLinesReview::class), |
50
|
|
|
new ToolConfiguration(ComposerReview::NAME, ComposerReview::class), |
51
|
|
|
new ToolConfiguration(LineAfterOpenTagReview::NAME, LineAfterOpenTagReview::class), |
52
|
|
|
|
53
|
|
|
new PhpOpenTagsConfiguration(PhpOpenTagsConfiguration::TAG_FORMAT_FULL, PhpOpenTagsConfiguration::REVIEW), |
54
|
|
|
]; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
} |