| @@ -350,8 +350,7 @@ | ||
| 350 | 350 | $amount = round(abs(-18 + ($amount * 0.08)), 2); | 
| 351 | 351 | |
| 352 | 352 | // Gaussian blur matrix | 
| 353 | - $matrix = array | |
| 354 | - ( | |
| 353 | + $matrix = array( | |
| 355 | 354 | array(-1, -1, -1), | 
| 356 | 355 | array(-1, $amount, -1), | 
| 357 | 356 | array(-1, -1, -1), | 
| @@ -332,7 +332,7 @@ | ||
| 332 | 332 | $this->type = $type; | 
| 333 | 333 | $this->mime = image_type_to_mime_type($type); | 
| 334 | 334 | |
| 335 | - return (string)$this->im; | |
| 335 | + return (string) $this->im; | |
| 336 | 336 | } | 
| 337 | 337 | |
| 338 | 338 | /** | 
| @@ -92,13 +92,16 @@ discard block | ||
| 92 | 92 |      { | 
| 93 | 93 | parent::init(); | 
| 94 | 94 | |
| 95 | - if (empty($this->file)) | |
| 96 | -            throw new ErrorException(Yii::t('image', 'No path to file specified "file"')); | |
| 97 | - if (empty($this->outFile)) | |
| 98 | -            throw new ErrorException('No Out File path to file specified "outFile"'); | |
| 95 | +        if (empty($this->file)) { | |
| 96 | +                    throw new ErrorException(Yii::t('image', 'No path to file specified "file"')); | |
| 97 | + } | |
| 98 | +        if (empty($this->outFile)) { | |
| 99 | +                    throw new ErrorException('No Out File path to file specified "outFile"'); | |
| 100 | + } | |
| 99 | 101 | |
| 100 | - if (empty($this->watermarkFile)) | |
| 101 | - $this->config['watermark'] = false; | |
| 102 | +        if (empty($this->watermarkFile)) { | |
| 103 | + $this->config['watermark'] = false; | |
| 104 | + } | |
| 102 | 105 | } | 
| 103 | 106 | |
| 104 | 107 | /** | 
| @@ -128,8 +131,9 @@ discard block | ||
| 128 | 131 | |
| 129 | 132 | $ImageDriver->resize(null, $config->height); | 
| 130 | 133 | |
| 131 | - if ($config->crop) | |
| 132 | - $ImageDriver->crop($config->width, $config->height); | |
| 134 | +        if ($config->crop) { | |
| 135 | + $ImageDriver->crop($config->width, $config->height); | |
| 136 | + } | |
| 133 | 137 | |
| 134 | 138 |          if ($config->watermark) { | 
| 135 | 139 | $watermark = new Image(['driver' => $this->driver]); | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | 42 | // Set the class name | 
| 43 | - $class = 'image\components\drivers\Image_' . $driver; | |
| 43 | + $class = 'image\components\drivers\Image_'.$driver; | |
| 44 | 44 | |
| 45 | 45 | return new $class($file); | 
| 46 | 46 | } | 
| @@ -313,7 +313,7 @@ discard block | ||
| 313 | 313 | public function rotate($degrees) | 
| 314 | 314 |      { | 
| 315 | 315 | // Make the degrees an integer | 
| 316 | - $degrees = (int)$degrees; | |
| 316 | + $degrees = (int) $degrees; | |
| 317 | 317 | |
| 318 | 318 |          if ($degrees > 180) { | 
| 319 | 319 |              do { | 
| @@ -49,8 +49,9 @@ | ||
| 49 | 49 | */ | 
| 50 | 50 | public function load($file = null, $driver = null) | 
| 51 | 51 |      { | 
| 52 | - if (empty($driver)) | |
| 53 | - $driver = $this->driver; | |
| 52 | +        if (empty($driver)) { | |
| 53 | + $driver = $this->driver; | |
| 54 | + } | |
| 54 | 55 | |
| 55 | 56 |          if (empty($file)) { | 
| 56 | 57 |              throw new ErrorException('File name can not be empty'); |