Passed
Branch master (e8fdb5)
by Ismo
06:54
created
Category
src/BBCodeParserServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function register()
21 21
     {
22
-        $this->app->bind('bbcode', function () {
22
+        $this->app->bind('bbcode', function() {
23 23
             return new BBCodeParser;
24 24
         });
25 25
     }
@@ -31,6 +31,6 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function provides()
33 33
     {
34
-        return ['bbcode'];
34
+        return [ 'bbcode' ];
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/BBCodeParser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
     public function parse($source, $caseInsensitive = false)
131 131
     {
132 132
         foreach ($this->enabledParsers as $name => $parser) {
133
-            $pattern = ($caseInsensitive) ? $parser['pattern'] . 'i' : $parser['pattern'];
133
+            $pattern = ($caseInsensitive) ? $parser[ 'pattern' ] . 'i' : $parser[ 'pattern' ];
134 134
 
135
-            $source = $this->searchAndReplace($pattern, $parser['replace'], $source);
135
+            $source = $this->searchAndReplace($pattern, $parser[ 'replace' ], $source);
136 136
         }
137 137
         return $source;
138 138
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     public function stripBBCodeTags($source)
146 146
     {
147 147
         foreach ($this->parsers as $name => $parser) {
148
-            $source = $this->searchAndReplace($parser['pattern'] . 'i', $parser['content'], $source);
148
+            $source = $this->searchAndReplace($parser[ 'pattern' ] . 'i', $parser[ 'content' ], $source);
149 149
         }
150 150
         return $source;
151 151
     }
@@ -230,13 +230,13 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function setParser($name, $pattern, $replace, $content)
232 232
     {
233
-        $this->parsers[$name] = array(
233
+        $this->parsers[ $name ] = array(
234 234
             'pattern' => $pattern,
235 235
             'replace' => $replace,
236 236
             'content' => $content
237 237
         );
238 238
 
239
-        $this->enabledParsers[$name] = array(
239
+        $this->enabledParsers[ $name ] = array(
240 240
             'pattern' => $pattern,
241 241
             'replace' => $replace,
242 242
             'content' => $content
Please login to merge, or discard this patch.