Merge branch '5.2' into 5.3
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / image / adapter / GDImageAdapter.class.php
index ec600d89c50beb8f7f288cc69e335bef94b051b1..5ffad1643824055f0135486255984268f62ccf5b 100644 (file)
@@ -133,12 +133,12 @@ class GDImageAdapter implements IImageAdapter {
        /**
         * @inheritDoc
         */
-       public function createThumbnail($maxWidth, $maxHeight, $obtainDimensions = true) {
+       public function createThumbnail($maxWidth, $maxHeight, $preserveAspectRatio = true) {
                $x = $y = 0;
                $sourceWidth = $this->width;
                $sourceHeight = $this->height;
                
-               if ($obtainDimensions) {
+               if ($preserveAspectRatio) {
                        if ($maxWidth / $this->width < $maxHeight / $this->height) {
                                $width = $maxWidth;
                                $height = round($this->height * ($width / $this->width));
@@ -429,7 +429,7 @@ class GDImageAdapter implements IImageAdapter {
         * @param       integer         $pct            opacity percent
         * @return      boolean
         */
-       private function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) {
+       private function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) { // phpcs:ignore
                if (!isset($pct)) {
                        return false;
                }