Skip to content

Commit 9516952

Browse files
committed
feat: ensure all classes are marked final
1 parent 7606c9b commit 9516952

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/Exception/RuntimeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
/**
2020
* Exception thrown when an error occurs at runtime in the Twig extension
2121
*/
22-
class RuntimeException extends RuntimeError
22+
final class RuntimeException extends RuntimeError
2323
{
2424
}

src/Exception/SyntaxException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
/**
2020
* Exception thrown when an error occurs when parsing the syntax of the Twig extension
2121
*/
22-
class SyntaxException extends SyntaxError
22+
final class SyntaxException extends SyntaxError
2323
{
2424
}

src/Highlighter/HighlighterFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* Factory to get a highlighter by name or by fully-qualified classname
2424
*/
25-
class HighlighterFactory
25+
final class HighlighterFactory
2626
{
2727
/**
2828
* Returns an instance of a highlighter

src/Highlighter/HighlighterReference.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
namespace Ramsey\Twig\CodeBlock\Highlighter;
1616

17+
/**
18+
* A reference to the highlighter class and its arguments, for use when compiling
19+
* Twig templates
20+
*/
1721
final readonly class HighlighterReference
1822
{
1923
/**

0 commit comments

Comments
 (0)