shortened if/else syntax

This commit is contained in:
Kevin Bond 2012-03-28 11:52:41 -04:00
parent 2b8c2bc9c3
commit 8f11f2dd30

View File

@ -33,12 +33,7 @@ abstract class HttpCache extends BaseHttpCache
*/ */
public function __construct(HttpKernelInterface $kernel, $cacheDir = null) public function __construct(HttpKernelInterface $kernel, $cacheDir = null)
{ {
if ($cacheDir) { $store = new Store($cacheDir ?: $kernel->getCacheDir().'/http_cache');
$store = new Store($cacheDir);
} else {
$store = new Store($kernel->getCacheDir().'/http_cache');
}
$esi = new Esi(); $esi = new Esi();
parent::__construct($kernel, $store, $esi, array_merge(array('debug' => $kernel->isDebug()), $this->getOptions())); parent::__construct($kernel, $store, $esi, array_merge(array('debug' => $kernel->isDebug()), $this->getOptions()));