Skip to content

Commit a472550

Browse files
authored
Utilize SensitiveParameter attribute for private token (#34)
Authored-by: Markus Staab <[email protected]>
1 parent eebb0cf commit a472550

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/RecommApi/Client.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Recombee\RecommApi\Exceptions\ResponseException;
1111
use Recombee\RecommApi\Exceptions\ApiTimeoutException;
1212
use Recombee\RecommApi\Util\Util;
13+
use SensitiveParameter;
1314

1415
/**
1516
* Client for easy usage of Recombee recommendation API
@@ -36,7 +37,12 @@ class Client{
3637
* @param string $token Secret token
3738
* @param array $options Other custom options
3839
*/
39-
public function __construct($account, $token, $options = array()) {
40+
public function __construct(
41+
$account,
42+
#[SensitiveParameter]
43+
$token,
44+
$options = array()
45+
) {
4046
$this->account = $account;
4147
$this->token = $token;
4248

0 commit comments

Comments
 (0)