Completed
Branch master (30e0ce)
by Asif
03:29
created
src/Compilers/Shortcode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@
 block discarded – undo
42 42
     {
43 43
         $value = $this->{$attribute};
44 44
 
45
-        if(!is_null($value))
45
+        if (!is_null($value))
46 46
         {
47 47
             return $attribute . '="' . $value . '"';
48 48
         }
49
-        elseif(!is_null($fallback))
49
+        elseif (!is_null($fallback))
50 50
         {
51 51
             return $attribute . '="' . $fallback . '"';
52 52
         }
Please login to merge, or discard this patch.
src/Compilers/ShortcodeCompiler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function compile($value)
53 53
     {
54 54
         // Only continue is laravel-shortcodes have been registered
55
-        if(!$this->enabled || !$this->hasShortcodes())
55
+        if (!$this->enabled || !$this->hasShortcodes())
56 56
             return $value;
57 57
 
58 58
         // Set empty result
@@ -187,13 +187,13 @@  discard block
 block discarded – undo
187 187
         $callback = $this->registered[$name];
188 188
 
189 189
         // if is a string
190
-        if(is_string($callback))
190
+        if (is_string($callback))
191 191
         {
192 192
             // Parse the callback
193 193
             list($class, $method) = Str::parseCallback($callback, 'register');
194 194
 
195 195
             // If the class exist
196
-            if(class_exists($class))
196
+            if (class_exists($class))
197 197
             {
198 198
                 // return class and method
199 199
                 return array(
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';
220 220
 
221 221
         // Match
222
-        if(preg_match_all($pattern, preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text), $match, PREG_SET_ORDER))
222
+        if (preg_match_all($pattern, preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text), $match, PREG_SET_ORDER))
223 223
         {
224 224
             foreach ($match as $m)
225 225
             {
Please login to merge, or discard this patch.
src/ShortcodesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $state = $this->app['config']->get('laravel-shortcodes::enabled', false);
26 26
 
27 27
         // enable when needed
28
-        if($state)
28
+        if ($state)
29 29
             $this->app['shortcode.compiler']->enable();
30 30
     }
31 31
 
Please login to merge, or discard this patch.