@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @return array |
| 52 | 52 | */ |
| 53 | - private static function getInfoFromTmp( $tmp) |
|
| 53 | + private static function getInfoFromTmp($tmp) |
|
| 54 | 54 | { |
| 55 | 55 | try { |
| 56 | 56 | self::checkVersion($tmp); |
| 57 | - } catch ( Exception $ignore) { |
|
| 57 | + } catch (Exception $ignore) { |
|
| 58 | 58 | // do nothing |
| 59 | 59 | // self::$fileType[ 'version' ] is left empty |
| 60 | 60 | } |
@@ -62,10 +62,10 @@ discard block |
||
| 62 | 62 | // run CheckXliffProprietaryPipeline |
| 63 | 63 | $pipeline = self::runPipeline($tmp); |
| 64 | 64 | |
| 65 | - self::$fileType['proprietary' ] = $pipeline['proprietary' ]; |
|
| 66 | - self::$fileType[ 'proprietary_name' ] = $pipeline['proprietary_name' ]; |
|
| 67 | - self::$fileType[ 'proprietary_short_name' ] = $pipeline['proprietary_short_name' ]; |
|
| 68 | - self::$fileType[ 'converter_version' ] = $pipeline['converter_version' ]; |
|
| 65 | + self::$fileType['proprietary'] = $pipeline['proprietary']; |
|
| 66 | + self::$fileType['proprietary_name'] = $pipeline['proprietary_name']; |
|
| 67 | + self::$fileType['proprietary_short_name'] = $pipeline['proprietary_short_name']; |
|
| 68 | + self::$fileType['converter_version'] = $pipeline['converter_version']; |
|
| 69 | 69 | |
| 70 | 70 | return self::$fileType; |
| 71 | 71 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | if (!empty($stringData)) { |
| 131 | - return array( $stringData ); |
|
| 131 | + return array($stringData); |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | return false; |
@@ -142,8 +142,8 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | protected static function checkVersion($tmp) |
| 144 | 144 | { |
| 145 | - if (isset($tmp[ 0 ])) { |
|
| 146 | - self::$fileType[ 'version' ] = XliffVersionDetector::detect($tmp[ 0 ]); |
|
| 145 | + if (isset($tmp[0])) { |
|
| 146 | + self::$fileType['version'] = XliffVersionDetector::detect($tmp[0]); |
|
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | |
@@ -165,10 +165,10 @@ discard block |
||
| 165 | 165 | // run CheckXliffProprietaryPipeline |
| 166 | 166 | $pipeline = self::runPipeline($tmp); |
| 167 | 167 | |
| 168 | - self::$fileType['proprietary' ] = $pipeline['proprietary' ]; |
|
| 169 | - self::$fileType[ 'proprietary_name' ] = $pipeline['proprietary_name' ]; |
|
| 170 | - self::$fileType[ 'proprietary_short_name' ] = $pipeline['proprietary_short_name' ]; |
|
| 171 | - self::$fileType[ 'converter_version' ] = $pipeline['converter_version' ]; |
|
| 168 | + self::$fileType['proprietary'] = $pipeline['proprietary']; |
|
| 169 | + self::$fileType['proprietary_name'] = $pipeline['proprietary_name']; |
|
| 170 | + self::$fileType['proprietary_short_name'] = $pipeline['proprietary_short_name']; |
|
| 171 | + self::$fileType['converter_version'] = $pipeline['converter_version']; |
|
| 172 | 172 | |
| 173 | 173 | return self::$fileType; |
| 174 | 174 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | //if file is not proprietary AND Enforce is disabled |
| 197 | 197 | //we take it as is |
| 198 | - if (!$fileType[ 'proprietary' ] || $memoryFileType) { |
|
| 198 | + if (!$fileType['proprietary'] || $memoryFileType) { |
|
| 199 | 199 | $convert = false; |
| 200 | 200 | //ok don't convert a standard sdlxliff |
| 201 | 201 | } |
@@ -203,16 +203,16 @@ discard block |
||
| 203 | 203 | //if conversion enforce is active |
| 204 | 204 | //we force all xliff files but not files produced by SDL Studio because we can handle them |
| 205 | 205 | if ( |
| 206 | - $fileType[ 'proprietary_short_name' ] == 'matecat_converter' |
|
| 207 | - || $fileType[ 'proprietary_short_name' ] == 'trados' |
|
| 208 | - || $fileType[ 'proprietary_short_name' ] == 'xliff_v2' |
|
| 206 | + $fileType['proprietary_short_name'] == 'matecat_converter' |
|
| 207 | + || $fileType['proprietary_short_name'] == 'trados' |
|
| 208 | + || $fileType['proprietary_short_name'] == 'xliff_v2' |
|
| 209 | 209 | || $memoryFileType |
| 210 | 210 | ) { |
| 211 | 211 | $convert = false; |
| 212 | 212 | //ok don't convert a standard sdlxliff |
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | - } elseif ($fileType[ 'proprietary' ]) { |
|
| 215 | + } elseif ($fileType['proprietary']) { |
|
| 216 | 216 | |
| 217 | 217 | /** |
| 218 | 218 | * Application misconfiguration. |