Passed
Push — master ( d7ce39...b6c22f )
by
unknown
01:07
created
src/Css/Style.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
         if (!isset(self::$_defaults)) {
634 634
 
635 635
             // Shorthand
636
-            $d =& self::$_defaults;
636
+            $d = & self::$_defaults;
637 637
 
638 638
             // All CSS 2.1 properties, and their default values
639 639
             // Some properties are specified with their computed value for
@@ -973,11 +973,11 @@  discard block
 block discarded – undo
973 973
 
974 974
             // Assume numeric values are already in points
975 975
             if (is_numeric($l)) {
976
-                $ret += (float) $l;
976
+                $ret += (float)$l;
977 977
                 continue;
978 978
             }
979 979
 
980
-            $val = $this->single_length_in_pt((string) $l, $ref_size, $font_size);
980
+            $val = $this->single_length_in_pt((string)$l, $ref_size, $font_size);
981 981
             $ret += $val ?? 0;
982 982
         }
983 983
 
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
             return null;
1013 1013
         }
1014 1014
 
1015
-        $v = (float) $matches[1];
1015
+        $v = (float)$matches[1];
1016 1016
         $unit = mb_strtolower($matches[2]);
1017 1017
 
1018 1018
         if ($unit === "") {
@@ -1457,7 +1457,7 @@  discard block
 block discarded – undo
1457 1457
             if (self::$_methods_cache[$method]) {
1458 1458
                 return $this->$method();
1459 1459
             } else {
1460
-                return implode(" ", array_map(function ($sub_prop) {
1460
+                return implode(" ", array_map(function($sub_prop) {
1461 1461
                     $val = $this->__get($sub_prop);
1462 1462
                     return \is_array($val) ? implode(" ", $val) : $val;
1463 1463
                 }, self::$_props_shorthand[$prop]));
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
         $font_size = $this->__get("font_size");
1695 1695
         $factor = $computed === "normal"
1696 1696
             ? self::$default_line_height
1697
-            : (float) $computed;
1697
+            : (float)$computed;
1698 1698
 
1699 1699
         return $factor * $font_size;
1700 1700
     }
@@ -1913,10 +1913,10 @@  discard block
 block discarded – undo
1913 1913
         // Use a fixed ref size here. We don't know the border-box width here
1914 1914
         // and font size might be 0. Since we are only interested in whether
1915 1915
         // there is any border radius at all, this should do
1916
-        $tl = (float) $this->length_in_pt($this->border_top_left_radius, 12);
1917
-        $tr = (float) $this->length_in_pt($this->border_top_right_radius, 12);
1918
-        $br = (float) $this->length_in_pt($this->border_bottom_right_radius, 12);
1919
-        $bl = (float) $this->length_in_pt($this->border_bottom_left_radius, 12);
1916
+        $tl = (float)$this->length_in_pt($this->border_top_left_radius, 12);
1917
+        $tr = (float)$this->length_in_pt($this->border_top_right_radius, 12);
1918
+        $br = (float)$this->length_in_pt($this->border_bottom_right_radius, 12);
1919
+        $bl = (float)$this->length_in_pt($this->border_bottom_left_radius, 12);
1920 1920
 
1921 1921
         $this->has_border_radius_cache = $tl + $tr + $br + $bl > 0;
1922 1922
         return $this->has_border_radius_cache;
@@ -1949,10 +1949,10 @@  discard block
 block discarded – undo
1949 1949
 
1950 1950
         // Resolve percentages relative to width, as long as we have no support
1951 1951
         // for per-axis radii
1952
-        $tl = (float) $this->length_in_pt($this->border_top_left_radius, $w);
1953
-        $tr = (float) $this->length_in_pt($this->border_top_right_radius, $w);
1954
-        $br = (float) $this->length_in_pt($this->border_bottom_right_radius, $w);
1955
-        $bl = (float) $this->length_in_pt($this->border_bottom_left_radius, $w);
1952
+        $tl = (float)$this->length_in_pt($this->border_top_left_radius, $w);
1953
+        $tr = (float)$this->length_in_pt($this->border_top_right_radius, $w);
1954
+        $br = (float)$this->length_in_pt($this->border_bottom_right_radius, $w);
1955
+        $bl = (float)$this->length_in_pt($this->border_bottom_left_radius, $w);
1956 1956
 
1957 1957
         if ($tl + $tr + $br + $bl > 0) {
1958 1958
             [$rx, $ry, $rw, $rh] = $render_box;
@@ -2145,7 +2145,7 @@  discard block
 block discarded – undo
2145 2145
     {
2146 2146
         $integer = self::CSS_INTEGER;
2147 2147
         return preg_match("/^$integer$/", $val)
2148
-            ? (int) $val
2148
+            ? (int)$val
2149 2149
             : null;
2150 2150
     }
2151 2151
 
@@ -2741,7 +2741,7 @@  discard block
 block discarded – undo
2741 2741
 
2742 2742
         // Compute number values to string and lengths to float (in pt)
2743 2743
         if (is_numeric($val)) {
2744
-            return (string) $val;
2744
+            return (string)$val;
2745 2745
         }
2746 2746
 
2747 2747
         $font_size = $this->__get("font_size");
@@ -3343,7 +3343,7 @@  discard block
 block discarded – undo
3343 3343
 
3344 3344
         foreach ($matches as $match) {
3345 3345
             $counter = $match[1];
3346
-            $value = isset($match[2]) ? (int) $match[2] : $default;
3346
+            $value = isset($match[2]) ? (int)$match[2] : $default;
3347 3347
             $counters[$counter] = $sumDuplicates
3348 3348
                 ? ($counters[$counter] ?? 0) + $value
3349 3349
                 : $value;
@@ -3482,9 +3482,9 @@  discard block
 block discarded – undo
3482 3482
 
3483 3483
                             foreach ($values as $i => $value) {
3484 3484
                                 if (strpos($value, "rad")) {
3485
-                                    $values[$i] = rad2deg((float) $value);
3485
+                                    $values[$i] = rad2deg((float)$value);
3486 3486
                                 } else {
3487
-                                    $values[$i] = (float) $value;
3487
+                                    $values[$i] = (float)$value;
3488 3488
                                 }
3489 3489
                             }
3490 3490
 
@@ -3567,7 +3567,7 @@  discard block
 block discarded – undo
3567 3567
 
3568 3568
         $values = preg_split("/\s+/", $computed);
3569 3569
 
3570
-        $values = array_map(function ($value) {
3570
+        $values = array_map(function($value) {
3571 3571
             if (\in_array($value, ["top", "left"], true)) {
3572 3572
                 return 0;
3573 3573
             } elseif (\in_array($value, ["bottom", "right"], true)) {
@@ -3646,7 +3646,7 @@  discard block
 block discarded – undo
3646 3646
             return null;
3647 3647
         }
3648 3648
 
3649
-        $v = (float) $matches[1];
3649
+        $v = (float)$matches[1];
3650 3650
         $percent = $matches[2] === "%";
3651 3651
         $opacity = $percent ? ($v / 100) : $v;
3652 3652
 
Please login to merge, or discard this patch.