Skip to content
Browse files

fixed formatting

  • Loading branch information...
1 parent db4d136 commit ce08493085d4f756d0634ee0d81bc97222545491 @pulse00 pulse00 committed May 11, 2012
Showing with 10 additions and 17 deletions.
  1. +10 −17 Analytics.php
View
27 Analytics.php
@@ -9,11 +9,11 @@
class Analytics
{
- const EVENT_QUEUE_KEY = 'google_analytics/event/queue';
+ const EVENT_QUEUE_KEY = 'google_analytics/event/queue';
const CUSTOM_PAGE_VIEW_KEY = 'google_analytics/page_view';
- const PAGE_VIEW_QUEUE_KEY = 'google_analytics/page_view/queue';
- const TRANSACTION_KEY = 'google_analytics/transaction';
- const ITEMS_KEY = 'google_analytics/items';
+ const PAGE_VIEW_QUEUE_KEY = 'google_analytics/page_view/queue';
+ const TRANSACTION_KEY = 'google_analytics/transaction';
+ const ITEMS_KEY = 'google_analytics/items';
private $container;
private $customVariables = array();
@@ -134,8 +134,7 @@ public function getTrackPageLoadTime($trackerKey)
*/
public function getCustomPageView()
{
- $customPageView = $this->container->get('session')
- ->get(self::CUSTOM_PAGE_VIEW_KEY);
+ $customPageView = $this->container->get('session')->get(self::CUSTOM_PAGE_VIEW_KEY);
$this->container->get('session')->remove(self::CUSTOM_PAGE_VIEW_KEY);
return $customPageView;
}
@@ -153,8 +152,7 @@ public function hasCustomPageView()
*/
public function setCustomPageView($customPageView)
{
- $this->container->get('session')
- ->set(self::CUSTOM_PAGE_VIEW_KEY, $customPageView);
+ $this->container->get('session')->set(self::CUSTOM_PAGE_VIEW_KEY, $customPageView);
}
/**
@@ -311,7 +309,7 @@ public function getRequestUri()
$query = http_build_query($params);
if (isset($query) && '' != trim($query)) {
- $requestUri .= '?' . $query;
+ $requestUri .= '?'. $query;
}
return $requestUri;
}
@@ -339,17 +337,13 @@ public function getTrackers(array $trackers = array())
*/
public function isTransactionValid()
{
- if (!$this->hasTransaction()
- || (null
- === $this->getTransactionFromSession()
- ->getOrderNumber())) {
+ if (!$this->hasTransaction() || (null === $this->getTransactionFromSession()->getOrderNumber())) {
return false;
}
if ($this->hasItems()) {
$items = $this->getItemsFromSession();
foreach ($items as $item) {
- if (!$item->getOrderNumber() || !$item->getSku()
- || !$item->getPrice() || !$item->getQuantity()) {
+ if (!$item->getOrderNumber() || !$item->getSku() || !$item->getPrice() || !$item->getQuantity()) {
return false;
}
}
@@ -380,8 +374,7 @@ public function hasTransaction()
*/
public function setTransaction(Transaction $transaction)
{
- $this->container->get('session')
- ->set(self::TRANSACTION_KEY, $transaction);
+ $this->container->get('session')->set(self::TRANSACTION_KEY, $transaction);
}
/**

0 comments on commit ce08493

Please sign in to comment.
Something went wrong with that request. Please try again.