Skip to content

Commit

Permalink
rename lineNo to camelcase
Browse files Browse the repository at this point in the history
  • Loading branch information
JBlond committed Oct 19, 2020
1 parent 72bd45d commit dfcd195
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/jblond/TwigTrans/TransNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ class TransNode extends Node
* @param Node|null $plural
* @param AbstractExpression|null $count
* @param Node|null $notes
* @param int $lineno
* @param int $lineNo
* @param null $tag
*/
public function __construct(
Node $body,
Node $plural = null,
AbstractExpression $count = null,
Node $notes = null,
$lineno = 0,
$lineNo = 0,
$tag = null
) {
$nodes = ['body' => $body];
Expand All @@ -45,7 +45,7 @@ public function __construct(
$nodes['notes'] = $notes;
}

parent::__construct($nodes, [], $lineno, $tag);
parent::__construct($nodes, [], $lineNo, $tag);
}

/**
Expand Down
12 changes: 6 additions & 6 deletions src/jblond/TwigTrans/TransTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TransTag extends AbstractTokenParser
*/
public function parse(Token $token)
{
$lineno = $token->getLine();
$lineNo = $token->getLine();
$stream = $this->parser->getStream();
$count = null;
$plural = null;
Expand Down Expand Up @@ -50,9 +50,9 @@ public function parse(Token $token)
}

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

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

/**
Expand Down Expand Up @@ -83,10 +83,10 @@ public function getTag()

/**
* @param Node $body
* @param $lineno
* @param int $lineNo
* @throws SyntaxError
*/
protected function checkTransString(Node $body, $lineno)
protected function checkTransString(Node $body, int $lineNo)
{
foreach ($body as $i => $node) {
if (
Expand All @@ -97,7 +97,7 @@ protected function checkTransString(Node $body, $lineno)
}
throw new SyntaxError(
sprintf('The text to be translated with "trans" can only contain references to simple variables'),
$lineno
$lineNo
);
}
}
Expand Down

0 comments on commit dfcd195

Please sign in to comment.