Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
67 | 2 | protected function transformUrl($url, $transformation) |
|
68 | { |
||
69 | 2 | $cachedUrl = $this->pool->getItem(md5($url)); |
|
70 | |||
71 | 2 | if ($cachedUrl->isMiss()) { |
|
72 | 1 | $url = $this->provider->$transformation($url); |
|
73 | |||
74 | 1 | $cachedUrl->set($url); |
|
75 | 1 | } else { |
|
76 | 1 | $url = $cachedUrl->get(); |
|
77 | } |
||
78 | |||
79 | 2 | return $url; |
|
80 | } |
||
81 | } |
||
82 |