Completed
Push — chore/php-8-migration ( 0b97e4...588942 )
by Vladimir
09:24
created
src/Markup/StakxDown.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,8 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $Block = parent::blockHeader($Line);
67 67
 
68
-        if (isset($Block['element']['text'])) {
68
+        if (isset($Block['element']['text']))
69
+        {
69 70
             $Block['element']['attributes']['id'] = $this->slugifyHeader($Block);
70 71
         }
71 72
 
@@ -79,10 +80,12 @@  discard block
 block discarded – undo
79 80
         //   https://github.com/erusev/parsedown-extra/issues/134
80 81
         $Block = @parent::blockSetextHeader($Line, $Block);
81 82
 
82
-        if (isset($Block['element']['name'])) {
83
+        if (isset($Block['element']['name']))
84
+        {
83 85
             $element = $Block['element']['name'];
84 86
 
85
-            if (in_array($element, ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])) {
87
+            if (in_array($element, ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']))
88
+            {
86 89
                 $Block['element']['attributes']['id'] = $this->slugifyHeader($Block);
87 90
             }
88 91
         }
@@ -93,7 +96,8 @@  discard block
 block discarded – undo
93 96
     protected function blockFencedCodeComplete($block)
94 97
     {
95 98
         // The class has a `language-` prefix, remove this to get the language
96
-        if (isset($block['element']['text']['attributes']) && Service::hasRunTimeFlag(RuntimeStatus::USING_HIGHLIGHTER)) {
99
+        if (isset($block['element']['text']['attributes']) && Service::hasRunTimeFlag(RuntimeStatus::USING_HIGHLIGHTER))
100
+        {
97 101
             $cssClass = $block['element']['text']['attributes']['class'];
98 102
             $block['markup'] = $this->highlightCode($cssClass, $block['element']['text']['text']);
99 103
 
@@ -107,7 +111,8 @@  discard block
 block discarded – undo
107 111
     {
108 112
         $imageBlock = parent::inlineImage($Excerpt);
109 113
 
110
-        if ($imageBlock !== null) {
114
+        if ($imageBlock !== null)
115
+        {
111 116
             $imageSrc = trim((string)$imageBlock['element']['attributes']['src']);
112 117
 
113 118
             $this->registerAsset($imageSrc);
Please login to merge, or discard this patch.
src/MarkupEngine/MarkupEngineManager.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function addMarkupEngines(iterable $markupEngines): void
25 25
     {
26
-        foreach ($markupEngines as $markupEngine) {
26
+        foreach ($markupEngines as $markupEngine)
27
+        {
27 28
             $this->addMarkupEngine($markupEngine);
28 29
         }
29 30
     }
@@ -33,10 +34,14 @@  discard block
 block discarded – undo
33 34
         $extensions = $markupEngine->getExtensions();
34 35
         $primaryExt = __::first($extensions);
35 36
 
36
-        foreach ($extensions as $k => $extension) {
37
-            if ($k === 0) {
37
+        foreach ($extensions as $k => $extension)
38
+        {
39
+            if ($k === 0)
40
+            {
38 41
                 $this->enginesByExtension[$extension] = $markupEngine;
39
-            } else {
42
+            }
43
+            else
44
+            {
40 45
                 $this->enginesByExtension[$extension] = &$this->enginesByExtension[$primaryExt];
41 46
             }
42 47
         }
@@ -46,7 +51,8 @@  discard block
 block discarded – undo
46 51
 
47 52
     public function getEngineByTag($tag): MarkupEngineInterface
48 53
     {
49
-        if (isset($this->enginesByTags[$tag])) {
54
+        if (isset($this->enginesByTags[$tag]))
55
+        {
50 56
             return $this->enginesByTags[$tag];
51 57
         }
52 58
 
@@ -55,7 +61,8 @@  discard block
 block discarded – undo
55 61
 
56 62
     public function getEngineByExtension($extension): MarkupEngineInterface
57 63
     {
58
-        if (isset($this->enginesByExtension[$extension])) {
64
+        if (isset($this->enginesByExtension[$extension]))
65
+        {
59 66
             return $this->enginesByExtension[$extension];
60 67
         }
61 68
 
Please login to merge, or discard this patch.