for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://github.com/Vintage-web-production/yii2-tinify
* @copyright Copyright (c) 2017 Vintage Web Production
* @license BSD 3-Clause License
*/
namespace vintage\tinify\algorithms;
* Scale image algorithm.
*
* @author Vladimir Kuprienko <[email protected]>
* @since 1.1
class Scale extends AbstractAlgorithm
{
* @inheritdoc
public function getConfig()
$config = [];
if (!empty($this->width)) {
$config['width'] = $this->width;
} else {
$config['height'] = $this->height;
}
return $config;