@@ -184,40 +184,40 @@ |
||
184 | 184 | return; |
185 | 185 | } |
186 | 186 | switch ($_GET['response_type']) { |
187 | - case 'code': |
|
188 | - $Response->redirect( |
|
189 | - http_build_url( |
|
190 | - $redirect_uri, |
|
191 | - [ |
|
192 | - 'code' => $code, |
|
193 | - 'state' => isset($_GET['state']) ? $_GET['state'] : false |
|
194 | - ] |
|
195 | - ), |
|
196 | - 302 |
|
197 | - ); |
|
198 | - $Page->Content = ''; |
|
199 | - return; |
|
200 | - case 'token': |
|
201 | - $token_data = $OAuth2->get_code($code, $client['id'], $client['secret'], $redirect_uri); |
|
202 | - if ($token_data) { |
|
203 | - unset($token_data['refresh_token']); |
|
204 | - $url = http_build_url( |
|
205 | - $redirect_uri, |
|
206 | - array_merge( |
|
207 | - $token_data, |
|
187 | + case 'code': |
|
188 | + $Response->redirect( |
|
189 | + http_build_url( |
|
190 | + $redirect_uri, |
|
208 | 191 | [ |
192 | + 'code' => $code, |
|
209 | 193 | 'state' => isset($_GET['state']) ? $_GET['state'] : false |
210 | 194 | ] |
211 | - ) |
|
195 | + ), |
|
196 | + 302 |
|
212 | 197 | ); |
213 | - $url = implode('#', explode('?', $url, 2)); |
|
214 | - $Response->redirect($url, 302); |
|
215 | 198 | $Page->Content = ''; |
216 | 199 | return; |
217 | - } else { |
|
218 | - error_redirect('server_error', "Server can't get token data, try later"); |
|
219 | - return; |
|
220 | - } |
|
221 | - default: |
|
222 | - error_redirect('unsupported_response_type', 'Specified response_type is not supported, only "token" or "code" types available'); |
|
200 | + case 'token': |
|
201 | + $token_data = $OAuth2->get_code($code, $client['id'], $client['secret'], $redirect_uri); |
|
202 | + if ($token_data) { |
|
203 | + unset($token_data['refresh_token']); |
|
204 | + $url = http_build_url( |
|
205 | + $redirect_uri, |
|
206 | + array_merge( |
|
207 | + $token_data, |
|
208 | + [ |
|
209 | + 'state' => isset($_GET['state']) ? $_GET['state'] : false |
|
210 | + ] |
|
211 | + ) |
|
212 | + ); |
|
213 | + $url = implode('#', explode('?', $url, 2)); |
|
214 | + $Response->redirect($url, 302); |
|
215 | + $Page->Content = ''; |
|
216 | + return; |
|
217 | + } else { |
|
218 | + error_redirect('server_error', "Server can't get token data, try later"); |
|
219 | + return; |
|
220 | + } |
|
221 | + default: |
|
222 | + error_redirect('unsupported_response_type', 'Specified response_type is not supported, only "token" or "code" types available'); |
|
223 | 223 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | 0, |
93 | 93 | strpos($table_name, '"') |
94 | 94 | ); |
95 | - $update = preg_replace_callback( |
|
95 | + $update = preg_replace_callback( |
|
96 | 96 | '/"([^"]+)"/', |
97 | 97 | function ($matches) { |
98 | 98 | return "\"$matches[1]\" = EXCLUDED.\"$matches[1]\""; |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | /** |
408 | 408 | * Narrow the dependencies to current module only |
409 | 409 | */ |
410 | - $dependencies = array_unique( |
|
410 | + $dependencies = array_unique( |
|
411 | 411 | array_merge( |
412 | 412 | ['System'], |
413 | 413 | $dependencies['System'], |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | * @return string[][] |
482 | 482 | */ |
483 | 483 | protected function add_versions_hash ($includes) { |
484 | - $content = array_reduce( |
|
484 | + $content = array_reduce( |
|
485 | 485 | get_files_list(DIR.'/components', '/^meta\.json$/', 'f', true, true), |
486 | 486 | function ($content, $file) { |
487 | 487 | return $content.file_get_contents($file); |
@@ -327,7 +327,7 @@ |
||
327 | 327 | /** |
328 | 328 | * If content is link to CSS file |
329 | 329 | */ |
330 | - $css = static::css( |
|
330 | + $css = static::css( |
|
331 | 331 | file_get_contents("$dir/$url"), |
332 | 332 | "$dir/$url", |
333 | 333 | $not_embedded_resources |
@@ -47,11 +47,11 @@ |
||
47 | 47 | * Try to load classes from different places. If not found in one place - try in another. |
48 | 48 | */ |
49 | 49 | if ( |
50 | - file_exists($file = DIR."/core/classes/$namespace/$class_name.php") || //Core classes |
|
50 | + file_exists($file = DIR."/core/classes/$namespace/$class_name.php") || //Core classes |
|
51 | 51 | file_exists($file = DIR."/core/thirdparty/$namespace/$class_name.php") || //Third party classes |
52 | - file_exists($file = DIR."/core/traits/$namespace/$class_name.php") || //Core traits |
|
53 | - file_exists($file = ENGINES."/$namespace/$class_name.php") || //Core engines |
|
54 | - file_exists($file = MODULES."/../$namespace/$class_name.php") || //Classes in modules |
|
52 | + file_exists($file = DIR."/core/traits/$namespace/$class_name.php") || //Core traits |
|
53 | + file_exists($file = ENGINES."/$namespace/$class_name.php") || //Core engines |
|
54 | + file_exists($file = MODULES."/../$namespace/$class_name.php") || //Classes in modules |
|
55 | 55 | file_exists($file = PLUGINS."/../$namespace/$class_name.php") //Classes in plugins |
56 | 56 | ) { |
57 | 57 | $cache[$class] = realpath($file); |
@@ -146,7 +146,7 @@ |
||
146 | 146 | Header set Content-Type application/octet-stream |
147 | 147 | </ifModule> |
148 | 148 | |
149 | -HTACCESS; |
|
149 | +htaccess; |
|
150 | 150 | if (is_dir(STORAGE.'/Composer/vendor/bower-asset')) { |
151 | 151 | file_put_contents(STORAGE.'/Composer/vendor/bower-asset/.htaccess', $htaccess_contents); |
152 | 152 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | <FilesMatch "\.css$"> |
89 | 89 | Header set Content-Type text/css |
90 | 90 | </FilesMatch> |
91 | -HTACCESS |
|
91 | +htaccess |
|
92 | 92 | ); |
93 | 93 | } |
94 | 94 | foreach ($files as $file) { |
@@ -793,10 +793,10 @@ |
||
793 | 793 | // Preserve transparency in GIFs |
794 | 794 | $transparent_index = imagecolortransparent($this->image); |
795 | 795 | if ($transparent_index >= 0) { |
796 | - $transparent_color = imagecolorsforindex($this->image, $transparent_index); |
|
797 | - $transparent_index = imagecolorallocate($new, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); |
|
798 | - imagefill($new, 0, 0, $transparent_index); |
|
799 | - imagecolortransparent($new, $transparent_index); |
|
796 | + $transparent_color = imagecolorsforindex($this->image, $transparent_index); |
|
797 | + $transparent_index = imagecolorallocate($new, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); |
|
798 | + imagefill($new, 0, 0, $transparent_index); |
|
799 | + imagecolortransparent($new, $transparent_index); |
|
800 | 800 | } |
801 | 801 | } else { |
802 | 802 | // Preserve transparency in PNGs (benign for JPEGs) |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @throws Exception |
43 | 43 | * |
44 | 44 | */ |
45 | - function __construct($filename = null, $width = null, $height = null, $color = null) { |
|
45 | + function __construct ($filename = null, $width = null, $height = null, $color = null) { |
|
46 | 46 | if ($filename) { |
47 | 47 | $this->load($filename); |
48 | 48 | } elseif ($width) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * Destroy image resource |
56 | 56 | * |
57 | 57 | */ |
58 | - function __destruct() { |
|
58 | + function __destruct () { |
|
59 | 59 | if ($this->image) { |
60 | 60 | imagedestroy($this->image); |
61 | 61 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @return SimpleImage |
75 | 75 | * |
76 | 76 | */ |
77 | - function adaptive_resize($width, $height = null) { |
|
77 | + function adaptive_resize ($width, $height = null) { |
|
78 | 78 | |
79 | 79 | return $this->thumbnail($width, $height); |
80 | 80 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @return SimpleImage |
87 | 87 | * |
88 | 88 | */ |
89 | - function auto_orient() { |
|
89 | + function auto_orient () { |
|
90 | 90 | |
91 | 91 | switch ($this->original_info['exif']['Orientation']) { |
92 | 92 | case 1: |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * @return SimpleImage |
140 | 140 | * |
141 | 141 | */ |
142 | - function best_fit($max_width, $max_height) { |
|
142 | + function best_fit ($max_width, $max_height) { |
|
143 | 143 | |
144 | 144 | // If it already fits, there's nothing to do |
145 | 145 | if ($this->width <= $max_width && $this->height <= $max_height) { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * @return SimpleImage |
178 | 178 | * |
179 | 179 | */ |
180 | - function blur($type = 'selective', $passes = 1) { |
|
180 | + function blur ($type = 'selective', $passes = 1) { |
|
181 | 181 | switch (strtolower($type)) { |
182 | 182 | case 'gaussian': |
183 | 183 | $type = IMG_FILTER_GAUSSIAN_BLUR; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * @return SimpleImage |
201 | 201 | * |
202 | 202 | */ |
203 | - function brightness($level) { |
|
203 | + function brightness ($level) { |
|
204 | 204 | imagefilter($this->image, IMG_FILTER_BRIGHTNESS, $this->keep_within($level, -255, 255)); |
205 | 205 | return $this; |
206 | 206 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * |
215 | 215 | * |
216 | 216 | */ |
217 | - function contrast($level) { |
|
217 | + function contrast ($level) { |
|
218 | 218 | imagefilter($this->image, IMG_FILTER_CONTRAST, $this->keep_within($level, -100, 100)); |
219 | 219 | return $this; |
220 | 220 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | * @return SimpleImage |
230 | 230 | * |
231 | 231 | */ |
232 | - function colorize($color, $opacity) { |
|
232 | + function colorize ($color, $opacity) { |
|
233 | 233 | $rgba = $this->normalize_color($color); |
234 | 234 | $alpha = $this->keep_within(127 - (127 * $opacity), 0, 127); |
235 | 235 | imagefilter($this->image, IMG_FILTER_COLORIZE, $this->keep_within($rgba['r'], 0, 255), $this->keep_within($rgba['g'], 0, 255), $this->keep_within($rgba['b'], 0, 255), $alpha); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * @return SimpleImage |
248 | 248 | * |
249 | 249 | */ |
250 | - function create($width, $height = null, $color = null) { |
|
250 | + function create ($width, $height = null, $color = null) { |
|
251 | 251 | |
252 | 252 | $height = $height ?: $width; |
253 | 253 | $this->width = $width; |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | * @return SimpleImage |
282 | 282 | * |
283 | 283 | */ |
284 | - function crop($x1, $y1, $x2, $y2) { |
|
284 | + function crop ($x1, $y1, $x2, $y2) { |
|
285 | 285 | |
286 | 286 | // Determine crop size |
287 | 287 | if ($x2 < $x1) { |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * @return SimpleImage |
315 | 315 | * |
316 | 316 | */ |
317 | - function desaturate() { |
|
317 | + function desaturate () { |
|
318 | 318 | imagefilter($this->image, IMG_FILTER_GRAYSCALE); |
319 | 319 | return $this; |
320 | 320 | } |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | * @return SimpleImage |
326 | 326 | * |
327 | 327 | */ |
328 | - function edges() { |
|
328 | + function edges () { |
|
329 | 329 | imagefilter($this->image, IMG_FILTER_EDGEDETECT); |
330 | 330 | return $this; |
331 | 331 | } |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | * @return SimpleImage |
337 | 337 | * |
338 | 338 | */ |
339 | - function emboss() { |
|
339 | + function emboss () { |
|
340 | 340 | imagefilter($this->image, IMG_FILTER_EMBOSS); |
341 | 341 | return $this; |
342 | 342 | } |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | * @return SimpleImage |
351 | 351 | * |
352 | 352 | */ |
353 | - function fill($color = '#000000') { |
|
353 | + function fill ($color = '#000000') { |
|
354 | 354 | |
355 | 355 | $rgba = $this->normalize_color($color); |
356 | 356 | $fill_color = imagecolorallocatealpha($this->image, $rgba['r'], $rgba['g'], $rgba['b'], $rgba['a']); |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | * @return SimpleImage |
371 | 371 | * |
372 | 372 | */ |
373 | - function fit_to_height($height) { |
|
373 | + function fit_to_height ($height) { |
|
374 | 374 | |
375 | 375 | $aspect_ratio = $this->height / $this->width; |
376 | 376 | $width = $height / $aspect_ratio; |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | * @return SimpleImage |
388 | 388 | * |
389 | 389 | */ |
390 | - function fit_to_width($width) { |
|
390 | + function fit_to_width ($width) { |
|
391 | 391 | |
392 | 392 | $aspect_ratio = $this->height / $this->width; |
393 | 393 | $height = $width * $aspect_ratio; |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | * @return SimpleImage |
405 | 405 | * |
406 | 406 | */ |
407 | - function flip($direction) { |
|
407 | + function flip ($direction) { |
|
408 | 408 | |
409 | 409 | $new = imagecreatetruecolor($this->width, $this->height); |
410 | 410 | imagealphablending($new, false); |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | * @return int |
436 | 436 | * |
437 | 437 | */ |
438 | - function get_height() { |
|
438 | + function get_height () { |
|
439 | 439 | return $this->height; |
440 | 440 | } |
441 | 441 | |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | * @return string portrait|landscape|square |
446 | 446 | * |
447 | 447 | */ |
448 | - function get_orientation() { |
|
448 | + function get_orientation () { |
|
449 | 449 | |
450 | 450 | if (imagesx($this->image) > imagesy($this->image)) { |
451 | 451 | return 'landscape'; |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | * )</pre> |
473 | 473 | * |
474 | 474 | */ |
475 | - function get_original_info() { |
|
475 | + function get_original_info () { |
|
476 | 476 | return $this->original_info; |
477 | 477 | } |
478 | 478 | |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | * @return int |
483 | 483 | * |
484 | 484 | */ |
485 | - function get_width() { |
|
485 | + function get_width () { |
|
486 | 486 | return $this->width; |
487 | 487 | } |
488 | 488 | |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | * @return SimpleImage |
493 | 493 | * |
494 | 494 | */ |
495 | - function invert() { |
|
495 | + function invert () { |
|
496 | 496 | imagefilter($this->image, IMG_FILTER_NEGATE); |
497 | 497 | return $this; |
498 | 498 | } |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | * @throws Exception |
507 | 507 | * |
508 | 508 | */ |
509 | - function load($filename) { |
|
509 | + function load ($filename) { |
|
510 | 510 | |
511 | 511 | // Require GD library |
512 | 512 | if (!extension_loaded('gd')) { |
@@ -524,12 +524,12 @@ discard block |
||
524 | 524 | * @return SimpleImage |
525 | 525 | * |
526 | 526 | */ |
527 | - function load_base64($base64string) { |
|
527 | + function load_base64 ($base64string) { |
|
528 | 528 | if (!extension_loaded('gd')) { |
529 | 529 | throw new Exception('Required extension GD is not loaded.'); |
530 | 530 | } |
531 | 531 | //remove data URI scheme and spaces from base64 string then decode it |
532 | - $this->imagestring = base64_decode(str_replace(' ', '+',preg_replace('#^data:image/[^;]+;base64,#', '', $base64string))); |
|
532 | + $this->imagestring = base64_decode(str_replace(' ', '+', preg_replace('#^data:image/[^;]+;base64,#', '', $base64string))); |
|
533 | 533 | $this->image = imagecreatefromstring($this->imagestring); |
534 | 534 | return $this->get_meta_data(); |
535 | 535 | } |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | * @return SimpleImage |
541 | 541 | * |
542 | 542 | */ |
543 | - function mean_remove() { |
|
543 | + function mean_remove () { |
|
544 | 544 | imagefilter($this->image, IMG_FILTER_MEAN_REMOVAL); |
545 | 545 | return $this; |
546 | 546 | } |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | * @throws Exception |
554 | 554 | * |
555 | 555 | */ |
556 | - function opacity($opacity) { |
|
556 | + function opacity ($opacity) { |
|
557 | 557 | |
558 | 558 | // Determine opacity |
559 | 559 | $opacity = $this->keep_within($opacity, 0, 1) * 100; |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | * @throws Exception |
585 | 585 | * |
586 | 586 | */ |
587 | - function output($format = null, $quality = null) { |
|
587 | + function output ($format = null, $quality = null) { |
|
588 | 588 | |
589 | 589 | // Determine quality |
590 | 590 | $quality = $quality ?: $this->quality; |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | * @throws Exception |
642 | 642 | * |
643 | 643 | */ |
644 | - function output_base64($format = null, $quality = null) { |
|
644 | + function output_base64 ($format = null, $quality = null) { |
|
645 | 645 | |
646 | 646 | // Determine quality |
647 | 647 | $quality = $quality ?: $this->quality; |
@@ -704,10 +704,10 @@ discard block |
||
704 | 704 | * @return SimpleImage |
705 | 705 | * |
706 | 706 | */ |
707 | - function overlay($overlay, $position = 'center', $opacity = 1, $x_offset = 0, $y_offset = 0) { |
|
707 | + function overlay ($overlay, $position = 'center', $opacity = 1, $x_offset = 0, $y_offset = 0) { |
|
708 | 708 | |
709 | 709 | // Load overlay image |
710 | - if( !($overlay instanceof SimpleImage) ) { |
|
710 | + if (!($overlay instanceof SimpleImage)) { |
|
711 | 711 | $overlay = new SimpleImage($overlay); |
712 | 712 | } |
713 | 713 | |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | * @return SimpleImage |
771 | 771 | * |
772 | 772 | */ |
773 | - function pixelate($block_size = 10) { |
|
773 | + function pixelate ($block_size = 10) { |
|
774 | 774 | imagefilter($this->image, IMG_FILTER_PIXELATE, $block_size, true); |
775 | 775 | return $this; |
776 | 776 | } |
@@ -784,12 +784,12 @@ discard block |
||
784 | 784 | * @return SimpleImage |
785 | 785 | * |
786 | 786 | */ |
787 | - function resize($width, $height) { |
|
787 | + function resize ($width, $height) { |
|
788 | 788 | |
789 | 789 | // Generate new GD image |
790 | 790 | $new = imagecreatetruecolor($width, $height); |
791 | 791 | |
792 | - if( $this->original_info['format'] === 'gif' ) { |
|
792 | + if ($this->original_info['format'] === 'gif') { |
|
793 | 793 | // Preserve transparency in GIFs |
794 | 794 | $transparent_index = imagecolortransparent($this->image); |
795 | 795 | if ($transparent_index >= 0) { |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | * @return SimpleImage |
827 | 827 | * |
828 | 828 | */ |
829 | - function rotate($angle, $bg_color = '#000000') { |
|
829 | + function rotate ($angle, $bg_color = '#000000') { |
|
830 | 830 | |
831 | 831 | // Perform the rotation |
832 | 832 | $rgba = $this->normalize_color($bg_color); |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | * @throws Exception |
857 | 857 | * |
858 | 858 | */ |
859 | - function save($filename = null, $quality = null) { |
|
859 | + function save ($filename = null, $quality = null) { |
|
860 | 860 | |
861 | 861 | // Determine quality, filename, and format |
862 | 862 | $quality = $quality ?: $this->quality; |
@@ -881,7 +881,7 @@ discard block |
||
881 | 881 | } |
882 | 882 | |
883 | 883 | if (!$result) { |
884 | - throw new Exception('Unable to save image: ' . $filename); |
|
884 | + throw new Exception('Unable to save image: '.$filename); |
|
885 | 885 | } |
886 | 886 | |
887 | 887 | return $this; |
@@ -894,7 +894,7 @@ discard block |
||
894 | 894 | * @return SimpleImage |
895 | 895 | * |
896 | 896 | */ |
897 | - function sepia() { |
|
897 | + function sepia () { |
|
898 | 898 | imagefilter($this->image, IMG_FILTER_GRAYSCALE); |
899 | 899 | imagefilter($this->image, IMG_FILTER_COLORIZE, 100, 50, 0); |
900 | 900 | return $this; |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | * @return SimpleImage |
907 | 907 | * |
908 | 908 | */ |
909 | - function sketch() { |
|
909 | + function sketch () { |
|
910 | 910 | imagefilter($this->image, IMG_FILTER_MEAN_REMOVAL); |
911 | 911 | return $this; |
912 | 912 | } |
@@ -919,7 +919,7 @@ discard block |
||
919 | 919 | * @return SimpleImage |
920 | 920 | * |
921 | 921 | */ |
922 | - function smooth($level) { |
|
922 | + function smooth ($level) { |
|
923 | 923 | imagefilter($this->image, IMG_FILTER_SMOOTH, $this->keep_within($level, -10, 10)); |
924 | 924 | return $this; |
925 | 925 | } |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | * @throws Exception |
940 | 940 | * |
941 | 941 | */ |
942 | - function text($text, $font_file, $font_size = 12, $color = '#000000', $position = 'center', $x_offset = 0, $y_offset = 0) { |
|
942 | + function text ($text, $font_file, $font_size = 12, $color = '#000000', $position = 'center', $x_offset = 0, $y_offset = 0) { |
|
943 | 943 | |
944 | 944 | // todo - this method could be improved to support the text angle |
945 | 945 | $angle = 0; |
@@ -1016,7 +1016,7 @@ discard block |
||
1016 | 1016 | * @return SimpleImage |
1017 | 1017 | * |
1018 | 1018 | */ |
1019 | - function thumbnail($width, $height = null) { |
|
1019 | + function thumbnail ($width, $height = null) { |
|
1020 | 1020 | |
1021 | 1021 | // Determine height |
1022 | 1022 | $height = $height ?: $width; |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | * @return string |
1048 | 1048 | * |
1049 | 1049 | */ |
1050 | - protected function file_ext($filename) { |
|
1050 | + protected function file_ext ($filename) { |
|
1051 | 1051 | |
1052 | 1052 | if (!preg_match('/\./', $filename)) { |
1053 | 1053 | return ''; |
@@ -1066,9 +1066,9 @@ discard block |
||
1066 | 1066 | * @throws Exception |
1067 | 1067 | * |
1068 | 1068 | */ |
1069 | - protected function get_meta_data() { |
|
1069 | + protected function get_meta_data () { |
|
1070 | 1070 | //gather meta data |
1071 | - if(empty($this->imagestring)) { |
|
1071 | + if (empty($this->imagestring)) { |
|
1072 | 1072 | $info = getimagesize($this->filename); |
1073 | 1073 | |
1074 | 1074 | switch ($info['mime']) { |
@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | * @link http://www.php.net/manual/en/function.imagecopymerge.php#88456 |
1126 | 1126 | * |
1127 | 1127 | */ |
1128 | - protected function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) { |
|
1128 | + protected function imagecopymerge_alpha ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) { |
|
1129 | 1129 | |
1130 | 1130 | // Get image width and height and percentage |
1131 | 1131 | $pct /= 100; |
@@ -1188,7 +1188,7 @@ discard block |
||
1188 | 1188 | * @return int|float |
1189 | 1189 | * |
1190 | 1190 | */ |
1191 | - protected function keep_within($value, $min, $max) { |
|
1191 | + protected function keep_within ($value, $min, $max) { |
|
1192 | 1192 | |
1193 | 1193 | if ($value < $min) { |
1194 | 1194 | return $min; |
@@ -1211,7 +1211,7 @@ discard block |
||
1211 | 1211 | * @return array|bool |
1212 | 1212 | * |
1213 | 1213 | */ |
1214 | - protected function normalize_color($color) { |
|
1214 | + protected function normalize_color ($color) { |
|
1215 | 1215 | |
1216 | 1216 | if (is_string($color)) { |
1217 | 1217 |