Permalink
Browse files

Fixed code conventions

  • Loading branch information...
jnonon committed Oct 8, 2012
1 parent da79dd1 commit 52e337d3ab2e12e9d05a31b406f48ddcde8712b4
Showing with 5 additions and 4 deletions.
  1. +5 −4 Helper/Varnish.php
View
@@ -76,7 +76,7 @@ public function invalidatePath($path)
{
$this->setRequestOptions(array(CURLOPT_CUSTOMREQUEST => 'PURGE'));
- $request['path'] = $path;
+ $request = array('path' => $path);
return $this->sendRequestToAllVarnishes($request);
}
@@ -89,6 +89,7 @@ public function invalidatePath($path)
*/
public function refreshPath($path)
{
+ $options = array();
$headers = array("Cache-Control: no-cache, no-store, max-age=0, must-revalidate");
@@ -97,15 +98,15 @@ public function refreshPath($path)
$this->setRequestOptions($options);
- $request['path'] = $path;
+ $request = array('path' => $path);
return $this->sendRequestToAllVarnishes($request);
}
/**
* Send a request to all configured varnishes
*
- * @param string $request request string
+ * @param array $request request string
* @throws \RuntimeException if connection to one of the varnish servers fails. TODO: should we be more tolerant?
*/
protected function sendRequestToAllVarnishes($request)
@@ -137,7 +138,7 @@ public function setRequestOptions($options)
foreach($options as $option => $value) {
- curl_setopt($this->curlHandler, $option, $value);
+ curl_setopt($this->curlHandler, (int)$option, $value);
}
}

0 comments on commit 52e337d

Please sign in to comment.