Passed
Pull Request — master (#5)
by Jitendra
02:12
created
examples/example.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 use Ahc\HtmlUp;
4 4
 
5
-require dirname(__DIR__) . '/vendor/autoload.php';
5
+require dirname(__DIR__).'/vendor/autoload.php';
6 6
 
7
-$markdown = file_get_contents(dirname(__DIR__) . '/readme.md');
7
+$markdown = file_get_contents(dirname(__DIR__).'/readme.md');
8 8
 
9 9
 /* You can use any of the three usage methods below */
10 10
 
Please login to merge, or discard this patch.
src/HtmlUp.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     protected function anchors()
167 167
     {
168 168
         // Images.
169
-        $this->markup = preg_replace_callback(static::RE_MD_IMG, function ($img) {
169
+        $this->markup = preg_replace_callback(static::RE_MD_IMG, function($img) {
170 170
             $title = isset($img[3]) ? " title={$img[3]} " : '';
171 171
             $alt   = $img[1] ? " alt=\"{$img[1]}\" " : '';
172 172
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         }, $this->markup);
175 175
 
176 176
         // Anchors.
177
-        $this->markup = preg_replace_callback(static::RE_MD_URL, function ($a) {
177
+        $this->markup = preg_replace_callback(static::RE_MD_URL, function($a) {
178 178
             $title = isset($a[3]) ? " title={$a[3]} " : '';
179 179
 
180 180
             return "<a href=\"{$a[2]}\"{$title}>{$a[1]}</a>";
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     protected function spans()
185 185
     {
186 186
         // em/code/strong/del
187
-        $this->markup = preg_replace_callback(static::RE_MD_FONT, function ($em) {
187
+        $this->markup = preg_replace_callback(static::RE_MD_FONT, function($em) {
188 188
             switch (substr($em[1], 0, 2)) {
189 189
                 case  '**':
190 190
                 case '__':
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             $level = strlen($this->trimmedLine) - strlen(ltrim($this->trimmedLine, '#'));
286 286
 
287 287
             if ($level < 7) {
288
-                $this->markup .= "\n<h{$level}>" . ltrim(ltrim($this->trimmedLine, '# ')) . "</h{$level}>";
288
+                $this->markup .= "\n<h{$level}>".ltrim(ltrim($this->trimmedLine, '# '))."</h{$level}>";
289 289
 
290 290
                 return true;
291 291
             }
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
         if ($codeBlock || (empty($this->inList) && empty($this->inQuote) && $this->indent >= 4)) {
313 313
             $lang = isset($codeMatch[1])
314
-                ? ' class="language-' . $codeMatch[1] . '"'
314
+                ? ' class="language-'.$codeMatch[1].'"'
315 315
                 : '';
316 316
 
317 317
             $this->markup .= "\n<pre><code{$lang}>";
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
                 ++$this->listLevel;
368 368
             }
369 369
 
370
-            $this->markup .= '<li>' . ltrim($this->trimmedLine, '-*0123456789. ');
370
+            $this->markup .= '<li>'.ltrim($this->trimmedLine, '-*0123456789. ');
371 371
 
372 372
             $isUl = in_array(substr($this->trimmedNextLine, 0, 2), ['- ', '* ', '+ ']);
373 373
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
                 $this->trimmedLine = trim($this->trimmedLine, '|');
417 417
 
418 418
                 foreach (explode('|', $this->trimmedLine) as $hdr) {
419
-                    $this->markup .= '<th>' . trim($hdr) . "</th>\n";
419
+                    $this->markup .= '<th>'.trim($hdr)."</th>\n";
420 420
                 }
421 421
 
422 422
                 $this->markup .= "</tr>\n</thead>\n<tbody>\n";
Please login to merge, or discard this patch.