Passed
Push — master ( af085a...1f0b62 )
by
unknown
56s queued 13s
created
src/RGBAColor/Converter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public static function requireValidColorArray(array $color) : void
50 50
     {
51
-        if(self::isColorArray($color))
51
+        if (self::isColorArray($color))
52 52
         {
53 53
             return;
54 54
         }
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
             RGBAColor::COMPONENT_BLUE
81 81
         );
82 82
 
83
-        foreach($keys as $key)
83
+        foreach ($keys as $key)
84 84
         {
85
-            if(!isset($color[$key]))
85
+            if (!isset($color[$key]))
86 86
             {
87 87
                 return false;
88 88
             }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             self::int2hex($color[RGBAColor::COMPONENT_GREEN]).
105 105
             self::int2hex($color[RGBAColor::COMPONENT_BLUE]);
106 106
 
107
-        if(isset($color[RGBAColor::COMPONENT_ALPHA]) && $color[RGBAColor::COMPONENT_ALPHA] < 255)
107
+        if (isset($color[RGBAColor::COMPONENT_ALPHA]) && $color[RGBAColor::COMPONENT_ALPHA] < 255)
108 108
         {
109 109
             $hex .= self::int2hex($color[RGBAColor::COMPONENT_ALPHA]);
110 110
         }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     private static function int2hex(int $int) : string
125 125
     {
126 126
         $str = dechex($int);
127
-        if(strlen($str) === 1)
127
+        if (strlen($str) === 1)
128 128
         {
129 129
             $str = $str.$str;
130 130
         }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public static function color2readable(RGBAColor $color) : string
145 145
     {
146
-        if($color->hasTransparency())
146
+        if ($color->hasTransparency())
147 147
         {
148 148
             return sprintf(
149 149
                 'RGBA(%s %s %s %s)',
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
         $hex = strtoupper($hex);
208 208
         $length = strlen($hex);
209 209
 
210
-        if($length === 3)
210
+        if ($length === 3)
211 211
         {
212 212
             return self::parseHEX3($hex);
213 213
         }
214
-        else if($length === 6)
214
+        else if ($length === 6)
215 215
         {
216 216
             return self::parseHEX6($hex);
217 217
         }
Please login to merge, or discard this patch.