Skip to content

Commit 389b7ce

Browse files
committed
Coding style
1 parent 4e19ecf commit 389b7ce

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/Loader/PoLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function loadString(string $string, ?Translations $translations = null):
2424
$nextLine = next($lines);
2525

2626
// Treat empty comments as empty lines https://github.com/php-gettext/Gettext/pull/296
27-
if ($line === "#") {
28-
$line = "";
27+
if ($line === '#') {
28+
$line = '';
2929
}
3030

3131
//Multiline

src/Loader/StrictPoLoader.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private function readCommentString(): string
167167
private function readQuotedString(?string $context = null): string
168168
{
169169
$this->readWhitespace();
170-
for ($data = '', $isNewPart = true, $checkpoint = null;;) {
170+
for ($data = '', $isNewPart = true, $checkpoint = null; ;) {
171171
if ($isNewPart && !$this->readChar('"')) {
172172
// The data is over (e.g. beginning of an identifier) or perhaps there's an error
173173
// Restore the checkpoint and let the next parser handle it
@@ -192,11 +192,11 @@ private function readQuotedString(?string $context = null): string
192192
case '\\':
193193
$data .= $this->readEscape();
194194
break;
195-
// Unexpected newline
195+
// Unexpected newline
196196
case "\r":
197197
case "\n":
198198
throw new Exception("Newline character must be escaped{$this->getErrorPosition()}");
199-
// Unexpected end of file
199+
// Unexpected end of file
200200
case null:
201201
throw new Exception("Expected a closing quote{$this->getErrorPosition()}");
202202
}
@@ -227,6 +227,7 @@ private function readEscape(): string
227227
return chr($decimal);
228228
case 'x':
229229
$value = $this->readCharset($hexDigits, 1, PHP_INT_MAX, 'hexadecimal');
230+
230231
// GNU reads all valid hexadecimal chars, but only uses the last pair
231232
return hex2bin(str_pad(substr($value, -2), 2, '0', STR_PAD_LEFT));
232233
case 'U':

src/Merge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class Merge
3030

3131
//Merge strategies
3232
public const SCAN_AND_LOAD =
33-
Merge::HEADERS_OVERRIDE
33+
Merge::HEADERS_OVERRIDE
3434
| Merge::TRANSLATIONS_OURS
3535
| Merge::TRANSLATIONS_OVERRIDE
3636
| Merge::EXTRACTED_COMMENTS_OURS

tests/BasePoLoaderTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testPoLoader()
2424
This file is distributed under the same license as the PACKAGE package.
2525
FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
2626
EOT
27-
,
27+
,
2828
$description
2929
);
3030

0 commit comments

Comments
 (0)