Completed
Push — master ( f67f6a...20645f )
by Matt
02:44
created
src/Library/SimpleShortcode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function __construct($name, $atts = [], Closure $callback = null)
42 42
     {
43 43
         $this->name = $name;
44
-        $this->attributes = (array) $atts;
44
+        $this->attributes = (array)$atts;
45 45
         $this->callback = $callback;
46 46
     }
47 47
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function handle(?string $content = null, array $atts = []): string
55 55
     {
56 56
         if (is_null($this->callback)) {
57
-            return (string) $content;
57
+            return (string)$content;
58 58
         }
59 59
         $callback = $this->callback->bindTo($this, $this);
60 60
 
Please login to merge, or discard this patch.
src/Library/Age.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,28 +56,28 @@
 block discarded – undo
56 56
     private function calculate($units, DateInterval $diff)
57 57
     {
58 58
         $calculator = [
59
-            'centuries' => function (DateInterval $diff) {
59
+            'centuries' => function(DateInterval $diff) {
60 60
                 return $diff->y / 100;
61 61
             },
62
-            'decades' => function (DateInterval $diff) {
62
+            'decades' => function(DateInterval $diff) {
63 63
                 return $diff->y / 10;
64 64
             },
65
-            'years' => function (DateInterval $diff) {
65
+            'years' => function(DateInterval $diff) {
66 66
                 return $diff->y;
67 67
             },
68
-            'months' => function (DateInterval $diff) {
68
+            'months' => function(DateInterval $diff) {
69 69
                 return $diff->y * 12 + $diff->m;
70 70
             },
71
-            'days' => function (DateInterval $diff) {
71
+            'days' => function(DateInterval $diff) {
72 72
                 return $diff->days;
73 73
             },
74
-            'hours' => function (DateInterval $diff) {
74
+            'hours' => function(DateInterval $diff) {
75 75
                 return ($diff->days * 24) + $diff->h;
76 76
             },
77
-            'minutes' => function (DateInterval $diff) {
77
+            'minutes' => function(DateInterval $diff) {
78 78
                 return ($diff->days * 24 * 60) + $diff->i;
79 79
             },
80
-            'seconds' => function (DateInterval $diff) {
80
+            'seconds' => function(DateInterval $diff) {
81 81
                 return ($diff->days * 24 * 60 * 60) + $diff->s;
82 82
             },
83 83
         ];
Please login to merge, or discard this patch.
src/Exceptions/RegisterException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     /**
18 18
      * @const string
19 19
      */
20
-    const NO_ALIAS = 'Cannot alias a shortcode that does not implement '.AliasInterface::class;
20
+    const NO_ALIAS = 'Cannot alias a shortcode that does not implement ' . AliasInterface::class;
21 21
 
22 22
     /**
23 23
      * @return static
Please login to merge, or discard this patch.
src/Manager/ShortcodeManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 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) {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             return $shortcode->handle($content);
154 154
         };
155 155
 
156
-        $result = (string) $this->parser->parseShortcode($content, $tags, $handler);
156
+        $result = (string)$this->parser->parseShortcode($content, $tags, $handler);
157 157
 
158 158
         if ($deep && $this->hasShortcode($result, $tags)) {
159 159
             return $this->doShortcode($result, $tags, $deep);
Please login to merge, or discard this patch.
src/Library/Ipsum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function handle(?string $content = null): string
43 43
     {
44
-        return trim((string) preg_replace('/\s+/', ' ', $this->ipsum));
44
+        return trim((string)preg_replace('/\s+/', ' ', $this->ipsum));
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
src/Parsers/DefaultParser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             .'\\[\\/\\2\\]'     // Closing shortcode tag
74 74
             .')?'
75 75
             .')'
76
-            .'(\\]?)';          // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
76
+            .'(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
77 77
     }
78 78
 
79 79
     /**
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
         ]);
97 97
         $pattern = "/{$patterns}/";
98 98
         $text = preg_replace("/[\x{00a0}\x{200b}]+/u", ' ', $text);
99
-        if (preg_match_all($pattern, (string) $text, $match, PREG_SET_ORDER)) {
99
+        if (preg_match_all($pattern, (string)$text, $match, PREG_SET_ORDER)) {
100 100
 
101 101
             // Reject any unclosed HTML elements
102 102
             foreach ($this->generateAttributes($match) as $att => $value) {
103
-                if ($value !== true && strpos((string) $value, '<') !== false) {
104
-                    if (preg_match('/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', (string) $value) !== 1) {
103
+                if ($value !== true && strpos((string)$value, '<') !== false) {
104
+                    if (preg_match('/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', (string)$value) !== 1) {
105 105
                         $value = '';
106 106
                     }
107 107
                 }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     private function generateCallback(Closure $callback): Closure
156 156
     {
157
-        return function ($match) use ($callback) {
157
+        return function($match) use ($callback) {
158 158
             if ($match[1] == '[' && $match[6] == ']') {
159 159
                 return substr($match[0], 1, -1);
160 160
             }
Please login to merge, or discard this patch.