Passed
Push — master ( c04508...f5dc65 )
by Domenico
07:44
created
src/Filters/StandardXEquivTextToMateCatCustomPH.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 
15 15
 class StandardXEquivTextToMateCatCustomPH extends AbstractHandler {
16 16
 
17
-    public function transform( $segment ) {
17
+    public function transform($segment) {
18 18
 
19
-        preg_match_all( '|<x[^>]*?equiv-text="([^"]*?)"[^>]*?/>|', $segment, $xTags, PREG_SET_ORDER );
20
-        foreach ( $xTags as $group ) {
19
+        preg_match_all('|<x[^>]*?equiv-text="([^"]*?)"[^>]*?/>|', $segment, $xTags, PREG_SET_ORDER);
20
+        foreach ($xTags as $group) {
21 21
             $segment = preg_replace(
22
-                    '/' . preg_quote( $group[ 0 ], '/' ) . '/',
23
-                    '<ph id="' . $this->getPipeline()->getNextId() . '" ctype="' . CTypeEnum::ORIGINAL_X . '" x-orig="' . base64_encode( $group[ 0 ] ) . '" equiv-text="base64:' . base64_encode( $group[ 1 ] ) . '"/>',
22
+                    '/'.preg_quote($group[0], '/').'/',
23
+                    '<ph id="'.$this->getPipeline()->getNextId().'" ctype="'.CTypeEnum::ORIGINAL_X.'" x-orig="'.base64_encode($group[0]).'" equiv-text="base64:'.base64_encode($group[1]).'"/>',
24 24
                     $segment,
25 25
                     1
26 26
             );
Please login to merge, or discard this patch.