Passed
Push — master ( a4e2d9...0bbf1f )
by Richard
03:41 queued 14s
created

StoryblokLegacy::assetDomain()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Riclep\Storyblok\Support\ImageTransformers;
4
5
class StoryblokLegacy extends Storyblok
6
{
7
	/**
8
	 * Creates a legacy Storyblok image service URL
9
	 *
10
	 * @param $options
11
	 * @return string
12
	 */
13
	public function assetDomain($options = null): string
14
	{
15
		$resource = str_replace(['https:', '//' . config('storyblok.asset_domain')], '', $this->image->content()['filename']);
16
		return '//' . config('storyblok.image_service_domain') . $options . $resource;
17
	}
18
}