Skip to content

Commit f99d601

Browse files
author
Alex Westergaard
committed
Update GA4Exception to fit PHP7.0
1 parent 1fef281 commit f99d601

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/GA4Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class GA4Exception extends \Exception
66
{
7-
public function __construct(string $message = "", ?\Throwable $previous = null)
7+
public function __construct(string $message = "", $previous = null)
88
{
99
parent::__construct($message, 0, $previous);
1010
}

test/AnalyticsTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
use AlexWestergaard\PhpGa4\Analytics;
4-
use AlexWestergaard\PhpGa4\GA4Exception;
54
use AlexWestergaard\PhpGa4\Item;
65
use AlexWestergaard\PhpGa4\UserProperty;
6+
use AlexWestergaard\PhpGa4\GA4Exception;
77

88
class AnalyticsTest extends \PHPUnit\Framework\TestCase
99
{
@@ -60,7 +60,6 @@ public function testExceptionIfTimeOlderThanOffsetLimit()
6060

6161
try {
6262
$this->analytics->setTimestamp(strtotime('-1 week'));
63-
$this->assertTrue(false, "Did not receive correct Exception");
6463
} catch (GA4Exception $e) {
6564
$this->assertTrue(true);
6665
} catch (Exception $e) {

0 commit comments

Comments
 (0)