Completed
Push — master ( 842449...fcd89a )
by Arnold
02:08
created
src/DateExtension.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * Callback for Twig to get all the filters.
33 33
      * 
34
-     * @return \Twig_Filter[]
34
+     * @return \Twig_SimpleFilter[]
35 35
      */
36 36
     public function getFilters()
37 37
     {
@@ -211,6 +211,7 @@  discard block
 block discarded – undo
211 211
      * Split duration into seconds, minutes, hours, days, weeks and years.
212 212
      * 
213 213
      * @param int $seconds
214
+     * @param integer $max
214 215
      * @return array
215 216
      */
216 217
     protected function splitDuration($seconds, $max)
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if (
113 113
             (is_int($datetype) && $datetype !== \IntlDateFormatter::NONE) ||
114 114
             (is_int($timetype) && $timetype !== \IntlDateFormatter::NONE)
115
-        ){
115
+        ) {
116 116
             $pattern = \IntlDateFormatter::create(
117 117
                 \Locale::getDefault(),
118 118
                 is_int($datetype) ? $datetype : \IntlDateFormatter::NONE,
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
         }
126 126
         
127 127
         if (is_string($datetype)) {
128
-            $pattern = trim($datetype . ' ' . $pattern);
128
+            $pattern = trim($datetype.' '.$pattern);
129 129
         }
130 130
 
131 131
         if (is_string($timetype)) {
132
-            $pattern = trim($pattern . ' ' . $timetype);
132
+            $pattern = trim($pattern.' '.$timetype);
133 133
         }
134 134
         
135 135
         return preg_replace('/\byy?\b/', 'yyyy', $pattern);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @param string              $calendar  'gregorian' or 'traditional'
181 181
      * @return string
182 182
      */
183
-    public function localTime($date, $format='short', $calendar='gregorian')
183
+    public function localTime($date, $format = 'short', $calendar = 'gregorian')
184 184
     {
185 185
         return $this->formatLocal($date, false, $format, $calendar);
186 186
     }
@@ -270,27 +270,27 @@  discard block
 block discarded – undo
270 270
         
271 271
         $duration = '';
272 272
         if (isset($years) && isset($units[5])) {
273
-            $duration .= $seperator . $years . $units[5];
273
+            $duration .= $seperator.$years.$units[5];
274 274
         }
275 275
         
276 276
         if (isset($weeks) && isset($units[4])) {
277
-            $duration .= $seperator . $weeks . $units[4];
277
+            $duration .= $seperator.$weeks.$units[4];
278 278
         }
279 279
         
280 280
         if (isset($days) && isset($units[3])) {
281
-            $duration .= $seperator . $days . $units[3];
281
+            $duration .= $seperator.$days.$units[3];
282 282
         }
283 283
         
284 284
         if (isset($hours) && isset($units[2])) {
285
-            $duration .= $seperator . $hours . $units[2];
285
+            $duration .= $seperator.$hours.$units[2];
286 286
         }
287 287
         
288 288
         if (isset($minutes) && isset($units[1])) {
289
-            $duration .= $seperator . $minutes . $units[1];
289
+            $duration .= $seperator.$minutes.$units[1];
290 290
         }
291 291
         
292 292
         if (isset($seconds) && isset($units[0])) {
293
-            $duration .= $seperator . $seconds . $units[0];
293
+            $duration .= $seperator.$seconds.$units[0];
294 294
         }
295 295
         
296 296
         return trim($duration, $seperator);
Please login to merge, or discard this patch.
src/ArrayExtension.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function product($array)
54 54
     {
55
-       return isset($array) ? array_product((array)$array) : null;
55
+        return isset($array) ? array_product((array)$array) : null;
56 56
     }
57 57
     
58 58
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function values($array)
65 65
     {
66
-       return isset($array) ? array_values((array)$array) : null;
66
+        return isset($array) ? array_values((array)$array) : null;
67 67
     }
68 68
     
69 69
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
                 $value = $key;
100 100
             }
101 101
             
102
-            $str .= ' ' . $key . '="' . addcslashes($value, '"') . '"';
102
+            $str .= ' '.$key.'="'.addcslashes($value, '"').'"';
103 103
         }
104 104
         
105 105
         return trim($str);
Please login to merge, or discard this patch.
tests/DateExtensionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,6 +160,6 @@
 block discarded – undo
160 160
      */
161 161
     public function testWithNull($filter)
162 162
     {
163
-        $this->assertRender('-', '{{ null|' . $filter . '("//")|default("-") }}');
163
+        $this->assertRender('-', '{{ null|'.$filter.'("//")|default("-") }}');
164 164
     }    
165 165
 }
Please login to merge, or discard this patch.
tests/ArrayExtensionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,6 +160,6 @@
 block discarded – undo
160 160
      */
161 161
     public function testWithNull($filter)
162 162
     {
163
-        $this->assertRender('-', '{{ null|' . $filter . '("//")|default("-") }}');
163
+        $this->assertRender('-', '{{ null|'.$filter.'("//")|default("-") }}');
164 164
     }    
165 165
 }
Please login to merge, or discard this patch.