Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pulse00 committed May 11, 2012
1 parent db4d136 commit ce08493
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions Analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand All @@ -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);
}

/**
Expand Down Expand Up @@ -311,7 +309,7 @@ public function getRequestUri()
$query = http_build_query($params);

if (isset($query) && '' != trim($query)) {
$requestUri .= '?' . $query;
$requestUri .= '?'. $query;
}
return $requestUri;
}
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit ce08493

Please sign in to comment.