From dfcd195bf25eafbcb788cbe0f8b104fc50dd0bf7 Mon Sep 17 00:00:00 2001 From: JBlond Date: Mon, 19 Oct 2020 15:50:53 +0200 Subject: [PATCH] rename lineNo to camelcase --- src/jblond/TwigTrans/TransNode.php | 6 +++--- src/jblond/TwigTrans/TransTag.php | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/jblond/TwigTrans/TransNode.php b/src/jblond/TwigTrans/TransNode.php index ff61497..45af5cb 100644 --- a/src/jblond/TwigTrans/TransNode.php +++ b/src/jblond/TwigTrans/TransNode.php @@ -23,7 +23,7 @@ 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( @@ -31,7 +31,7 @@ public function __construct( Node $plural = null, AbstractExpression $count = null, Node $notes = null, - $lineno = 0, + $lineNo = 0, $tag = null ) { $nodes = ['body' => $body]; @@ -45,7 +45,7 @@ public function __construct( $nodes['notes'] = $notes; } - parent::__construct($nodes, [], $lineno, $tag); + parent::__construct($nodes, [], $lineNo, $tag); } /** diff --git a/src/jblond/TwigTrans/TransTag.php b/src/jblond/TwigTrans/TransTag.php index 338da9c..1fd5a64 100644 --- a/src/jblond/TwigTrans/TransTag.php +++ b/src/jblond/TwigTrans/TransTag.php @@ -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; @@ -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()); } /** @@ -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 ( @@ -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 ); } }