Skip to content

Commit 9cd7a0d

Browse files
committed
TASK: Minor cosmetic changes
1 parent ce077c4 commit 9cd7a0d

16 files changed

Lines changed: 39 additions & 39 deletions

File tree

src/Parser/Ast/AccessChainSegmentNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function fromTokens(\Iterator $tokens): self
4545
Scanner::assertType($tokens, TokenType::PERIOD, TokenType::OPTCHAIN);
4646

4747
$accessType = AccessType::fromTokenType(Scanner::type($tokens));
48-
48+
4949
Scanner::skipOne($tokens);
5050

5151
$accessor = IdentifierNode::fromTokens($tokens);
@@ -63,4 +63,4 @@ public function jsonSerialize(): mixed
6363
'accessor' => $this->accessor
6464
];
6565
}
66-
}
66+
}

src/Parser/Ast/AttributeNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static function fromTokens(\Iterator $tokens): self
6767
Scanner::skipOne($tokens);
6868

6969
$value = ExpressionNode::fromTokens($tokens);
70-
70+
7171
Scanner::skipSpaceAndComments($tokens);
7272
Scanner::assertType($tokens, TokenType::BRACKET_CURLY_CLOSE);
7373
Scanner::skipOne($tokens);

src/Parser/Ast/NullLiteralNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
final class NullLiteralNode implements \JsonSerializable
3030
{
31-
private function __construct()
31+
private function __construct()
3232
{
3333
}
3434

src/Parser/Tokenizer/Scanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function assertValue(\Iterator $tokens, string ...$values): void
8484

8585
/**
8686
* @param \Iterator<mixed,Token> $tokens
87-
* @return \Iterator<mixed,Token>
87+
* @return \Iterator<mixed,Token>
8888
*/
8989
public static function skipOne(\Iterator $tokens): \Iterator
9090
{

src/Parser/Tokenizer/Tokenizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static function templateLiteral(\Iterator $fragments): \Iterator
193193
if (!$fragments->valid()) {
194194
throw new \Exception("@TODO: Unexpected end of input");
195195
}
196-
196+
197197
$nextFragment = $fragments->current();
198198

199199
if ($nextFragment->value === '{') {

src/Target/Php/Transpiler/Access/AccessTranspiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function transpile(AccessNode $accessNode): string
4444
);
4545
$typeOfRoot = $expressionTypeResolver->resolveTypeOf($accessNode->root);
4646
$result = $expressionTranspiler->transpile($accessNode->root);
47-
47+
4848
$isFirstElement = true;
4949
foreach ($accessNode->chain->items as $accessChainNode) {
5050
if ($typeOfRoot instanceof EnumStaticType && $isFirstElement) {

src/Target/Php/Transpiler/ComponentDeclaration/ComponentDeclarationTranspiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function transpile(ComponentDeclarationNode $componentDeclarationNode): s
5858
if ($baseClassName) {
5959
$lines[] = 'use ' . $baseClassName->getFullyQualifiedClassName() . ';';
6060
}
61-
61+
6262
foreach ($this->module->imports->items as $importNode) {
6363
// @TODO: Generate Namespaces Dynamically
6464
$lines[] = 'use Vendor\\Project\\Component\\' . $importNode->name->value . ';';

src/Target/Php/Transpiler/Expression/ExpressionTranspiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
final class ExpressionTranspiler
5151
{
5252
public function __construct(
53-
private readonly ScopeInterface $scope,
53+
private readonly ScopeInterface $scope,
5454
private readonly bool $shouldAddQuotesIfNecessary = false
5555
) {
5656
}

src/Target/Php/Transpiler/StringLiteral/StringLiteralTranspiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ public function transpile(StringLiteralNode $stringLiteralNode): string
4646
if ($line === '') {
4747
$additionalLineBreaks .= '\n';
4848
} else {
49-
$result .= $result
49+
$result .= $result
5050
? '\' . "\n' . $additionalLineBreaks . '" . \'' . $line
5151
: '"\n' . $additionalLineBreaks . '" . \'' . $line;
5252
$additionalLineBreaks = '';
5353
}
5454
}
5555

5656
if ($additionalLineBreaks) {
57-
$result .= $result
57+
$result .= $result
5858
? '\' . "' . $additionalLineBreaks . '"'
5959
: '"' . $additionalLineBreaks . '"';
6060
$shouldAddTrailingQuote = false;

src/Target/Php/Transpiler/Tag/TagTranspiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public function transpile(TagNode $tagNode): string
6363
$result .= sprintf('</%s>', $tagNode->tagName);
6464
}
6565

66-
return $this->shouldAddQuotes
67-
? sprintf('\'%s\'', $result)
66+
return $this->shouldAddQuotes
67+
? sprintf('\'%s\'', $result)
6868
: $result;
6969
}
7070
}

0 commit comments

Comments
 (0)