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 1818 */
1919class AnsiToHtmlConverter
2020{
21- protected $ inlineColors ;
22- protected $ colorNames ;
21+ protected array $ inlineColors ;
22+ protected array $ colorNames ;
2323
2424 public function __construct (
2525 protected Theme $ theme = new Theme (),
@@ -99,6 +99,7 @@ protected function convertAnsiToColor(string $ansi): string
9999 $ options = explode ('; ' , $ ansi );
100100
101101 foreach ($ options as $ key => $ option ) {
102+ $ option = (int ) $ option ;
102103 if ($ option >= 30 && $ option < 38 ) {
103104 $ fg = $ option - 30 ;
104105 } elseif ($ option >= 40 && $ option < 48 ) {
Original file line number Diff line number Diff line change 1414 },
1515 "require-dev" : {
1616 "twig/twig" : " ^3.0" ,
17+ "phpstan/phpstan" : " ^2.0" ,
1718 "phpunit/phpunit" : " ^11.4"
1819 },
1920 "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