Passed
Push — master ( 129cb7...bcc00c )
by Domenico
03:12
created
src/XliffReplacer/XliffReplacerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     {
27 27
         $info = XliffProprietaryDetect::getInfo($originalXliffPath);
28 28
 
29
-        if ($info[ 'proprietary_short_name' ] !== 'trados') {
29
+        if ($info['proprietary_short_name'] !== 'trados') {
30 30
             return new XliffSAXTranslationReplacer($originalXliffPath, $info['version'], $data, $transUnits, $targetLang, $outputFilePath, $setSourceInTarget, $logger, $callback);
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/Constants/XliffTags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
     /**
8 8
      * List of allowed Xliff tags
9 9
      */
10
-    public static $tags = [ 'g', 'x', 'bx', 'ex', 'bpt', 'ept', 'ph', 'pc', 'ec', 'sc', 'it', 'mrk' ];
10
+    public static $tags = ['g', 'x', 'bx', 'ex', 'bpt', 'ept', 'ph', 'pc', 'ec', 'sc', 'it', 'mrk'];
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
src/Utils/FlatData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public static function flatArray(array $input = [], $separator_elements = ', ', $separator = ': ')
13 13
     {
14 14
         return implode($separator_elements, array_map(
15
-            function ($v, $k, $s) {
15
+            function($v, $k, $s) {
16 16
                 return sprintf("%s{$s}\"%s\"", $k, $v);
17 17
             },
18 18
             $input,
Please login to merge, or discard this patch.
src/XliffUtils/XliffVersionDetector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         preg_match('|<xliff.*?\sversion\s?=\s?["\'](.*?)["\']|si', substr($xliffContent, 0, 1000), $versionMatches);
30 30
 
31
-        if (empty($versionMatches) ) {
31
+        if (empty($versionMatches)) {
32 32
             throw new NotValidFileException('This is not a valid xliff file');
33 33
         }
34 34
 
Please login to merge, or discard this patch.
src/XliffUtils/CheckPipeline/CheckGlobalSight.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
     {
14 14
         $fileType = [];
15 15
 
16
-        if (isset($tmp[ 0 ])) {
17
-            if (stripos($tmp[ 0 ], 'globalsight') !== false) {
18
-                $fileType[ 'proprietary' ]            = true;
19
-                $fileType[ 'proprietary_name' ]       = 'GlobalSight Download File';
20
-                $fileType[ 'proprietary_short_name' ] = 'globalsight';
21
-                $fileType[ 'converter_version' ]      = 'legacy';
16
+        if (isset($tmp[0])) {
17
+            if (stripos($tmp[0], 'globalsight') !== false) {
18
+                $fileType['proprietary']            = true;
19
+                $fileType['proprietary_name']       = 'GlobalSight Download File';
20
+                $fileType['proprietary_short_name'] = 'globalsight';
21
+                $fileType['converter_version']      = 'legacy';
22 22
 
23 23
                 return $fileType;
24 24
             }
Please login to merge, or discard this patch.
src/XliffUtils/CheckPipeline/CheckMateCATConverter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@
 block discarded – undo
13 13
     {
14 14
         $fileType = [];
15 15
 
16
-        if (isset($tmp[ 0 ])) {
17
-            preg_match('#tool-id\s*=\s*"matecat-converter(\s+([^"]+))?"#i', $tmp[ 0 ], $matches);
16
+        if (isset($tmp[0])) {
17
+            preg_match('#tool-id\s*=\s*"matecat-converter(\s+([^"]+))?"#i', $tmp[0], $matches);
18 18
             if (!empty($matches)) {
19
-                $fileType[ 'proprietary' ]            = false;
20
-                $fileType[ 'proprietary_name' ]       = 'MateCAT Converter';
21
-                $fileType[ 'proprietary_short_name' ] = 'matecat_converter';
22
-                if (isset($matches[ 2 ])) {
23
-                    $fileType[ 'converter_version' ] = $matches[ 2 ];
19
+                $fileType['proprietary']            = false;
20
+                $fileType['proprietary_name']       = 'MateCAT Converter';
21
+                $fileType['proprietary_short_name'] = 'matecat_converter';
22
+                if (isset($matches[2])) {
23
+                    $fileType['converter_version'] = $matches[2];
24 24
                 } else {
25 25
                     // First converter release didn't specify version
26
-                    $fileType[ 'converter_version' ] = '1.0';
26
+                    $fileType['converter_version'] = '1.0';
27 27
                 }
28 28
 
29 29
                 return $fileType;
Please login to merge, or discard this patch.
src/XliffUtils/CheckPipeline/CheckSDL.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
     {
9 9
         $fileType = [];
10 10
 
11
-        if (isset($tmp[ 0 ])) {
12
-            if (stripos($tmp[ 0 ], 'sdl:version') !== false) {
11
+        if (isset($tmp[0])) {
12
+            if (stripos($tmp[0], 'sdl:version') !== false) {
13 13
                 //little trick, we consider not proprietary Sdlxliff files because we can handle them
14
-                $fileType[ 'proprietary' ]            = false;
15
-                $fileType[ 'proprietary_name' ]       = 'SDL Studio ';
16
-                $fileType[ 'proprietary_short_name' ] = 'trados';
17
-                $fileType[ 'converter_version' ]      = 'legacy';
14
+                $fileType['proprietary']            = false;
15
+                $fileType['proprietary_name']       = 'SDL Studio ';
16
+                $fileType['proprietary_short_name'] = 'trados';
17
+                $fileType['converter_version']      = 'legacy';
18 18
 
19 19
                 return $fileType;
20 20
             }
Please login to merge, or discard this patch.
src/Constants/TranslationStatus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             self::STATUS_REBUTTED
54 54
     ];
55 55
 
56
-    public static function isReviewedStatus( $status ) {
57
-        return in_array( $status, TranslationStatus::$REVISION_STATUSES );
56
+    public static function isReviewedStatus($status) {
57
+        return in_array($status, TranslationStatus::$REVISION_STATUSES);
58 58
     }
59 59
 }
Please login to merge, or discard this patch.
src/XliffUtils/CheckPipeline/CheckXliffVersion2.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     {
14 14
         $fileType = [];
15 15
 
16
-        if (isset($tmp[ 0 ])) {
16
+        if (isset($tmp[0])) {
17 17
             preg_match('|<xliff.*?\sversion\s?=\s?["\'](.*?)["\']|si', substr($tmp[0], 0, 1000), $versionMatches);
18 18
             preg_match('|<xliff.*?\sxmlns\s?=\s?["\']urn:oasis:names:tc:xliff:document:(.*?)["\']|si', substr($tmp[0], 0, 1000), $xmlnsMatches);
19 19
 
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
                 $xmlns = $xmlnsMatches[1];
23 23
 
24 24
                 if ($version === $xmlns && $version >= 2) {
25
-                    $fileType[ 'proprietary' ]            = false;
26
-                    $fileType[ 'proprietary_name' ]       = 'Xliff v'.$version.' File';
27
-                    $fileType[ 'proprietary_short_name' ] = 'xliff_v2';
28
-                    $fileType[ 'converter_version' ]      = '2.0';
25
+                    $fileType['proprietary']            = false;
26
+                    $fileType['proprietary_name']       = 'Xliff v' . $version . ' File';
27
+                    $fileType['proprietary_short_name'] = 'xliff_v2';
28
+                    $fileType['converter_version']      = '2.0';
29 29
 
30 30
                     return $fileType;
31 31
                 }
Please login to merge, or discard this patch.