Completed
Push — master ( 54ac69...cc2d4e )
by Robbie
14s
created
src/ServiceConnector.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             return $fromConfig;
89 89
         }
90 90
 
91
-        $fromEnv = Environment::getEnv('DOCVERT_' . strtoupper($detail));
91
+        $fromEnv = Environment::getEnv('DOCVERT_'.strtoupper($detail));
92 92
         if ($fromEnv) {
93 93
             return $fromEnv;
94 94
         }
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
         ]);
148 148
 
149 149
         $chosenFolder = ($this->chosenFolderID) ? DataObject::get_by_id(Folder::class, $this->chosenFolderID) : null;
150
-        $folderName = ($chosenFolder) ? '/' . $chosenFolder->Name : '';
150
+        $folderName = ($chosenFolder) ? '/'.$chosenFolder->Name : '';
151 151
         $outname = tempnam(ASSETS_PATH, 'convert');
152
-        $outzip = $outname . '.zip';
152
+        $outzip = $outname.'.zip';
153 153
         $out = fopen($outzip, 'w');
154 154
         curl_setopt($ch, CURLOPT_FILE, $out);
155 155
         $returnValue = curl_exec($ch);
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
 
161 161
         if (!$returnValue || ($status != 200)) {
162 162
             return ['error' => _t(
163
-                __CLASS__ . '.SERVERUNREACHABLE',
164
-                'Could not contact document conversion server. Please try again later ' .
163
+                __CLASS__.'.SERVERUNREACHABLE',
164
+                'Could not contact document conversion server. Please try again later '.
165 165
                     'or contact your system administrator.',
166 166
                 'Document Converter process Word documents into HTML.'
167 167
             )];
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $zip = new ZipArchive();
173 173
 
174 174
         if ($zip->open($outzip)) {
175
-            $zip->extractTo(ASSETS_PATH .$folderName);
175
+            $zip->extractTo(ASSETS_PATH.$folderName);
176 176
             $zip->close();
177 177
         }
178 178
 
@@ -180,17 +180,17 @@  discard block
 block discarded – undo
180 180
         unlink($outname);
181 181
         unlink($outzip);
182 182
 
183
-        if (!file_exists(ASSETS_PATH . $folderName . '/index.html')) {
183
+        if (!file_exists(ASSETS_PATH.$folderName.'/index.html')) {
184 184
             return ['error' =>  _t(
185
-                __CLASS__ . '.PROCESSFAILED',
185
+                __CLASS__.'.PROCESSFAILED',
186 186
                 'Could not process document, please double-check you uploaded a .doc or .docx format.',
187 187
                 'Document Converter processes Word documents into HTML.'
188 188
             )];
189 189
         }
190 190
 
191
-        $content = file_get_contents(ASSETS_PATH . $folderName . '/index.html');
191
+        $content = file_get_contents(ASSETS_PATH.$folderName.'/index.html');
192 192
 
193
-        unlink(ASSETS_PATH . $folderName . '/index.html');
193
+        unlink(ASSETS_PATH.$folderName.'/index.html');
194 194
 
195 195
         return $content;
196 196
     }
Please login to merge, or discard this patch.