Passed
Push — master ( f4d0e8...419ebb )
by Tobias
02:35
created
src/WrkLst/DocxMustache/DocxMustache.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -343,38 +343,38 @@
 block discarded – undo
343 343
     /**
344 344
      * @param string $string
345 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
-         {
353
-             $string = ' '.$string;
354
-             $ini = strpos($string, $start);
355
-             if ($ini == 0) {
356
-                 $url = '';
357
-                 $rest = $string;
358
-             } else {
359
-                 $ini += strlen($start);
360
-                 $len = ((strpos($string, $end, $ini)) - $ini);
361
-                 $url = substr($string, $ini, $len);
362
-
363
-                 $ini = strpos($string, $start);
364
-                 $len = strpos($string, $end, $ini + strlen($start)) + strlen($end);
365
-                 $rest = substr($string, 0, $ini).substr($string, $len);
366
-             }
367
-         }
368
-         else {
369
-             $url = '';
370
-             $rest = str_replace(array($start,$end),'',$string);
371
-         }
372
-
373
-         return [
374
-             'url'  => trim($url),
375
-             'rest' => trim($rest),
376
-         ];
377
-     }
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
+            {
353
+                $string = ' '.$string;
354
+                $ini = strpos($string, $start);
355
+                if ($ini == 0) {
356
+                    $url = '';
357
+                    $rest = $string;
358
+                } else {
359
+                    $ini += strlen($start);
360
+                    $len = ((strpos($string, $end, $ini)) - $ini);
361
+                    $url = substr($string, $ini, $len);
362
+
363
+                    $ini = strpos($string, $start);
364
+                    $len = strpos($string, $end, $ini + strlen($start)) + strlen($end);
365
+                    $rest = substr($string, 0, $ini).substr($string, $len);
366
+                }
367
+            }
368
+            else {
369
+                $url = '';
370
+                $rest = str_replace(array($start,$end),'',$string);
371
+            }
372
+
373
+            return [
374
+                'url'  => trim($url),
375
+                'rest' => trim($rest),
376
+            ];
377
+        }
378 378
 
379 379
     public function SaveAsPdf()
380 380
     {
Please login to merge, or discard this patch.