Skip to content

Commit

Permalink
revert id generator
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Feb 4, 2021
1 parent 5e9ce43 commit c2ab9fa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
12 changes: 0 additions & 12 deletions src/Analytics/Analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,4 @@ public function disable(): void
{
$this->enabled = false;
}

/**
* Generates a hash value based on the hosts name and ip adress.
* Can be used to generate a Client ID to identify host machines.
*
* @return string
*/
static public function getUniqueByHostname(): string
{
$host = gethostname();
return md5(gethostbyname($host) . $host);
}
}
2 changes: 0 additions & 2 deletions tests/Analytics/AnalyticsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
namespace Utopia\Tests;

use PHPUnit\Framework\TestCase;
use Utopia\Analytics\Analytics;
use Utopia\Analytics\GoogleAnalytics;

class AnalyticsTest extends TestCase
Expand All @@ -29,7 +28,6 @@ public function setUp(): void

public function testGoogleAnalytics()
{
$this->assertIsString(Analytics::getUniqueByHostname());
$this->assertTrue($this->ga->createPageView("appwrite.io", "/docs/installation"));
$this->assertTrue($this->ga->createEvent("testEvent", "testEvent"));

Expand Down

0 comments on commit c2ab9fa

Please sign in to comment.