From 79fd7d2bf5fecac5462365c131a40919a11cdaaa Mon Sep 17 00:00:00 2001
From: Thomas Steur <thomas.steur@gmail.com>
Date: Sun, 6 Oct 2013 22:42:01 +0000
Subject: [PATCH] fix autoloader fails to load interface when generating API
 doc

---
 core/Tracker/Visit.php               | 33 +++-------------------------
 core/Tracker/VisitInterface.php      | 30 +++++++++++++++++++++++++
 core/Tracker/VisitorNotFoundInDb.php | 21 ++++++++++++++++++
 3 files changed, 54 insertions(+), 30 deletions(-)
 create mode 100644 core/Tracker/VisitInterface.php
 create mode 100644 core/Tracker/VisitorNotFoundInDb.php

diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index 7d3d116ba6..dc95df774f 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 0000000000..87b3afc899
--- /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 0000000000..1d5bf65730
--- /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
+{
+}
+
-- 
GitLab