Passed
Branch v1 (3d3bba)
by Andrew
05:29
created
Category
src/twigextensions/TypogrifyTwigExtension.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
     public function getFilters()
41 41
     {
42 42
         return [
43
-            new \Twig_SimpleFilter('typogrify', [$this, 'typogrify']),
44
-            new \Twig_SimpleFilter('typogrifyFeed', [$this, 'typogrifyFeed']),
45
-            new \Twig_SimpleFilter('smartypants', [$this, 'smartypants']),
46
-            new \Twig_SimpleFilter('truncate', [$this, 'truncate']),
47
-            new \Twig_SimpleFilter('truncateOnWord', [$this, 'truncateOnWord']),
48
-            new \Twig_SimpleFilter('stringy', [$this, 'stringy']),
49
-            new \Twig_SimpleFilter('humanFileSize', [$this, 'humanFileSize']),
50
-            new \Twig_SimpleFilter('humanDuration', [$this, 'humanDuration']),
51
-            new \Twig_SimpleFilter('humanRelativeTime', [$this, 'humanRelativeTime']),
52
-            new \Twig_SimpleFilter('ordinalize', [$this, 'ordinalize']),
53
-            new \Twig_SimpleFilter('pluralize', [$this, 'pluralize']),
54
-            new \Twig_SimpleFilter('singularize', [$this, 'singularize']),
55
-            new \Twig_SimpleFilter('transliterate', [$this, 'transliterate']),
43
+            new \Twig_SimpleFilter('typogrify', [ $this, 'typogrify' ]),
44
+            new \Twig_SimpleFilter('typogrifyFeed', [ $this, 'typogrifyFeed' ]),
45
+            new \Twig_SimpleFilter('smartypants', [ $this, 'smartypants' ]),
46
+            new \Twig_SimpleFilter('truncate', [ $this, 'truncate' ]),
47
+            new \Twig_SimpleFilter('truncateOnWord', [ $this, 'truncateOnWord' ]),
48
+            new \Twig_SimpleFilter('stringy', [ $this, 'stringy' ]),
49
+            new \Twig_SimpleFilter('humanFileSize', [ $this, 'humanFileSize' ]),
50
+            new \Twig_SimpleFilter('humanDuration', [ $this, 'humanDuration' ]),
51
+            new \Twig_SimpleFilter('humanRelativeTime', [ $this, 'humanRelativeTime' ]),
52
+            new \Twig_SimpleFilter('ordinalize', [ $this, 'ordinalize' ]),
53
+            new \Twig_SimpleFilter('pluralize', [ $this, 'pluralize' ]),
54
+            new \Twig_SimpleFilter('singularize', [ $this, 'singularize' ]),
55
+            new \Twig_SimpleFilter('transliterate', [ $this, 'transliterate' ]),
56 56
         ];
57 57
     }
58 58
 
@@ -62,20 +62,20 @@  discard block
 block discarded – undo
62 62
     public function getFunctions()
63 63
     {
64 64
         return [
65
-            new \Twig_SimpleFunction('typogrify', [$this, 'typogrify']),
66
-            new \Twig_SimpleFunction('typogrifyFeed', [$this, 'typogrifyFeed']),
67
-            new \Twig_SimpleFunction('smartypants', [$this, 'smartypants']),
68
-            new \Twig_SimpleFunction('getPhpTypography', [$this, 'getPhpTypography']),
69
-            new \Twig_SimpleFunction('truncate', [$this, 'truncate']),
70
-            new \Twig_SimpleFunction('truncateOnWord', [$this, 'truncateOnWord']),
71
-            new \Twig_SimpleFunction('stringy', [$this, 'stringy']),
72
-            new \Twig_SimpleFunction('humanFileSize', [$this, 'humanFileSize']),
73
-            new \Twig_SimpleFunction('humanDuration', [$this, 'humanDuration']),
74
-            new \Twig_SimpleFunction('humanRelativeTime', [$this, 'humanRelativeTime']),
75
-            new \Twig_SimpleFunction('ordinalize', [$this, 'ordinalize']),
76
-            new \Twig_SimpleFunction('pluralize', [$this, 'pluralize']),
77
-            new \Twig_SimpleFunction('singularize', [$this, 'singularize']),
78
-            new \Twig_SimpleFunction('transliterate', [$this, 'transliterate']),
65
+            new \Twig_SimpleFunction('typogrify', [ $this, 'typogrify' ]),
66
+            new \Twig_SimpleFunction('typogrifyFeed', [ $this, 'typogrifyFeed' ]),
67
+            new \Twig_SimpleFunction('smartypants', [ $this, 'smartypants' ]),
68
+            new \Twig_SimpleFunction('getPhpTypography', [ $this, 'getPhpTypography' ]),
69
+            new \Twig_SimpleFunction('truncate', [ $this, 'truncate' ]),
70
+            new \Twig_SimpleFunction('truncateOnWord', [ $this, 'truncateOnWord' ]),
71
+            new \Twig_SimpleFunction('stringy', [ $this, 'stringy' ]),
72
+            new \Twig_SimpleFunction('humanFileSize', [ $this, 'humanFileSize' ]),
73
+            new \Twig_SimpleFunction('humanDuration', [ $this, 'humanDuration' ]),
74
+            new \Twig_SimpleFunction('humanRelativeTime', [ $this, 'humanRelativeTime' ]),
75
+            new \Twig_SimpleFunction('ordinalize', [ $this, 'ordinalize' ]),
76
+            new \Twig_SimpleFunction('pluralize', [ $this, 'pluralize' ]),
77
+            new \Twig_SimpleFunction('singularize', [ $this, 'singularize' ]),
78
+            new \Twig_SimpleFunction('transliterate', [ $this, 'transliterate' ]),
79 79
         ];
80 80
     }
81 81
 
Please login to merge, or discard this patch.
src/services/TypogrifyService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         if (!empty($string)) {
145 145
             $string = strip_tags($string);
146
-            $result = (string)Stringy::create($string)->truncate($length, $substring);
146
+            $result = (string) Stringy::create($string)->truncate($length, $substring);
147 147
         }
148 148
 
149 149
         return $result;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         if (!empty($string)) {
169 169
             $string = strip_tags($string);
170
-            $result = (string)Stringy::create($string)->safeTruncate($length, $substring);
170
+            $result = (string) Stringy::create($string)->safeTruncate($length, $substring);
171 171
         }
172 172
 
173 173
         return $result;
Please login to merge, or discard this patch.
src/Typogrify.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         Event::on(
60 60
             CraftVariable::class,
61 61
             CraftVariable::EVENT_INIT,
62
-            function (Event $event) {
62
+            function(Event $event) {
63 63
                 /** @var CraftVariable $variable */
64 64
                 $variable = $event->sender;
65 65
                 $variable->set('typogrify', TypogrifyVariable::class);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             Craft::t(
71 71
                 'typogrify',
72 72
                 '{name} plugin loaded',
73
-                ['name' => $this->name]
73
+                [ 'name' => $this->name ]
74 74
             ),
75 75
             __METHOD__
76 76
         );
Please login to merge, or discard this patch.