Lint
continuous-integration/drone/push Build encountered an error
Details
continuous-integration/drone/push Build encountered an error
Details
This commit is contained in:
parent
e6d9d0d941
commit
74d2dccadc
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Aweos\Resizer\Classes;
|
||||
|
||||
use Aweos\Resizer\Compressors\Compressor;
|
||||
use Aweos\Resizer\Compressors\CompressorNotFoundException;
|
||||
use Aweos\Resizer\Compressors\Factory as CompressorFactory;
|
||||
use Aweos\Resizer\Exceptions\ResizerException;
|
||||
|
@ -14,19 +15,12 @@ use Storage;
|
|||
|
||||
class TagGenerator {
|
||||
|
||||
public array $breakpoints;
|
||||
private $compressor;
|
||||
public $path;
|
||||
private $defaultOptions = [
|
||||
private Compressor $compressor;
|
||||
public MediaPath $path;
|
||||
private array $defaultOptions = [
|
||||
'lazy' => false,
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->breakpoints = Setting::get('breakpoints');
|
||||
ksort($this->breakpoints);
|
||||
}
|
||||
|
||||
public function generate(MediaPath $path, ?string $ratio = 'original', $sizes = null, array $options = []): string
|
||||
{
|
||||
$options = array_merge($this->defaultOptions, $options);
|
||||
|
@ -110,7 +104,8 @@ class TagGenerator {
|
|||
: null;
|
||||
}
|
||||
|
||||
private function htmlAttributes($attr) {
|
||||
private function htmlAttributes($attr): string
|
||||
{
|
||||
return $attr->map(function($value, $key) {
|
||||
return "{$key}=\"{$value}\"";
|
||||
})->implode(' ');
|
||||
|
|
Loading…
Reference in New Issue