File tree Expand file tree Collapse file tree 7 files changed +15
-15
lines changed
Expand file tree Collapse file tree 7 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1212use Tempest \Highlight \Highlighter ;
1313use Tempest \Highlight \WebTheme ;
1414
15- final class CodeBlockRenderer implements NodeRendererInterface
15+ final readonly class CodeBlockRenderer implements NodeRendererInterface
1616{
1717 public function __construct (
18- private readonly Highlighter $ highlighter = new Highlighter (),
18+ private Highlighter $ highlighter = new Highlighter (),
1919 ) {
2020 }
2121
Original file line number Diff line number Diff line change 1010use League \CommonMark \Extension \ExtensionInterface ;
1111use Tempest \Highlight \Highlighter ;
1212
13- final class HighlightExtension implements ExtensionInterface
13+ final readonly class HighlightExtension implements ExtensionInterface
1414{
1515 public function __construct (
16- private readonly ?Highlighter $ highlighter = new Highlighter (),
16+ private ?Highlighter $ highlighter = new Highlighter (),
1717 ) {
1818 }
1919
Original file line number Diff line number Diff line change 1111use League \CommonMark \Renderer \NodeRendererInterface ;
1212use Tempest \Highlight \Highlighter ;
1313
14- final class InlineCodeBlockRenderer implements NodeRendererInterface
14+ final readonly class InlineCodeBlockRenderer implements NodeRendererInterface
1515{
1616 public function __construct (
17- private readonly Highlighter $ highlighter = new Highlighter (),
17+ private Highlighter $ highlighter = new Highlighter (),
1818 ) {
1919 }
2020
Original file line number Diff line number Diff line change 88use Tempest \Highlight \Pattern ;
99use Tempest \Highlight \Tokens \TokenTypeEnum ;
1010
11- final class KeywordPattern implements Pattern
11+ final readonly class KeywordPattern implements Pattern
1212{
1313 use IsPattern;
1414
15- public function __construct (private readonly string $ keyword )
15+ public function __construct (private string $ keyword )
1616 {
1717 }
1818
Original file line number Diff line number Diff line change 88use Tempest \Highlight \Pattern ;
99use Tempest \Highlight \Tokens \TokenTypeEnum ;
1010
11- final class OperatorPattern implements Pattern
11+ final readonly class OperatorPattern implements Pattern
1212{
1313 use IsPattern;
1414
15- public function __construct (private readonly string $ operator )
15+ public function __construct (private string $ operator )
1616 {
1717 }
1818
Original file line number Diff line number Diff line change 88use Tempest \Highlight \Pattern ;
99use Tempest \Highlight \Tokens \TokenTypeEnum ;
1010
11- final class TwigTokenPattern implements Pattern
11+ final readonly class TwigTokenPattern implements Pattern
1212{
1313 use IsPattern;
1414
1515 public function __construct (
16- private readonly string $ regex ,
17- private readonly TokenTypeEnum $ type ,
16+ private string $ regex ,
17+ private TokenTypeEnum $ type ,
1818 ) {
1919 }
2020
Original file line number Diff line number Diff line change 77use Tempest \Highlight \Escape ;
88use Tempest \Highlight \Theme ;
99
10- final class RenderTokens
10+ final readonly class RenderTokens
1111{
1212 public function __construct (
13- private readonly Theme $ theme ,
13+ private Theme $ theme ,
1414 ) {
1515 }
1616
You can’t perform that action at this time.
0 commit comments