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

StoryblokLegacy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 12
rs 10
c 2
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A assetDomain() 0 4 1
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
}