DefaultTools   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 15

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 38
c 0
b 0
f 0
wmc 2
lcom 0
cbo 15
ccs 0
cts 23
cp 0
rs 9.1666

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFixers() 0 12 1
A getReviews() 0 14 1
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
  }