Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #2000

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Assets/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ public function getVideo(): array
*/
public function dataurl(): string
{
if ($this->data['type'] == 'image' && !Image::isSVG($this) ) {
if ($this->data['type'] == 'image' && !Image::isSVG($this)) {
return Image::getDataUrl($this, $this->config->get('assets.images.quality') ?? 75);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Assets/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
*
* @throws RuntimeException
*/
static public function convert(Asset $asset, string $format, int $quality): string
public static function convert(Asset $asset, string $format, int $quality): string
{
try {
if ($asset['type'] !== 'image') {
Expand Down Expand Up @@ -216,7 +216,7 @@
return false;
}

if (false === $xml = simplexml_load_string($asset['content_source'])) {

Check notice on line 219 in src/Assets/Image.php

View check run for this annotation

Scrutinizer / Inspection

src/Assets/Image.php#L219

It seems like ``$asset['content_source']`` can also be of type ``null``; however, parameter ``$data`` of ``simplexml_load_string()`` does only seem to accept ``string``, maybe add an additional type check?
return false;
}

Expand Down
Loading