diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 7d3d116ba6707d7e621ac9c4852a155d75a4fe83..dc95df774f592753ea77ccee85658633f7e8043d 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -10,23 +10,6 @@ */ namespace Piwik\Tracker; -/** - * @package Piwik - * @subpackage Tracker - */ -interface VisitInterface -{ - /** - * @param Request $request - * @return void - */ - public function setRequest(Request $request); - - /** - * @return void - */ - public function handle(); -} use Piwik\Config; use Piwik\Common; @@ -202,7 +185,7 @@ class Visit implements Tracker\VisitInterface $this->visitorInfo['time_spent_ref_action'] ); } - } catch (VisitorNotFoundInDatabase $e) { + } catch (VisitorNotFoundInDb $e) { // There is an edge case when: // - two manual goal conversions happen in the same second @@ -268,7 +251,7 @@ class Visit implements Tracker\VisitInterface * @param $idActionName * @param $actionType * @param $visitIsConverted - * @throws VisitorNotFoundInDatabase + * @throws VisitorNotFoundInDb */ protected function handleKnownVisit($idActionUrl, $idActionName, $actionType, $visitIsConverted) { @@ -361,7 +344,7 @@ class Visit implements Tracker\VisitInterface Common::printDebug("Visitor with this idvisit wasn't found in the DB."); Common::printDebug("$sqlQuery --- "); Common::printDebug($sqlBind); - throw new VisitorNotFoundInDatabase( + throw new VisitorNotFoundInDb( "The visitor with idvisitor=" . bin2hex($this->visitorInfo['idvisitor']) . " and idvisit=" . $this->visitorInfo['idvisit'] . " wasn't found in the DB, we fallback to a new visitor"); } @@ -988,13 +971,3 @@ class Visit implements Tracker\VisitInterface return false; } } - - -/** - * @package Piwik - * @subpackage Tracker - */ -class VisitorNotFoundInDatabase extends Exception -{ -} - diff --git a/core/Tracker/VisitInterface.php b/core/Tracker/VisitInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..87b3afc899fdc74590bc2f620186c94365859360 --- /dev/null +++ b/core/Tracker/VisitInterface.php @@ -0,0 +1,30 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + * @category Piwik + * @package Piwik + */ + +namespace Piwik\Tracker; + +/** + * @package Piwik + * @subpackage Tracker + */ +interface VisitInterface +{ + /** + * @param Request $request + * @return void + */ + public function setRequest(Request $request); + + /** + * @return void + */ + public function handle(); +} diff --git a/core/Tracker/VisitorNotFoundInDb.php b/core/Tracker/VisitorNotFoundInDb.php new file mode 100644 index 0000000000000000000000000000000000000000..1d5bf65730a5344ef84a4c5f56c413a0cabbf5f8 --- /dev/null +++ b/core/Tracker/VisitorNotFoundInDb.php @@ -0,0 +1,21 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + * @category Piwik + * @package Piwik + */ + +namespace Piwik\Tracker; + +/** + * @package Piwik + * @subpackage Tracker + */ +class VisitorNotFoundInDb extends \Exception +{ +} +