Skip to content

Commit ae90fe1

Browse files
committed
Rename apiKey to sdkKey
1 parent c1fca88 commit ae90fe1

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/LaunchDarkly/ApcLDDFeatureRequester.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
class ApcLDDFeatureRequester extends LDDFeatureRequester {
1414
protected $_expiration = 30;
1515

16-
function __construct($baseUri, $apiKey, $options) {
17-
parent::__construct($baseUri, $apiKey, $options);
16+
function __construct($baseUri, $sdkKey, $options) {
17+
parent::__construct($baseUri, $sdkKey, $options);
1818

1919
if (isset($options['apc_expiration'])) {
2020
$this->_expiration = (int)$options['apc_expiration'];

src/LaunchDarkly/CurlEventPublisher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class CurlEventPublisher implements EventPublisher
99
private $_ssl;
1010
private $_curl = '/usr/bin/env curl';
1111

12-
function __construct($apiKey, array $options = array()) {
13-
$this->_sdkKey = $apiKey;
12+
function __construct($sdkKey, array $options = array()) {
13+
$this->_sdkKey = $sdkKey;
1414

1515
$eventsUri = LDClient::DEFAULT_EVENTS_URI;
1616
if (isset($options['events_uri'])) {

src/LaunchDarkly/EventProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class EventProcessor {
1111
private $_capacity;
1212
private $_timeout;
1313

14-
public function __construct($apiKey, $options = array()) {
15-
$this->_eventPublisher = $this->getEventPublisher($apiKey, $options);
14+
public function __construct($sdkKey, $options = array()) {
15+
$this->_eventPublisher = $this->getEventPublisher($sdkKey, $options);
1616

1717
$this->_capacity = $options['capacity'];
1818
$this->_timeout = $options['timeout'];

src/LaunchDarkly/LDDFeatureRequester.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77

88
class LDDFeatureRequester implements FeatureRequester {
99
protected $_baseUri;
10-
protected $_apiKey;
10+
protected $_sdkKey;
1111
protected $_options;
1212
protected $_features_key;
1313
/** @var LoggerInterface */
1414
private $_logger;
1515
/** @var ClientInterface */
1616
private $_connection;
1717

18-
function __construct($baseUri, $apiKey, $options) {
18+
function __construct($baseUri, $sdkKey, $options) {
1919
$this->_baseUri = $baseUri;
20-
$this->_apiKey = $apiKey;
20+
$this->_sdkKey = $sdkKey;
2121
if (!isset($options['redis_host'])) {
2222
$options['redis_host'] = 'localhost';
2323
}

src/LaunchDarkly/RelayEventPublisher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class RelayEventPublisher implements EventPublisher
1515
/** @var mixed[] */
1616
private $_requestOptions;
1717

18-
function __construct($apiKey, array $options = array()) {
19-
$this->_sdkKey = $apiKey;
18+
function __construct($sdkKey, array $options = array()) {
19+
$this->_sdkKey = $sdkKey;
2020
$this->_logger = $options['logger'];
2121
if (isset($options['events_uri'])) {
2222
$this->_eventsUri = $options['events_uri'];

tests/LDDFeatureRequesterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected function setUp()
2929

3030
public function testGet()
3131
{
32-
$sut = new LDDFeatureRequester('example.com', 'MyApiKey', [
32+
$sut = new LDDFeatureRequester('example.com', 'MySdkKey', [
3333
'logger' => $this->logger,
3434
'predis_client' => $this->predisClient,
3535
]);

0 commit comments

Comments
 (0)