DefaultTools::getFixers()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 12
c 0
b 0
f 0
ccs 0
cts 10
cp 0
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
crap 2
1
<?php
2
3
  namespace Funivan\Cs\Configuration;
4
5
  use Funivan\Cs\FileTool\FileTool;
6
  use Funivan\Cs\Tools\Composer\ComposerReview;
7
  use Funivan\Cs\Tools\LineEnding\LineEndingFixer;
8
  use Funivan\Cs\Tools\LineEnding\LineEndingReview;
9
  use Funivan\Cs\Tools\Php\ClosingTags\ClosingTagsReview;
10
  use Funivan\Cs\Tools\Php\FileStartLine\FileStartLineReview;
11
  use Funivan\Cs\Tools\Php\LineAfterOpenTag\LineAfterOpenTagFixer;
12
  use Funivan\Cs\Tools\Php\LineAfterOpenTag\LineAfterOpenTagReview;
13
  use Funivan\Cs\Tools\Php\LineBeforeClassEnd\LineBeforeClassEndFixer;
14
  use Funivan\Cs\Tools\Php\LineBeforeClassEnd\LineBeforeClassEndReview;
15
  use Funivan\Cs\Tools\Php\OpenTags\PhpOpenTagFormat;
16
  use Funivan\Cs\Tools\Php\OpenTags\OpenTagsFixer;
17
  use Funivan\Cs\Tools\Php\OpenTags\OpenTagsReview;
18
  use Funivan\Cs\Tools\Php\ReturnTypeFormat\ReturnTypeFormatFixer;
19
  use Funivan\Cs\Tools\Php\SyntaxCheck\SyntaxCheckReview;
20
  use Funivan\Cs\Tools\SpacesInEmptyLines\SpacesInEmptyLinesFixer;
21
  use Funivan\Cs\Tools\SpacesInEmptyLines\SpacesInEmptyLinesReview;
22
23
  /**
24
   * List of default fixers and review tools
25
   *
26
   * @author Ivan Shcherbak <[email protected]> 2016
27
   */
28
  final class DefaultTools {
29
30
    /**
31
     * @return FileTool[]
32
     */
33
    public static function getFixers() {
34
      return [
35
        new LineEndingFixer(),
36
        new LineAfterOpenTagFixer(),
37
38
        new SpacesInEmptyLinesFixer(),
39
        new LineBeforeClassEndFixer(),
40
41
        new OpenTagsFixer(PhpOpenTagFormat::LONG),
42
        new ReturnTypeFormatFixer(),
43
      ];
44
    }
45
46
47
    /**
48
     * @return FileTool[]
49
     */
50
    public static function getReviews() {
51
      return [
52
        new LineEndingReview(),
53
        new LineBeforeClassEndReview(),
54
        new FileStartLineReview(),
55
        new SyntaxCheckReview(),
56
        new ClosingTagsReview(),
57
        new SpacesInEmptyLinesReview(),
58
        new ComposerReview(),
59
        new LineAfterOpenTagReview(),
60
61
        new OpenTagsReview(PhpOpenTagFormat::LONG),
62
      ];
63
    }
64
65
  }