10BC0 [FrameworkBundle] fixed CS · symfony/symfony@62bc2c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 62bc2c4

Browse files
committed
[FrameworkBundle] fixed CS
1 parent d0c3ffa commit 62bc2c4

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ public function setPrefix($prefix)
7575
/**
7676
* Normalizes a token.
7777
*
78-
* @param mixed $token
78+
* @param mixed $token
79+
*
7980
* @return string
8081
*/
8182
protected function normalizeToken($token)
@@ -88,13 +89,11 @@ protected function normalizeToken($token)
8889
}
8990

9091
/**
91-
* Seeks to a non-whitespace token
92-
*
93-
* @param \ArrayIterator $tokenIterator
92+
* Seeks to a non-whitespace token.
9493
*/
95-
protected function seekToNextRelaventToken($tokenIterator)
94+
private function seekToNextReleventToken(\Iterator $tokenIterator)
9695
{
97-
for ( ; $tokenIterator->valid(); $tokenIterator->next()) {
96+
for (; $tokenIterator->valid(); $tokenIterator->next()) {
9897
$t = $tokenIterator->current();
9998
if (!is_array($t) || ($t[0] !== T_WHITESPACE)) {
10099
break;
@@ -105,15 +104,13 @@ protected function seekToNextRelaventToken($tokenIterator)
105104
/**
106105
* Extracts the message from the iterator while the tokens
107106
* match allowed message tokens
108-
*
109-
* @param \ArrayIterator $tokenIterator
110107
*/
111-
protected function getMessage($tokenIterator)
108+
private function getMessage(\Iterator $tokenIterator)
112109
{
113110
$message = '';
114111
$docToken = '';
115112

116-
for ( ; $tokenIterator->valid(); $tokenIterator->next()) {
113+
for (; $tokenIterator->valid(); $tokenIterator->next()) {
117114
$t = $tokenIterator->current();
118115
if (!is_array($t)) {
119116
break;
@@ -157,7 +154,7 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
157154
$tokenIterator->seek($key);
158155

159156
foreach ($sequence as $item) {
160-
$this->seekToNextRelaventToken($tokenIterator);
157+
$this->seekToNextReleventToken($tokenIterator);
161158

162159
if ($this->normalizeToken($tokenIterator->current()) == $item) {
163160
$tokenIterator->next();

0 commit comments

Comments
 (0)
0