This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
19
{
20
/**
21
* @var CacheManager
22
*/
23
private $cache;
24
25
public function __construct(CacheManager $cache)
26
{
27
$this->cache = $cache;
28
}
29
30
/**
31
* Gets the browser path for the image and filter to apply.
32
*
33
* @param string $path
34
* @param string $filter
35
* @param string|null $resolver
36
* @param int $referenceType
37
*
38
* @return string
39
*/
40
public function filter($path, $filter, array $config = [], $resolver = null, $referenceType = UrlGeneratorInterface::ABSOLUTE_URL)
It seems like parse_url($path, PHP_URL_PATH) targeting parse_url() can also be of type false; however, Liip\ImagineBundle\Imagi...nager::getBrowserPath() does only seem to accept string, did you maybe forget to handle an error condition?
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.