File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ return (new PhpCsFixer \Config ())
4
+ ->setRules ([
5
+ '@PHP71Migration ' => true ,
6
+ '@PHPUnit75Migration:risky ' => true ,
7
+ '@Symfony ' => true ,
8
+ '@Symfony:risky ' => true ,
9
+ 'protected_to_private ' => false ,
10
+ ])
11
+ ->setRiskyAllowed (true )
12
+ ->setFinder (
13
+ (new PhpCsFixer \Finder ())
14
+ ->in (__DIR__ .'/SensioLabs ' )
15
+ ->append ([__FILE__ ])
16
+ )
17
+ ->setCacheFile ('.php-cs-fixer.cache ' )
18
+ ;
Original file line number Diff line number Diff line change 18
18
*/
19
19
class AnsiToHtmlConverter
20
20
{
21
- protected $ inlineColors ;
22
- protected $ colorNames ;
21
+ protected array $ inlineColors ;
22
+ protected array $ colorNames ;
23
23
24
24
public function __construct (
25
25
protected Theme $ theme = new Theme (),
@@ -99,6 +99,7 @@ protected function convertAnsiToColor(string $ansi): string
99
99
$ options = explode ('; ' , $ ansi );
100
100
101
101
foreach ($ options as $ key => $ option ) {
102
+ $ option = (int ) $ option ;
102
103
if ($ option >= 30 && $ option < 38 ) {
103
104
$ fg = $ option - 30 ;
104
105
} elseif ($ option >= 40 && $ option < 48 ) {
Original file line number Diff line number Diff line change 14
14
},
15
15
"require-dev" : {
16
16
"twig/twig" : " ^3.0" ,
17
+ "phpstan/phpstan" : " ^2.0" ,
17
18
"phpunit/phpunit" : " ^11.4"
18
19
},
19
20
"autoload" : {
Original file line number Diff line number Diff line change
1
+ parameters:
2
+ level: 3
3
+ paths:
4
+ - SensioLabs
You can’t perform that action at this time.
0 commit comments