Skip to content

Commit dfcd195

Browse files
committed
rename lineNo to camelcase
1 parent 72bd45d commit dfcd195

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/jblond/TwigTrans/TransNode.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ class TransNode extends Node
2323
* @param Node|null $plural
2424
* @param AbstractExpression|null $count
2525
* @param Node|null $notes
26-
* @param int $lineno
26+
* @param int $lineNo
2727
* @param null $tag
2828
*/
2929
public function __construct(
3030
Node $body,
3131
Node $plural = null,
3232
AbstractExpression $count = null,
3333
Node $notes = null,
34-
$lineno = 0,
34+
$lineNo = 0,
3535
$tag = null
3636
) {
3737
$nodes = ['body' => $body];
@@ -45,7 +45,7 @@ public function __construct(
4545
$nodes['notes'] = $notes;
4646
}
4747

48-
parent::__construct($nodes, [], $lineno, $tag);
48+
parent::__construct($nodes, [], $lineNo, $tag);
4949
}
5050

5151
/**

src/jblond/TwigTrans/TransTag.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TransTag extends AbstractTokenParser
2121
*/
2222
public function parse(Token $token)
2323
{
24-
$lineno = $token->getLine();
24+
$lineNo = $token->getLine();
2525
$stream = $this->parser->getStream();
2626
$count = null;
2727
$plural = null;
@@ -50,9 +50,9 @@ public function parse(Token $token)
5050
}
5151

5252
$stream->expect(Token::BLOCK_END_TYPE);
53-
$this->checkTransString($body, $lineno);
53+
$this->checkTransString($body, $lineNo);
5454

55-
return new TransNode($body, $plural, $count, $notes, $lineno, $this->getTag());
55+
return new TransNode($body, $plural, $count, $notes, $lineNo, $this->getTag());
5656
}
5757

5858
/**
@@ -83,10 +83,10 @@ public function getTag()
8383

8484
/**
8585
* @param Node $body
86-
* @param $lineno
86+
* @param int $lineNo
8787
* @throws SyntaxError
8888
*/
89-
protected function checkTransString(Node $body, $lineno)
89+
protected function checkTransString(Node $body, int $lineNo)
9090
{
9191
foreach ($body as $i => $node) {
9292
if (
@@ -97,7 +97,7 @@ protected function checkTransString(Node $body, $lineno)
9797
}
9898
throw new SyntaxError(
9999
sprintf('The text to be translated with "trans" can only contain references to simple variables'),
100-
$lineno
100+
$lineNo
101101
);
102102
}
103103
}

0 commit comments

Comments
 (0)