Completed
Push — master ( 9528ad...369c90 )
by Michael
03:33
created
class/wideimage/Font/TTF.php 2 patches
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package WideImage
23
-  **/
21
+	 * @package WideImage
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * TTF font support class
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,9 @@
 block discarded – undo
42 42
 		
43 43
 		function writeText($image, $x, $y, $text, $angle = 0)
44 44
 		{
45
-			if ($image->isTrueColor())
46
-				$image->alphaBlending(true);
45
+			if ($image->isTrueColor()) {
46
+							$image->alphaBlending(true);
47
+			}
47 48
 			
48 49
 			imagettftext($image->getHandle(), $this->size, $angle, $x, $y, $this->color, $this->face, $text);
49 50
 		}
Please login to merge, or discard this patch.
class/wideimage/Operation/AutoCrop.php 2 patches
Braces   +24 added lines, -17 removed lines patch added patch discarded remove patch
@@ -43,19 +43,22 @@  discard block
 block discarded – undo
43 43
 			$margin = intval($margin);
44 44
 			
45 45
 			$rgb_threshold = intval($rgb_threshold);
46
-			if ($rgb_threshold < 0)
47
-				$rgb_threshold = 0;
46
+			if ($rgb_threshold < 0) {
47
+							$rgb_threshold = 0;
48
+			}
48 49
 			
49 50
 			$pixel_cutoff = intval($pixel_cutoff);
50
-			if ($pixel_cutoff <= 1)
51
-				$pixel_cutoff = 1;
51
+			if ($pixel_cutoff <= 1) {
52
+							$pixel_cutoff = 1;
53
+			}
52 54
 			
53
-			if ($base_color === null)
54
-				$rgb_base = $img->getRGBAt(0, 0);
55
-			else
55
+			if ($base_color === null) {
56
+							$rgb_base = $img->getRGBAt(0, 0);
57
+			} else
56 58
 			{
57
-				if ($base_color < 0)
58
-					return $img->copy();
59
+				if ($base_color < 0) {
60
+									return $img->copy();
61
+				}
59 62
 				
60 63
 				$rgb_base = $img->getColorRGB($base_color);
61 64
 			}
@@ -145,17 +148,21 @@  discard block
 block discarded – undo
145 148
 					'bottom' => $cut_rect['bottom'] + $margin
146 149
 				);
147 150
 			
148
-			if ($cut_rect['left'] < 0)
149
-				$cut_rect['left'] = 0;
151
+			if ($cut_rect['left'] < 0) {
152
+							$cut_rect['left'] = 0;
153
+			}
150 154
 			
151
-			if ($cut_rect['top'] < 0)
152
-				$cut_rect['top'] = 0;
155
+			if ($cut_rect['top'] < 0) {
156
+							$cut_rect['top'] = 0;
157
+			}
153 158
 			
154
-			if ($cut_rect['right'] >= $img->getWidth())
155
-				$cut_rect['right'] = $img->getWidth() - 1;
159
+			if ($cut_rect['right'] >= $img->getWidth()) {
160
+							$cut_rect['right'] = $img->getWidth() - 1;
161
+			}
156 162
 			
157
-			if ($cut_rect['bottom'] >= $img->getHeight())
158
-				$cut_rect['bottom'] = $img->getHeight() - 1;
163
+			if ($cut_rect['bottom'] >= $img->getHeight()) {
164
+							$cut_rect['bottom'] = $img->getHeight() - 1;
165
+			}
159 166
 			
160 167
 			return $img->crop($cut_rect['left'], $cut_rect['top'], $cut_rect['right'] - $cut_rect['left'] + 1, $cut_rect['bottom'] - $cut_rect['top'] + 1);
161 168
 		}
Please login to merge, or discard this patch.
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.
class/wideimage/Operation/CopyChannelsTrueColor.php 2 patches
Braces   +13 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,18 +46,24 @@
 block discarded – undo
46 46
 			$height = $img->getHeight();
47 47
 			$copy = WideImage_TrueColorImage::create($width, $height);
48 48
 			
49
-			if (count($channels) > 0)
50
-				for ($x = 0; $x < $width; $x++)
51
-					for ($y = 0; $y < $height; $y++)
49
+			if (count($channels) > 0) {
50
+							for ($x = 0;
51
+			}
52
+			$x < $width; $x++) {
53
+									for ($y = 0;
54
+				}
55
+				$y < $height; $y++)
52 56
 					{
53 57
 						$RGBA = $img->getRGBAt($x, $y);
54 58
 						$newRGBA = $blank;
55
-						foreach ($channels as $channel)
56
-							$newRGBA[$channel] = $RGBA[$channel];
59
+						foreach ($channels as $channel) {
60
+													$newRGBA[$channel] = $RGBA[$channel];
61
+						}
57 62
 						
58 63
 						$color = $copy->getExactColorAlpha($newRGBA);
59
-						if ($color == -1)
60
-							$color = $copy->allocateColorAlpha($newRGBA);
64
+						if ($color == -1) {
65
+													$color = $copy->allocateColorAlpha($newRGBA);
66
+						}
61 67
 						
62 68
 						$copy->setColorAt($x, $y, $color);
63 69
 					}
Please login to merge, or discard this patch.
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.
class/wideimage/Operation/GetMask.php 2 patches
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-	
22
-	* @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * GetMask operation class
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,21 +45,25 @@
 block discarded – undo
45 45
 			$mask->alphaBlending(false);
46 46
 			$mask->saveAlpha(false);
47 47
 			
48
-			for ($i = 0; $i <= 255; $i++)
49
-				$greyscale[$i] = ImageColorAllocate($mask->getHandle(), $i, $i, $i);
48
+			for ($i = 0; $i <= 255; $i++) {
49
+							$greyscale[$i] = ImageColorAllocate($mask->getHandle(), $i, $i, $i);
50
+			}
50 51
 			
51 52
 			imagefilledrectangle($mask->getHandle(), 0, 0, $width, $height, $greyscale[255]);
52 53
 			
53 54
 			$transparentColor = $image->getTransparentColor();
54 55
 			$alphaToGreyRatio = 255 / 127;
55
-			for ($x = 0; $x < $width; $x++)
56
-				for ($y = 0; $y < $height; $y++)
56
+			for ($x = 0; $x < $width; $x++) {
57
+							for ($y = 0;
58
+			}
59
+			$y < $height; $y++)
57 60
 				{
58 61
 					$color = $image->getColorAt($x, $y);
59
-					if ($color == $transparentColor)
60
-						$rgba['alpha'] = 127;
61
-					else
62
-						$rgba = $image->getColorRGB($color);
62
+					if ($color == $transparentColor) {
63
+											$rgba['alpha'] = 127;
64
+					} else {
65
+											$rgba = $image->getColorRGB($color);
66
+					}
63 67
 					imagesetpixel($mask->getHandle(), $x, $y, $greyscale[255 - round($rgba['alpha'] * $alphaToGreyRatio)]);
64 68
 				}
65 69
 			return $mask;
Please login to merge, or discard this patch.
class/wideimage/Operation/Unsharp.php 3 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			$radius = $radius * 2;
51 51
 			if ($threshold > 255)    $threshold = 255;
52 52
 			
53
-			$radius = abs(round($radius));     // Only integers make sense.
53
+			$radius = abs(round($radius)); // Only integers make sense.
54 54
 			if ($radius == 0) {
55 55
 				return $image;
56 56
 			}
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 			
66 66
 			$blurred = $image->applyConvolution($matrix, 16, 0);
67 67
 			
68
-			if($threshold > 0) {
68
+			if ($threshold > 0) {
69 69
 				// Calculate the difference between the blurred pixels and the original
70 70
 				// and set the pixels
71
-				for ($x = 0; $x < $image->getWidth(); $x++)    { // each row
72
-					for ($y = 0; $y < $image->getHeight(); $y++)    { // each pixel
71
+				for ($x = 0; $x < $image->getWidth(); $x++) { // each row
72
+					for ($y = 0; $y < $image->getHeight(); $y++) { // each pixel
73 73
 						$rgbOrig = $image->getRGBAt($x, $y);
74 74
 						$rOrig = $rgbOrig["red"];
75 75
 						$gOrig = $rgbOrig["green"];
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 			else {
103 103
 				$w = $image->getWidth();
104 104
 				$h = $image->getHeight();
105
-				for ($x = 0; $x < $w; $x++)    { // each row
106
-					for ($y = 0; $y < $h; $y++)    { // each pixel
105
+				for ($x = 0; $x < $w; $x++) { // each row
106
+					for ($y = 0; $y < $h; $y++) { // each pixel
107 107
 						$rgbOrig = $image->getRGBAt($x, $y);
108 108
 						$rOrig = $rgbOrig["red"];
109 109
 						$gOrig = $rgbOrig["green"];
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
 						$bBlur = $rgbBlur["blue"];
116 116
 						
117 117
 						$rNew = ($amount * ($rOrig - $rBlur)) + $rOrig;
118
-							if($rNew>255){$rNew=255;}
119
-							elseif($rNew<0){$rNew=0;}
118
+							if ($rNew > 255) {$rNew = 255; }
119
+							elseif ($rNew < 0) {$rNew = 0; }
120 120
 						$gNew = ($amount * ($gOrig - $gBlur)) + $gOrig;
121
-							if($gNew>255){$gNew=255;}
122
-							elseif($gNew<0){$gNew=0;}
121
+							if ($gNew > 255) {$gNew = 255; }
122
+							elseif ($gNew < 0) {$gNew = 0; }
123 123
 						$bNew = ($amount * ($bOrig - $bBlur)) + $bOrig;
124
-							if($bNew>255){$bNew=255;}
125
-							elseif($bNew<0){$bNew=0;}
124
+							if ($bNew > 255) {$bNew = 255; }
125
+							elseif ($bNew < 0) {$bNew = 0; }
126 126
 						$rgbNew = array("red" => $rNew, "green" => $gNew, "blue" => $bNew, "alpha" => 0);
127 127
 						
128 128
 						$image->setRGBAt($x, $y, $rgbNew);
Please login to merge, or discard this patch.
Braces   +13 added lines, -11 removed lines patch added patch discarded remove patch
@@ -44,11 +44,17 @@  discard block
 block discarded – undo
44 44
 		function execute($image, $amount, $radius, $threshold) {
45 45
 			
46 46
 			// Attempt to calibrate the parameters to Photoshop:
47
-			if ($amount > 500)    $amount = 500;
47
+			if ($amount > 500) {
48
+				$amount = 500;
49
+			}
48 50
 			$amount = $amount * 0.016;
49
-			if ($radius > 50)    $radius = 50;
51
+			if ($radius > 50) {
52
+				$radius = 50;
53
+			}
50 54
 			$radius = $radius * 2;
51
-			if ($threshold > 255)    $threshold = 255;
55
+			if ($threshold > 255) {
56
+				$threshold = 255;
57
+			}
52 58
 			
53 59
 			$radius = abs(round($radius));     // Only integers make sense.
54 60
 			if ($radius == 0) {
@@ -98,8 +104,7 @@  discard block
 block discarded – undo
98 104
 						}
99 105
 					}
100 106
 				}
101
-			}
102
-			else {
107
+			} else {
103 108
 				$w = $image->getWidth();
104 109
 				$h = $image->getHeight();
105 110
 				for ($x = 0; $x < $w; $x++)    { // each row
@@ -115,14 +120,11 @@  discard block
 block discarded – undo
115 120
 						$bBlur = $rgbBlur["blue"];
116 121
 						
117 122
 						$rNew = ($amount * ($rOrig - $rBlur)) + $rOrig;
118
-							if($rNew>255){$rNew=255;}
119
-							elseif($rNew<0){$rNew=0;}
123
+							if($rNew>255){$rNew=255;} elseif($rNew<0){$rNew=0;}
120 124
 						$gNew = ($amount * ($gOrig - $gBlur)) + $gOrig;
121
-							if($gNew>255){$gNew=255;}
122
-							elseif($gNew<0){$gNew=0;}
125
+							if($gNew>255){$gNew=255;} elseif($gNew<0){$gNew=0;}
123 126
 						$bNew = ($amount * ($bOrig - $bBlur)) + $bOrig;
124
-							if($bNew>255){$bNew=255;}
125
-							elseif($bNew<0){$bNew=0;}
127
+							if($bNew>255){$bNew=255;} elseif($bNew<0){$bNew=0;}
126 128
 						$rgbNew = array("red" => $rNew, "green" => $gNew, "blue" => $bNew, "alpha" => 0);
127 129
 						
128 130
 						$image->setRGBAt($x, $y, $rgbNew);
Please login to merge, or discard this patch.
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.
class/wideimage/Operation/AsGrayscale.php 2 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@  discard block
 block discarded – undo
40 40
 			$palette = $image instanceof WideImage_PaletteImage;
41 41
 			$transparent = $image->isTransparent();
42 42
 			
43
-			if ($palette && $transparent)
44
-				$tci = $image->getTransparentColor();
43
+			if ($palette && $transparent) {
44
+							$tci = $image->getTransparentColor();
45
+			}
45 46
 			
46 47
 			$new = $image->asTrueColor();
47 48
 			imagefilter($new->getHandle(), IMG_FILTER_GRAYSCALE);
@@ -49,8 +50,9 @@  discard block
 block discarded – undo
49 50
 			if ($palette)
50 51
 			{
51 52
 				$new = $new->asPalette();
52
-				if ($transparent)
53
-					$new->setTransparentColor($tci);
53
+				if ($transparent) {
54
+									$new->setTransparentColor($tci);
55
+				}
54 56
 			}
55 57
 			
56 58
 			return $new;
Please login to merge, or discard this patch.
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.
class/wideimage/Operation/CopyChannelsPalette.php 2 patches
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -41,8 +41,9 @@  discard block
 block discarded – undo
41 41
 		function execute($img, $channels)
42 42
 		{
43 43
 			$blank = array('red' => 0, 'green' => 0, 'blue' => 0);
44
-			if (isset($channels['alpha']))
45
-				unset($channels['alpha']);
44
+			if (isset($channels['alpha'])) {
45
+							unset($channels['alpha']);
46
+			}
46 47
 			
47 48
 			$width = $img->getWidth();
48 49
 			$height = $img->getHeight();
@@ -53,15 +54,16 @@  discard block
 block discarded – undo
53 54
 				$otci = $img->getTransparentColor();
54 55
 				$TRGB = $img->getColorRGB($otci);
55 56
 				$tci = $copy->allocateColor($TRGB);
56
-			}
57
-			else
57
+			} else
58 58
 			{
59 59
 				$otci = null;
60 60
 				$tci = null;
61 61
 			}
62 62
 			
63
-			for ($x = 0; $x < $width; $x++)
64
-				for ($y = 0; $y < $height; $y++)
63
+			for ($x = 0; $x < $width; $x++) {
64
+							for ($y = 0;
65
+			}
66
+			$y < $height; $y++)
65 67
 				{
66 68
 					$ci = $img->getColorAt($x, $y);
67 69
 					if ($ci === $otci)
@@ -72,18 +74,21 @@  discard block
 block discarded – undo
72 74
 					$RGB = $img->getColorRGB($ci);
73 75
 					
74 76
 					$newRGB = $blank;
75
-					foreach ($channels as $channel)
76
-						$newRGB[$channel] = $RGB[$channel];
77
+					foreach ($channels as $channel) {
78
+											$newRGB[$channel] = $RGB[$channel];
79
+					}
77 80
 					
78 81
 					$color = $copy->getExactColor($newRGB);
79
-					if ($color == -1)
80
-						$color = $copy->allocateColor($newRGB);
82
+					if ($color == -1) {
83
+											$color = $copy->allocateColor($newRGB);
84
+					}
81 85
 					
82 86
 					$copy->setColorAt($x, $y, $color);
83 87
 				}
84 88
 			
85
-			if ($img->isTransparent())
86
-				$copy->setTransparentColor($tci);
89
+			if ($img->isTransparent()) {
90
+							$copy->setTransparentColor($tci);
91
+			}
87 92
 			
88 93
 			return $copy;
89 94
 		}
Please login to merge, or discard this patch.
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.
class/wideimage/Operation/Flip.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,13 +41,14 @@
 block discarded – undo
41 41
 			
42 42
 			$width = $image->getWidth();
43 43
 			$height = $image->getHeight();
44
-			for ($y = 0; $y < $height; $y++)
45
-				imagecopy(
44
+			for ($y = 0; $y < $height; $y++) {
45
+							imagecopy(
46 46
 					$new->getHandle(), 
47 47
 					$image->getHandle(), 
48 48
 					0, $y, 0, $height - $y - 1, 
49 49
 					$width, 1 
50 50
 				);
51
+			}
51 52
 			return $new;
52 53
 		}
53 54
 	}
Please login to merge, or discard this patch.
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.
class/wideimage/Operation/Merge.php 2 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,11 +48,12 @@  discard block
 block discarded – undo
48 48
 			$result->alphaBlending(true);
49 49
 			$result->saveAlpha(true);
50 50
 			
51
-			if ($pct == 0)
52
-				return $result;
51
+			if ($pct == 0) {
52
+							return $result;
53
+			}
53 54
 			
54
-			if ($pct < 100)
55
-				imagecopymerge(
55
+			if ($pct < 100) {
56
+							imagecopymerge(
56 57
 					$result->getHandle(), 
57 58
 					$overlay->getHandle(), 
58 59
 					$x, $y, 0, 0, 
@@ -60,14 +61,15 @@  discard block
 block discarded – undo
60 61
 					$overlay->getHeight(), 
61 62
 					$pct
62 63
 				);
63
-			else
64
-				imagecopy(
64
+			} else {
65
+							imagecopy(
65 66
 					$result->getHandle(), 
66 67
 					$overlay->getHandle(), 
67 68
 					$x, $y, 0, 0, 
68 69
 					$overlay->getWidth(), 
69 70
 					$overlay->getHeight() 
70 71
 				);
72
+			}
71 73
 			
72 74
 			return $result;
73 75
 		}
Please login to merge, or discard this patch.
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.