| @@ -39,7 +39,7 @@ discard block | ||
| 39 | 39 | * | 
| 40 | 40 | * @var array | 
| 41 | 41 | */ | 
| 42 | - private $types = [ 'memory' ]; | |
| 42 | + private $types = ['memory']; | |
| 43 | 43 | |
| 44 | 44 | /** | 
| 45 | 45 | * Time-to-live in seconds. | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 |      { | 
| 65 | 65 | return [ | 
| 66 | 66 | 'active' => true, | 
| 67 | - 'types' => [ 'memory' ], | |
| 67 | + 'types' => ['memory'], | |
| 68 | 68 | 'default_ttl' => self::WEEK_IN_SECONDS, | 
| 69 | 69 | 'prefix' => self::DEFAULT_NAMESPACE | 
| 70 | 70 | ]; | 
| @@ -136,10 +136,10 @@ discard block | ||
| 136 | 136 | 'ttl' => CacheConfig::DAY_IN_SECONDS, | 
| 137 | 137 | |
| 138 | 138 | 'included_path' => '*', | 
| 139 | - 'excluded_path' => [ '^/admin\b' ], | |
| 139 | + 'excluded_path' => ['^/admin\b'], | |
| 140 | 140 | |
| 141 | - 'methods' => [ 'GET' ], | |
| 142 | - 'status_codes' => [ 200 ], | |
| 141 | + 'methods' => ['GET'], | |
| 142 | + 'status_codes' => [200], | |
| 143 | 143 | |
| 144 | 144 | 'included_query' => null, | 
| 145 | 145 | 'excluded_query' => null, | 
| @@ -247,7 +247,7 @@ discard block | ||
| 247 | 247 | $uri = $uri->withQuery($queryStr); | 
| 248 | 248 | } | 
| 249 | 249 | |
| 250 | - $cacheKey = 'request/' . $request->getMethod() . '/' . md5((string)$uri); | |
| 250 | + $cacheKey = 'request/'.$request->getMethod().'/'.md5((string)$uri); | |
| 251 | 251 | return $cacheKey; | 
| 252 | 252 | } | 
| 253 | 253 | |
| @@ -290,7 +290,7 @@ discard block | ||
| 290 | 290 | } | 
| 291 | 291 | |
| 292 | 292 |          foreach ((array)$this->includedPath as $included) { | 
| 293 | -            if (preg_match('@' . $included . '@', $path)) { | |
| 293 | +            if (preg_match('@'.$included.'@', $path)) { | |
| 294 | 294 | return true; | 
| 295 | 295 | } | 
| 296 | 296 | } | 
| @@ -315,7 +315,7 @@ discard block | ||
| 315 | 315 | } | 
| 316 | 316 | |
| 317 | 317 |          foreach ((array)$this->excludedPath as $excluded) { | 
| 318 | -            if (preg_match('@' . $excluded . '@', $path)) { | |
| 318 | +            if (preg_match('@'.$excluded.'@', $path)) { | |
| 319 | 319 | return true; | 
| 320 | 320 | } | 
| 321 | 321 | } | 
| @@ -150,7 +150,7 @@ | ||
| 150 | 150 | $driverOptions['servers'] = $servers; | 
| 151 | 151 |                  } else { | 
| 152 | 152 | // Default Memcache options: locahost:11211 | 
| 153 | - $driverOptions['servers'][] = [ '127.0.0.1', 11211 ]; | |
| 153 | + $driverOptions['servers'][] = ['127.0.0.1', 11211]; | |
| 154 | 154 | } | 
| 155 | 155 | |
| 156 | 156 | return new $drivers['Memcache']($driverOptions); |