Skip to content

Commit 171e246

Browse files
authored
Apply fixes from StyleCI (#20)
1 parent 01632cd commit 171e246

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/LegacyTranslationLoader.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the PHP Translation package.
5+
*
6+
* (c) PHP Translation team <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Translation\SymfonyStorage;
413

514
use Symfony\Component\Translation\MessageCatalogue;

src/Loader/Port/SymfonyPort.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function getVersionNumber(\DOMDocument $dom)
108108

109109
$namespace = $xliff->attributes->getNamedItem('xmlns');
110110
if ($namespace) {
111-
if (substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34) !== 0) {
111+
if (0 !== substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34)) {
112112
throw new InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s"', $namespace));
113113
}
114114

src/Loader/XliffLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private function loadFileContent($content)
136136
libxml_disable_entity_loader($disableEntities);
137137

138138
foreach ($dom->childNodes as $child) {
139-
if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
139+
if (XML_DOCUMENT_TYPE_NODE === $child->nodeType) {
140140
throw new \InvalidArgumentException('Document types are not allowed.');
141141
}
142142
}

0 commit comments

Comments
 (0)