Passed
Branch version-bump (76ffac)
by Matt
03:27
created
src/Parsers/DefaultParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             return iterator_to_array($this->generateResults($matches));
32 32
         }
33 33
 
34
-        return preg_replace_callback("/$regex/", function ($match) use ($callback) {
34
+        return preg_replace_callback("/$regex/", function($match) use ($callback) {
35 35
             if ($match[1] == '[' && $match[6] == ']') {
36 36
                 return substr($match[0], 1, -1);
37 37
             }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             .'\\[\\/\\2\\]'     // Closing shortcode tag
83 83
             .')?'
84 84
             .')'
85
-            .'(\\]?)';          // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
85
+            .'(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
86 86
     }
87 87
 
88 88
     /**
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
         ]);
106 106
         $pattern = "/{$patterns}/";
107 107
         $text = preg_replace("/[\x{00a0}\x{200b}]+/u", ' ', $text);
108
-        if (preg_match_all($pattern, (string) $text, $match, PREG_SET_ORDER)) {
108
+        if (preg_match_all($pattern, (string)$text, $match, PREG_SET_ORDER)) {
109 109
 
110 110
             // Reject any unclosed HTML elements
111
-            foreach($this->generateAttributes($match) as $att => $value){
111
+            foreach ($this->generateAttributes($match) as $att => $value) {
112 112
                 if (strpos($value, '<') !== false) {
113 113
                     if (preg_match('/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value) !== 1) {
114 114
                         $value = '';
Please login to merge, or discard this patch.
src/Manager/ShortcodeManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
     public function doShortcode(string $content, $tags = [], bool $deep = false): string
142 142
     {
143 143
         $tags = $this->preProcessTags($tags);
144
-        $handler = function (string $tag, ?string $content = null, array $atts = []) {
144
+        $handler = function(string $tag, ?string $content = null, array $atts = []) {
145 145
             $shortcode = $this[$tag];
146 146
 
147 147
             if ($shortcode instanceof AttributeInterface) {
Please login to merge, or discard this patch.