Passed
Push — master ( 037558...446f6a )
by Domenico
01:54
created
src/Commons/EmptyFeatureSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     /**
20 20
      * @inheritDoc
21 21
      */
22
-    public function filter( $method, $filterable ) {
22
+    public function filter($method, $filterable) {
23 23
         return $filterable;
24 24
     }
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Enum/CTypeEnum.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
      * @return array
46 46
      */
47 47
     protected static function getAllConstantValuesMap(): array {
48
-        if ( empty( static::$allConstantValues ) ) {
49
-            $reflectedProperty            = ( new ReflectionClass( static::class ) )->getConstants();
50
-            static::$allConstantValues    = array_flip( $reflectedProperty );
48
+        if (empty(static::$allConstantValues)) {
49
+            $reflectedProperty            = (new ReflectionClass(static::class))->getConstants();
50
+            static::$allConstantValues    = array_flip($reflectedProperty);
51 51
             static::$layer2ConstantValues = array_flip(
52
-                    array_filter( $reflectedProperty, function ( $key ) {
53
-                        return Utils::contains( 'DATA_REF', $key );
54
-                    }, ARRAY_FILTER_USE_KEY )
52
+                    array_filter($reflectedProperty, function($key) {
53
+                        return Utils::contains('DATA_REF', $key);
54
+                    }, ARRAY_FILTER_USE_KEY)
55 55
             );
56 56
         }
57 57
 
58
-        return [ 'all' => static::$allConstantValues, 'layer2' => static::$layer2ConstantValues ];
58
+        return ['all' => static::$allConstantValues, 'layer2' => static::$layer2ConstantValues];
59 59
     }
60 60
 
61 61
     /**
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @return bool
65 65
      */
66
-    public static function isMatecatCType( string $ctype ): bool {
67
-        return array_key_exists( $ctype, static::getAllConstantValuesMap()[ 'all' ] );
66
+    public static function isMatecatCType(string $ctype): bool {
67
+        return array_key_exists($ctype, static::getAllConstantValuesMap()['all']);
68 68
     }
69 69
 
70 70
     /**
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
      *
73 73
      * @return bool
74 74
      */
75
-    public static function isLayer2Constant( string $ctype ): bool {
76
-        return array_key_exists( $ctype, static::getAllConstantValuesMap()[ 'layer2' ] );
75
+    public static function isLayer2Constant(string $ctype): bool {
76
+        return array_key_exists($ctype, static::getAllConstantValuesMap()['layer2']);
77 77
     }
78 78
 
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.
src/Contracts/FeatureSetInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
      * modified in cascade to the next function in the queue.
18 18
      * @throws Exception
19 19
      */
20
-    public function filter( $method, $filterable );
20
+    public function filter($method, $filterable);
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
src/Filters/Sprintf/SprintfLocker.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param string|null $source
37 37
      * @param string|null $target
38 38
      */
39
-    public function __construct( ?string $source = null, ?string $target = null ) {
39
+    public function __construct(?string $source = null, ?string $target = null) {
40 40
         $this->source        = $source;
41 41
         $this->target        = $target;
42 42
         $this->notAllowedMap = $this->createNotAllowedMap();
@@ -48,17 +48,17 @@  discard block
 block discarded – undo
48 48
     private function createNotAllowedMap(): array {
49 49
         $map = [];
50 50
 
51
-        $all = include __DIR__ . "/language/all/not_allowed.php";
52
-        $map = array_merge( $map, $all );
51
+        $all = include __DIR__."/language/all/not_allowed.php";
52
+        $map = array_merge($map, $all);
53 53
 
54
-        if ( $this->source and file_exists( __DIR__ . "/language/" . $this->source . "/not_allowed.php" ) ) {
55
-            $source = include __DIR__ . "/language/" . $this->source . "/not_allowed.php";
56
-            $map    = array_merge( $map, $source );
54
+        if ($this->source and file_exists(__DIR__."/language/".$this->source."/not_allowed.php")) {
55
+            $source = include __DIR__."/language/".$this->source."/not_allowed.php";
56
+            $map    = array_merge($map, $source);
57 57
         }
58 58
 
59
-        if ( $this->target and file_exists( __DIR__ . "/language/" . $this->target . "/not_allowed.php" ) ) {
60
-            $target = include __DIR__ . "/language/" . $this->target . "/not_allowed.php";
61
-            $map    = array_merge( $map, $target );
59
+        if ($this->target and file_exists(__DIR__."/language/".$this->target."/not_allowed.php")) {
60
+            $target = include __DIR__."/language/".$this->target."/not_allowed.php";
61
+            $map    = array_merge($map, $target);
62 62
         }
63 63
 
64 64
         return $map;
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return string
71 71
      */
72
-    public function lock( string $segment ): string {
73
-        $replacementMap       = $this->createReplacementMap( $segment );
72
+    public function lock(string $segment): string {
73
+        $replacementMap       = $this->createReplacementMap($segment);
74 74
         $this->replacementMap = $replacementMap;
75 75
 
76
-        return str_replace( array_keys( $replacementMap ), array_values( $replacementMap ), $segment );
76
+        return str_replace(array_keys($replacementMap), array_values($replacementMap), $segment);
77 77
     }
78 78
 
79 79
     /**
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return string
83 83
      */
84
-    public function unlock(string $segment ): string {
84
+    public function unlock(string $segment): string {
85 85
         $replacementMap = $this->replacementMap;
86 86
 
87
-        return str_replace( array_values( $replacementMap ), array_keys( $replacementMap ), $segment );
87
+        return str_replace(array_values($replacementMap), array_keys($replacementMap), $segment);
88 88
     }
89 89
 
90 90
     /**
@@ -94,23 +94,23 @@  discard block
 block discarded – undo
94 94
      *
95 95
      * @return array
96 96
      */
97
-    private function createReplacementMap( string $segment ): array {
97
+    private function createReplacementMap(string $segment): array {
98 98
         $replacementMap = [];
99 99
 
100
-        foreach ( $this->notAllowedMap as $item => $details ) {
100
+        foreach ($this->notAllowedMap as $item => $details) {
101 101
 
102
-            $type = $details[ 'type' ];
102
+            $type = $details['type'];
103 103
 
104
-            switch ( $type ) {
104
+            switch ($type) {
105 105
                 case 'exact':
106
-                    $replacementMap[ $item ] = self::PRE_LOCK_TAG . $this->maskString( $item ) . self::POST_LOCK_TAG;
106
+                    $replacementMap[$item] = self::PRE_LOCK_TAG.$this->maskString($item).self::POST_LOCK_TAG;
107 107
                     break;
108 108
 
109 109
                 case 'regex':
110
-                    preg_match_all( '/' . $item . '/', $segment, $matches );
110
+                    preg_match_all('/'.$item.'/', $segment, $matches);
111 111
 
112
-                    foreach ( $matches[ 0 ] as $match ) {
113
-                        $replacementMap[ $match ] = self::PRE_LOCK_TAG . $this->maskString( $match ) . self::POST_LOCK_TAG;
112
+                    foreach ($matches[0] as $match) {
113
+                        $replacementMap[$match] = self::PRE_LOCK_TAG.$this->maskString($match).self::POST_LOCK_TAG;
114 114
                     }
115 115
                     break;
116 116
             }
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @return string
126 126
      */
127
-    private function maskString( string $string ): string {
128
-        return str_replace( [ '%', '-', '_' ], '', $string );
127
+    private function maskString(string $string): string {
128
+        return str_replace(['%', '-', '_'], '', $string);
129 129
     }
130 130
 
131 131
 }
132 132
\ No newline at end of file
Please login to merge, or discard this patch.
src/Filters/RestoreEquivText.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,18 +13,18 @@
 block discarded – undo
13 13
 
14 14
 class RestoreEquivText extends AbstractHandler {
15 15
 
16
-    public function transform( string $segment ): string {
16
+    public function transform(string $segment): string {
17 17
 
18 18
         // extract equiv-text attribute
19
-        preg_match_all( '/equiv-text=\"(.*?)\"/', $segment, $equiv_tags );
19
+        preg_match_all('/equiv-text=\"(.*?)\"/', $segment, $equiv_tags);
20 20
 
21
-        if ( !empty( $equiv_tags[ 0 ] ) ) {
22
-            foreach ( $equiv_tags[ 0 ] as $index => $equiv_tag ) {
23
-                $tag = $equiv_tags[ 1 ][ $index ];
21
+        if (!empty($equiv_tags[0])) {
22
+            foreach ($equiv_tags[0] as $index => $equiv_tag) {
23
+                $tag = $equiv_tags[1][$index];
24 24
 
25
-                if ( strpos( $tag, "base64:" ) !== false ) {
26
-                    $b       = base64_decode( str_replace( "base64:", "", $tag ) );
27
-                    $segment = str_replace( $equiv_tags[ $index ], 'equiv-text="' . $b . '"', $segment );
25
+                if (strpos($tag, "base64:") !== false) {
26
+                    $b       = base64_decode(str_replace("base64:", "", $tag));
27
+                    $segment = str_replace($equiv_tags[$index], 'equiv-text="'.$b.'"', $segment);
28 28
                 }
29 29
             }
30 30
         }
Please login to merge, or discard this patch.
src/Filters/EncodeToRawXML.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,41 +6,41 @@
 block discarded – undo
6 6
 use Matecat\SubFiltering\Utils\Utils;
7 7
 
8 8
 class EncodeToRawXML extends AbstractHandler {
9
-    public function transform( string $segment ): string {
9
+    public function transform(string $segment): string {
10 10
 
11 11
         // handling 
 (line feed)
12 12
         // prevent to convert it to \n
13
-        $segment = preg_replace( '/&(#10;|#x0A;)|\n/', '##_ent_0A_##', $segment );
13
+        $segment = preg_replace('/&(#10;|#x0A;)|\n/', '##_ent_0A_##', $segment);
14 14
 
15 15
         // handling 
 (carriage return)
16 16
         // prevent to convert it to \r
17
-        $segment = preg_replace( '/&(#13;|#x0D;)|\r/', '##_ent_0D_##', $segment );
17
+        $segment = preg_replace('/&(#13;|#x0D;)|\r/', '##_ent_0D_##', $segment);
18 18
 
19 19
         // handling 	 (tab)
20 20
         // prevent to convert it to \t
21
-        $segment = preg_replace( '/	|\t/', '##_ent_09_##', $segment );
21
+        $segment = preg_replace('/	|\t/', '##_ent_09_##', $segment);
22 22
 
23 23
         //Substitute 4(+)-byte characters from a UTF-8 string to htmlentities
24
-        $segment = preg_replace_callback( '/([\xF0-\xF7]...)/s', [ Utils::class, 'htmlentitiesFromUnicode' ], $segment );
24
+        $segment = preg_replace_callback('/([\xF0-\xF7]...)/s', [Utils::class, 'htmlentitiesFromUnicode'], $segment);
25 25
 
26 26
         // handling 

27
-        if ( strpos( $segment, '##_ent_0D_##' ) !== false ) {
28
-            $segment = str_replace( '##_ent_0D_##', '
', $segment );
27
+        if (strpos($segment, '##_ent_0D_##') !== false) {
28
+            $segment = str_replace('##_ent_0D_##', '
', $segment);
29 29
         }
30 30
 
31 31
         // handling 
32
-        if ( strpos( $segment, '##_ent_0A_##' ) !== false ) {
33
-            $segment = str_replace( '##_ent_0A_##', '
', $segment );
32
+        if (strpos($segment, '##_ent_0A_##') !== false) {
33
+            $segment = str_replace('##_ent_0A_##', '
', $segment);
34 34
         }
35 35
 
36 36
         // handling 	 (tab)
37 37
         // prevent to convert it to \t
38
-        if ( strpos( $segment, '##_ent_09_##' ) !== false ) {
39
-            $segment = str_replace( '##_ent_09_##', '	', $segment );
38
+        if (strpos($segment, '##_ent_09_##') !== false) {
39
+            $segment = str_replace('##_ent_09_##', '	', $segment);
40 40
         }
41 41
 
42 42
 
43 43
         //encode all not valid XML entities
44
-        return preg_replace( '/&(?!lt;|gt;|amp;|quot;|apos;|#[x]{0,1}[0-9A-F]{1,7};)/', '&', $segment );
44
+        return preg_replace('/&(?!lt;|gt;|amp;|quot;|apos;|#[x]{0,1}[0-9A-F]{1,7};)/', '&', $segment);
45 45
     }
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
src/Filters/EmojiToEntity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 
15 15
 class EmojiToEntity extends AbstractHandler {
16 16
 
17
-    public function transform( string $segment ): string {
18
-        return Emoji::toEntity( $segment );
17
+    public function transform(string $segment): string {
18
+        return Emoji::toEntity($segment);
19 19
     }
20 20
 
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
src/Filters/SquareSprintf.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * @inheritDoc
11 11
      */
12
-    public function transform( string $segment ): string {
12
+    public function transform(string $segment): string {
13 13
 
14 14
         $tags = [
15 15
                 '\[%s\]',
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
                 '\[%[a-z_]+:\d+%\]',
30 30
         ];
31 31
 
32
-        $regex = '/' . implode( "|", $tags ) . '/iu';
32
+        $regex = '/'.implode("|", $tags).'/iu';
33 33
 
34
-        preg_match_all( $regex, $segment, $html, PREG_SET_ORDER );
34
+        preg_match_all($regex, $segment, $html, PREG_SET_ORDER);
35 35
 
36
-        foreach ( $html as $pos => $percentSnailVariable ) {
36
+        foreach ($html as $pos => $percentSnailVariable) {
37 37
 
38 38
             $segment = preg_replace(
39
-                    '/' . preg_quote( $percentSnailVariable[ 0 ], '/' ) . '/',
40
-                    '<ph id="' . $this->getPipeline()->getNextId() . '" ctype="' . CTypeEnum::SQUARE_SPRINTF . '" equiv-text="base64:' . base64_encode( $percentSnailVariable[ 0 ] ) . '"/>',
39
+                    '/'.preg_quote($percentSnailVariable[0], '/').'/',
40
+                    '<ph id="'.$this->getPipeline()->getNextId().'" ctype="'.CTypeEnum::SQUARE_SPRINTF.'" equiv-text="base64:'.base64_encode($percentSnailVariable[0]).'"/>',
41 41
                     $segment,
42 42
                     1
43 43
             );
Please login to merge, or discard this patch.
src/Filters/DataRefReplace.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -25,24 +25,24 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * @inheritDoc
27 27
      */
28
-    public function transform( string $segment ): string {
28
+    public function transform(string $segment): string {
29 29
 
30
-        if ( empty( $this->dataRefMap ) ) {
30
+        if (empty($this->dataRefMap)) {
31 31
             $this->dataRefMap = $this->pipeline->getDataRefMap();
32 32
         }
33 33
 
34 34
         // dataRefMap is present only in xliff 2.0 files
35
-        if ( empty( $this->dataRefMap ) ) {
36
-            $segment = $this->replace_Ph_TagsWithoutDataRefCorrespondenceToMatecatPhTags( $segment );
35
+        if (empty($this->dataRefMap)) {
36
+            $segment = $this->replace_Ph_TagsWithoutDataRefCorrespondenceToMatecatPhTags($segment);
37 37
 
38
-            return $this->replace_Pc_TagsWithoutDataRefCorrespondenceToMatecatPhTags( $segment );
38
+            return $this->replace_Pc_TagsWithoutDataRefCorrespondenceToMatecatPhTags($segment);
39 39
         }
40 40
 
41
-        $dataRefReplacer = new DataRefReplacer( $this->dataRefMap );
42
-        $segment         = $dataRefReplacer->replace( $segment );
43
-        $segment         = $this->replace_Ph_TagsWithoutDataRefCorrespondenceToMatecatPhTags( $segment );
41
+        $dataRefReplacer = new DataRefReplacer($this->dataRefMap);
42
+        $segment         = $dataRefReplacer->replace($segment);
43
+        $segment         = $this->replace_Ph_TagsWithoutDataRefCorrespondenceToMatecatPhTags($segment);
44 44
 
45
-        return $this->replace_Pc_TagsWithoutDataRefCorrespondenceToMatecatPhTags( $segment );
45
+        return $this->replace_Pc_TagsWithoutDataRefCorrespondenceToMatecatPhTags($segment);
46 46
     }
47 47
 
48 48
     /**
@@ -61,23 +61,23 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @return string
63 63
      */
64
-    private function replace_Ph_TagsWithoutDataRefCorrespondenceToMatecatPhTags( string $segment ): string {
64
+    private function replace_Ph_TagsWithoutDataRefCorrespondenceToMatecatPhTags(string $segment): string {
65 65
 
66
-        preg_match_all( '/<(ph .*?)>/iu', $segment, $phTags );
66
+        preg_match_all('/<(ph .*?)>/iu', $segment, $phTags);
67 67
 
68
-        if ( count( $phTags[ 0 ] ) === 0 ) {
68
+        if (count($phTags[0]) === 0) {
69 69
             return $segment;
70 70
         }
71 71
 
72
-        foreach ( $phTags[ 0 ] as $phTag ) {
72
+        foreach ($phTags[0] as $phTag) {
73 73
 
74 74
             // check if phTag has not any correspondence on dataRef map
75
-            if ( $this->isAValidPhTag( $phTag ) ) {
75
+            if ($this->isAValidPhTag($phTag)) {
76 76
                 $segment = preg_replace(
77
-                        '/' . preg_quote( $phTag, '/' ) . '/',
78
-                        '<ph id="' . $this->getPipeline()->getNextId() .
79
-                        '" ctype="' . CTypeEnum::ORIGINAL_PH_OR_NOT_DATA_REF .
80
-                        '" equiv-text="base64:' . base64_encode( $phTag ) .
77
+                        '/'.preg_quote($phTag, '/').'/',
78
+                        '<ph id="'.$this->getPipeline()->getNextId().
79
+                        '" ctype="'.CTypeEnum::ORIGINAL_PH_OR_NOT_DATA_REF.
80
+                        '" equiv-text="base64:'.base64_encode($phTag).
81 81
                         '"/>',
82 82
                         $segment,
83 83
                         1 // replace ONLY ONE occurrence
@@ -97,28 +97,28 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @return bool
99 99
      */
100
-    private function isAValidPhTag( string $phTag ): bool {
100
+    private function isAValidPhTag(string $phTag): bool {
101 101
 
102 102
         // try not to throw exception for wrong segments with opening tags and no closing
103 103
         try {
104
-            $parsed = XmlParser::parse( $phTag, true );
105
-        } catch ( Exception $e ) {
104
+            $parsed = XmlParser::parse($phTag, true);
105
+        } catch (Exception $e) {
106 106
             return false;
107 107
         }
108 108
 
109 109
         // check for matecat ctype
110
-        $cType = isset( $parsed[ 0 ]->attributes[ 'ctype' ] ) ? $parsed[ 0 ]->attributes[ 'ctype' ] : 'not-found';
111
-        if ( CTypeEnum::isMatecatCType( $cType ) ) {
110
+        $cType = isset($parsed[0]->attributes['ctype']) ? $parsed[0]->attributes['ctype'] : 'not-found';
111
+        if (CTypeEnum::isMatecatCType($cType)) {
112 112
             return false;
113 113
         }
114 114
 
115 115
         // if has equiv-text don't touch
116
-        if ( isset( $parsed[ 0 ]->attributes[ 'equiv-text' ] ) ) {
116
+        if (isset($parsed[0]->attributes['equiv-text'])) {
117 117
             return false;
118 118
         }
119 119
 
120
-        if ( isset( $parsed[ 0 ]->attributes[ 'dataRef' ] ) ) {
121
-            return !array_key_exists( $parsed[ 0 ]->attributes[ 'dataRef' ], $this->dataRefMap );
120
+        if (isset($parsed[0]->attributes['dataRef'])) {
121
+            return !array_key_exists($parsed[0]->attributes['dataRef'], $this->dataRefMap);
122 122
         }
123 123
 
124 124
         return true;
@@ -141,33 +141,33 @@  discard block
 block discarded – undo
141 141
      *
142 142
      * @return string
143 143
      */
144
-    private function replace_Pc_TagsWithoutDataRefCorrespondenceToMatecatPhTags( string $segment ): string {
144
+    private function replace_Pc_TagsWithoutDataRefCorrespondenceToMatecatPhTags(string $segment): string {
145 145
 
146
-        preg_match_all( '/<(pc .*?)>/iu', $segment, $openingPcTags );
147
-        preg_match_all( '|<(/pc)>|iu', $segment, $closingPcTags );
146
+        preg_match_all('/<(pc .*?)>/iu', $segment, $openingPcTags);
147
+        preg_match_all('|<(/pc)>|iu', $segment, $closingPcTags);
148 148
 
149
-        if ( count( $openingPcTags[ 0 ] ) === 0 ) {
149
+        if (count($openingPcTags[0]) === 0) {
150 150
             return $segment;
151 151
         }
152 152
 
153
-        foreach ( $openingPcTags[ 0 ] as $openingPcTag ) {
153
+        foreach ($openingPcTags[0] as $openingPcTag) {
154 154
             $segment = preg_replace(
155
-                    '/' . preg_quote( $openingPcTag, '/' ) . '/',
156
-                    '<ph id="' . $this->getPipeline()->getNextId() .
157
-                    '" ctype="' . CTypeEnum::ORIGINAL_PC_OPEN_NO_DATA_REF .
158
-                    '" equiv-text="base64:' . base64_encode( $openingPcTag ) .
155
+                    '/'.preg_quote($openingPcTag, '/').'/',
156
+                    '<ph id="'.$this->getPipeline()->getNextId().
157
+                    '" ctype="'.CTypeEnum::ORIGINAL_PC_OPEN_NO_DATA_REF.
158
+                    '" equiv-text="base64:'.base64_encode($openingPcTag).
159 159
                     '"/>',
160 160
                     $segment,
161 161
                     1
162 162
             );
163 163
         }
164 164
 
165
-        foreach ( $closingPcTags[ 0 ] as $closingPcTag ) {
165
+        foreach ($closingPcTags[0] as $closingPcTag) {
166 166
             $segment = preg_replace(
167
-                    '/' . preg_quote( $closingPcTag, '/' ) . '/',
168
-                    '<ph id="' . $this->getPipeline()->getNextId() .
169
-                    '" ctype="' . CTypeEnum::ORIGINAL_PC_CLOSE_NO_DATA_REF .
170
-                    '" equiv-text="base64:' . base64_encode( $closingPcTag ) .
167
+                    '/'.preg_quote($closingPcTag, '/').'/',
168
+                    '<ph id="'.$this->getPipeline()->getNextId().
169
+                    '" ctype="'.CTypeEnum::ORIGINAL_PC_CLOSE_NO_DATA_REF.
170
+                    '" equiv-text="base64:'.base64_encode($closingPcTag).
171 171
                     '"/>',
172 172
                     $segment,
173 173
                     1
Please login to merge, or discard this patch.