1 | <?php |
||
2 | |||
3 | namespace drupol\PhpCsFixerConfigsDrupal\Fixer; |
||
4 | |||
5 | use PhpCsFixer\Fixer\ConfigurableFixerInterface; |
||
6 | use PhpCsFixer\Tokenizer\Tokens; |
||
7 | use SplFileInfo; |
||
8 | |||
9 | /** |
||
10 | * Class LineLengthFixer. |
||
11 | */ |
||
12 | final class LineLengthFixer implements ConfigurableFixerInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var \Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer |
||
0 ignored issues
–
show
|
|||
16 | */ |
||
17 | private $lineLengthFixer; |
||
18 | |||
19 | /** |
||
20 | * LineLengthFixer constructor. |
||
21 | * |
||
22 | * @param $indent |
||
23 | * @param $lineEnding |
||
24 | */ |
||
25 | public function __construct($indent, $lineEnding) |
||
26 | { |
||
27 | $whitespacesFixerConfig = new \PhpCsFixer\WhitespacesFixerConfig($indent, $lineEnding); |
||
28 | |||
29 | $indentDetector = new \Symplify\TokenRunner\Analyzer\FixerAnalyzer\IndentDetector( |
||
0 ignored issues
–
show
The type
Symplify\TokenRunner\Ana...Analyzer\IndentDetector was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths
Loading history...
|
|||
30 | $whitespacesFixerConfig |
||
31 | ); |
||
32 | |||
33 | $blockFinder = new \Symplify\TokenRunner\Analyzer\FixerAnalyzer\BlockFinder(); |
||
0 ignored issues
–
show
The type
Symplify\TokenRunner\Ana...xerAnalyzer\BlockFinder was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths
Loading history...
|
|||
34 | |||
35 | $tokenSkipper = new \Symplify\TokenRunner\Analyzer\FixerAnalyzer\TokenSkipper( |
||
0 ignored issues
–
show
The type
Symplify\TokenRunner\Ana...erAnalyzer\TokenSkipper was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths
Loading history...
|
|||
36 | $blockFinder |
||
37 | ); |
||
38 | |||
39 | $lineLengthTransformer = new \Symplify\TokenRunner\Transformer\FixerTransformer\LineLengthTransformer( |
||
0 ignored issues
–
show
The type
Symplify\TokenRunner\Tra...r\LineLengthTransformer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths
Loading history...
|
|||
40 | $indentDetector, |
||
41 | $tokenSkipper, |
||
42 | $whitespacesFixerConfig |
||
43 | ); |
||
44 | |||
45 | $this->lineLengthFixer = new \Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer( |
||
46 | $lineLengthTransformer, |
||
47 | $blockFinder |
||
48 | ); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function configure(array $configuration = null) |
||
55 | { |
||
56 | return $this->lineLengthFixer->configure((array) $configuration); |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function fix(SplFileInfo $file, Tokens $tokens) |
||
63 | { |
||
64 | return $this->lineLengthFixer->fix($file, $tokens); |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function getDefinition() |
||
71 | { |
||
72 | return $this->lineLengthFixer->getDefinition(); |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function getName() |
||
79 | { |
||
80 | return 'Drupal/line_length'; |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function getPriority() |
||
87 | { |
||
88 | return $this->lineLengthFixer->getPriority(); |
||
89 | } |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function isCandidate(Tokens $tokens) |
||
95 | { |
||
96 | return $this->lineLengthFixer->isCandidate($tokens); |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function isRisky() |
||
103 | { |
||
104 | return $this->lineLengthFixer->isRisky(); |
||
105 | } |
||
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | public function supports(SplFileInfo $file) |
||
111 | { |
||
112 | return $this->lineLengthFixer->supports($file); |
||
113 | } |
||
114 | } |
||
115 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths