Passed
Push — master ( 269417...c6f060 )
by Tobias
02:27
created
src/WrkLst/DocxMustache/DocxMustache.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -340,39 +340,39 @@
 block discarded – undo
340 340
         }
341 341
     }
342 342
 
343
-     /**
344
-      * @param string $string
345
-      */
346
-     protected function AnalyseImgUrlString($string)
347
-     {
348
-         $start = '[IMG-REPLACE]';
349
-         $end = '[/IMG-REPLACE]';
350
-
351
-         if ($string != str_replace($start, '', $string) && $string == str_replace($start.$end, '', $string)) {
352
-             $string = ' '.$string;
353
-             $ini = strpos($string, $start);
354
-             if ($ini == 0) {
355
-                 $url = '';
356
-                 $rest = $string;
357
-             } else {
358
-                 $ini += strlen($start);
359
-                 $len = ((strpos($string, $end, $ini)) - $ini);
360
-                 $url = substr($string, $ini, $len);
361
-
362
-                 $ini = strpos($string, $start);
363
-                 $len = strpos($string, $end, $ini + strlen($start)) + strlen($end);
364
-                 $rest = substr($string, 0, $ini).substr($string, $len);
365
-             }
366
-         } else {
367
-             $url = '';
368
-             $rest = str_replace([$start, $end], '', $string);
369
-         }
370
-
371
-         return [
372
-             'url'  => trim($url),
373
-             'rest' => trim($rest),
374
-         ];
375
-     }
343
+        /**
344
+         * @param string $string
345
+         */
346
+        protected function AnalyseImgUrlString($string)
347
+        {
348
+            $start = '[IMG-REPLACE]';
349
+            $end = '[/IMG-REPLACE]';
350
+
351
+            if ($string != str_replace($start, '', $string) && $string == str_replace($start.$end, '', $string)) {
352
+                $string = ' '.$string;
353
+                $ini = strpos($string, $start);
354
+                if ($ini == 0) {
355
+                    $url = '';
356
+                    $rest = $string;
357
+                } else {
358
+                    $ini += strlen($start);
359
+                    $len = ((strpos($string, $end, $ini)) - $ini);
360
+                    $url = substr($string, $ini, $len);
361
+
362
+                    $ini = strpos($string, $start);
363
+                    $len = strpos($string, $end, $ini + strlen($start)) + strlen($end);
364
+                    $rest = substr($string, 0, $ini).substr($string, $len);
365
+                }
366
+            } else {
367
+                $url = '';
368
+                $rest = str_replace([$start, $end], '', $string);
369
+            }
370
+
371
+            return [
372
+                'url'  => trim($url),
373
+                'rest' => trim($rest),
374
+            ];
375
+        }
376 376
 
377 377
     public function SaveAsPdf()
378 378
     {
Please login to merge, or discard this patch.