Skip to content

Commit

Permalink
Adding ignored urls to treblle class
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSteveKing committed Oct 10, 2023
1 parent 9b4ea33 commit 78d1719
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
/vendor
composer.lock
composer.lock
/.idea
10 changes: 9 additions & 1 deletion src/Treblle.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Treblle
private ResponseDataProvider $responseDataProvider;
private ErrorDataProvider $errorDataProvider;
private bool $debug;
private array $ignore;

/**
* Create a new Treblle instance.
Expand All @@ -45,7 +46,8 @@ public function __construct(
RequestDataProvider $requestDataProvider,
ResponseDataProvider $responseDataProvider,
ErrorDataProvider $errorDataProvider,
bool $debug
bool $debug,
array $ignore = []
) {
$this->apiKey = $apiKey;
$this->projectId = $projectId;
Expand All @@ -56,6 +58,7 @@ public function __construct(
$this->responseDataProvider = $responseDataProvider;
$this->errorDataProvider = $errorDataProvider;
$this->debug = $debug;
$this->ignore = $ignore;
}

/**
Expand Down Expand Up @@ -219,4 +222,9 @@ private function killProcessWithId(int $pid): void
{
mb_strtoupper(mb_substr(PHP_OS, 0, 3)) === 'WIN' ? exec("taskkill /F /T /PID {$pid}") : exec("kill -9 {$pid}");
}

public function ignoredUris(): array
{
return $this->ignore;
}
}

0 comments on commit 78d1719

Please sign in to comment.