File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed
Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -160,17 +160,6 @@ services:
160160 -
161161 class : PHPStan\Rules\Properties\UninitializedPropertyRule
162162
163- -
164- class : SebastianBergmann\Diff\Differ
165- arguments :
166- outputBuilder : @SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder
167-
168- -
169- class : SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder
170- arguments :
171- header : ' '
172- addLineNumbers : true
173-
174163 betterReflectionSourceLocator :
175164 class : PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
176165 factory : @PHPStan\Reflection\BetterReflection\BetterReflectionSourceLocatorFactory::create
Original file line number Diff line number Diff line change 2323use PHPStan \Rules \TipRuleError ;
2424use PHPStan \ShouldNotHappenException ;
2525use SebastianBergmann \Diff \Differ ;
26+ use SebastianBergmann \Diff \Output \UnifiedDiffOutputBuilder ;
2627use function get_class ;
2728use function sha1 ;
2829use function str_repeat ;
2930
3031final class RuleErrorTransformer
3132{
3233
34+ private Differ $ differ ;
35+
3336 public function __construct (
3437 private Parser $ parser ,
35- private Differ $ differ ,
3638 )
3739 {
40+ $ this ->differ = new Differ (new UnifiedDiffOutputBuilder ('' , addLineNumbers: true ));
3841 }
3942
4043 /**
Original file line number Diff line number Diff line change 2525final class Patcher
2626{
2727
28- public function __construct (private Differ $ differ )
28+ private Differ $ differ ;
29+
30+ public function __construct ()
2931 {
32+ $ this ->differ = new Differ ();
3033 }
3134
3235 /**
You can’t perform that action at this time.
0 commit comments