Passed
Push — master ( f2f1e3...8e7d9e )
by Luca
02:31
created
src/EntityDecoder.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
     private $entities = false;
25 25
     private $style;
26 26
 
27
-     /**
28
-     * @param string $style       Either 'HTML', 'Markdown' or 'MarkdownV2'.
29
-     */
27
+      /**
28
+       * @param string $style       Either 'HTML', 'Markdown' or 'MarkdownV2'.
29
+       */
30 30
     public function __construct(string $style = 'HTML')
31 31
     {
32 32
         $this->style = $style;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             {
395 395
                 if (in_array($entity->type, array('bold', 'italic', 'code', 'pre', 'text_mention', 'text_link', 'strikethrough', 'underline', 'spoiler')))
396 396
                 {
397
-                   $entities[] = $entity;
397
+                    $entities[] = $entity;
398 398
                 }
399 399
             }
400 400
         }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         if (count($openedEntities) > 0)
119 119
         {
120 120
             $openedEntities = array_reverse($openedEntities);
121
-            foreach($openedEntities as $oe)
121
+            foreach ($openedEntities as $oe)
122 122
             {
123 123
                 $finalText .= $this->getEntityStopString($oe);
124 124
             }
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
         $str_split_unicode = preg_split('//u', $string, -1, PREG_SPLIT_NO_EMPTY);
141 141
         $new_string_split = [];
142 142
         $joiner = false;
143
-        for ($i = 0, $c = count($str_split_unicode); $i<$c; $i++) //loop the array
143
+        for ($i = 0, $c = count($str_split_unicode); $i < $c; $i++) //loop the array
144 144
         {
145
-            $codepoint = bin2hex(mb_convert_encoding($str_split_unicode[$i], 'UTF-16'));    //Get the string rappresentation of the unicode char
145
+            $codepoint = bin2hex(mb_convert_encoding($str_split_unicode[$i], 'UTF-16')); //Get the string rappresentation of the unicode char
146 146
             if ($codepoint == "fe0f" || $codepoint == "1f3fb" || $codepoint == "1f3fc" || $codepoint == "1f3fd" || $codepoint == "1f3fe" || $codepoint == "1f3ff")   //Manage the modifiers
147 147
             {
148
-                $new_string_split[count($new_string_split) - 1] .= $str_split_unicode[$i];  //Apppend the modifier to the previous char
148
+                $new_string_split[count($new_string_split) - 1] .= $str_split_unicode[$i]; //Apppend the modifier to the previous char
149 149
             }
150 150
             else
151 151
             {
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
                 {
159 159
                     if ($joiner) //If previous one was a ZWJ
160 160
                     {
161
-                        $new_string_split[count($new_string_split) - 1] .= $str_split_unicode[$i];  //Apppend to the previous char
161
+                        $new_string_split[count($new_string_split) - 1] .= $str_split_unicode[$i]; //Apppend to the previous char
162 162
                         $joiner = false;
163 163
                     }
164 164
                     else
165 165
                     {
166
-                        $new_string_split[] = $str_split_unicode[$i];   //New char
166
+                        $new_string_split[] = $str_split_unicode[$i]; //New char
167 167
                     }
168 168
                 }
169 169
             }
Please login to merge, or discard this patch.