Passed
Push — master ( b1b43b...194feb )
by Josh
04:24 queued 02:15
created
lib/Caxy/HtmlDiff/MatchingBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
 
31 31
     public function count() : int
32 32
     {
33
-        return (int)$this->size;
33
+        return (int) $this->size;
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
lib/Caxy/HtmlDiff/ListDiffLines.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     protected function findListNode(DOMDocument $dom) : DOMNode
100 100
     {
101
-        $xPathQuery = '//' . implode('|//', self::LIST_TAG_NAMES);
101
+        $xPathQuery = '//'.implode('|//', self::LIST_TAG_NAMES);
102 102
         $xPath      = new DOMXPath($dom);
103 103
         $listNodes  = $xPath->query($xPathQuery);
104 104
 
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
     {
386 386
         $bufferDom = new DOMDocument('1.0', 'UTF-8');
387 387
 
388
-        foreach($node->childNodes as $childNode)
388
+        foreach ($node->childNodes as $childNode)
389 389
         {
390 390
             $bufferDom->appendChild($bufferDom->importNode($childNode, true));
391 391
         }
Please login to merge, or discard this patch.
lib/Caxy/HtmlDiff/AbstractDiff.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     public function initPurifier($defaultPurifierSerializerCache = null)
130 130
     {
131 131
         if (null !== $this->purifierConfig) {
132
-            $HTMLPurifierConfig  = $this->purifierConfig;
132
+            $HTMLPurifierConfig = $this->purifierConfig;
133 133
         } else {
134 134
             $HTMLPurifierConfig = HTMLPurifier_Config::createDefault();
135 135
         }
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
         $specialCharacters = '';
432 432
 
433 433
         foreach ($this->config->getSpecialCaseChars() as $char) {
434
-            $specialCharacters .= '\\' . $char;
434
+            $specialCharacters .= '\\'.$char;
435 435
         }
436 436
 
437 437
         // Normalize no-break-spaces to regular spaces
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 
463 463
             preg_match_all(
464 464
                 $regex,
465
-                $sentenceOrHtmlTag . ' ', // Inject a space at the end to make sure the last word is found by having a space behind it.
465
+                $sentenceOrHtmlTag.' ', // Inject a space at the end to make sure the last word is found by having a space behind it.
466 466
                 $sentenceSplitIntoWords,
467 467
                 PREG_SPLIT_NO_EMPTY
468 468
             );
@@ -489,14 +489,14 @@  discard block
 block discarded – undo
489 489
 
490 490
         $sentenceLength = $this->stringUtil->strlen($sentence);
491 491
         $firstCharacter = $this->stringUtil->substr($sentence, 0, 1);
492
-        $lastCharacter  = $this->stringUtil->substr($sentence, $sentenceLength -1, 1);
492
+        $lastCharacter  = $this->stringUtil->substr($sentence, $sentenceLength - 1, 1);
493 493
 
494 494
         if ($firstCharacter === ' ' || $firstCharacter === "\r" || $firstCharacter === "\n") {
495
-            $sentence = ' ' . ltrim($sentence);
495
+            $sentence = ' '.ltrim($sentence);
496 496
         }
497 497
 
498 498
         if ($sentenceLength > 1 && ($lastCharacter === ' ' || $lastCharacter === "\r" || $lastCharacter === "\n")) {
499
-            $sentence = rtrim($sentence) . ' ';
499
+            $sentence = rtrim($sentence).' ';
500 500
         }
501 501
 
502 502
         return $sentence;
Please login to merge, or discard this patch.
lib/Caxy/HtmlDiff/HtmlDiff.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
         $space = $this->stringUtil->strpos($word, ' ', 1);
741 741
 
742 742
         if ($space > 0) {
743
-            return '<' . $this->stringUtil->substr($word, 1, $space) . '>';
743
+            return '<'.$this->stringUtil->substr($word, 1, $space).'>';
744 744
         }
745 745
 
746 746
         return trim($word, '<>');
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
         for ($indexInOld = $startInOld; $indexInOld < $endInOld; ++$indexInOld) {
758 758
             $newMatchLengthAt = [];
759 759
 
760
-            $index = $this->oldWords[ $indexInOld ];
760
+            $index = $this->oldWords[$indexInOld];
761 761
 
762 762
             if ($this->isTag($index) === true) {
763 763
                 $index = $this->stripTagAttributes($index);
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         } elseif ($this->isImagePlaceholder($placeholder)) {
335 335
             return $this->diffElementsByAttribute($oldText, $newText, 'src', 'img');
336 336
         } elseif ($this->isPicturePlaceholder($placeholder)) {
337
-           return $this->diffPicture($oldText, $newText);
337
+            return $this->diffPicture($oldText, $newText);
338 338
         }
339 339
 
340 340
         return $this->diffElements($oldText, $newText, $stripWrappingTags);
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
             );
411 411
         }
412 412
         return $this->diffElements($oldText, $newText);
413
-  }
413
+    }
414 414
 
415 415
     protected function diffElementsByAttribute($oldText, $newText, $attribute, $element)
416 416
     {
Please login to merge, or discard this patch.