Skip to content

Commit 4b48e5f

Browse files
committed
nits
1 parent 7354591 commit 4b48e5f

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Diff for: README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Optimizely Rollouts is free feature flags for development teams. Easily roll out
1616

1717
The Optimizely PHP SDK can be installed through [Composer](https://getcomposer.org/). Please use the following command:
1818

19-
```
19+
```sh
2020
php composer.phar require optimizely/optimizely-sdk
2121
```
2222

@@ -28,31 +28,32 @@ To access the Feature Management configuration in the Optimizely dashboard, plea
2828
#### Initialization
2929
Create the Optimizely client, for example:
3030

31-
```
31+
```php
3232
$optimizely = new Optimizely(<<DATAFILE>>);
3333
```
3434

35-
Or you may also use OptimizelyFactory method to create an optimizely client using your SDK key and an optional fallback datafile. Using this method internally creates an HTTPProjectConfigManager. See HTTPProjectConfigManager for further detail.
35+
Or you may also use OptimizelyFactory method to create an optimizely client using your SDK key and an optional fallback datafile. Using this method internally creates an HTTPProjectConfigManager. See [HTTPProjectConfigManager](#http_config_manager) for further detail.
3636

37-
```
37+
```php
3838
$optimizelyClient = OptimizelyFactory::createDefaultInstance("your-sdk-key", <<DATAFILE>>);
3939
```
40-
// access your HTTPProjectConfigManager
41-
```
40+
To access your HTTPProjectConfigManager
41+
42+
```php
4243
$configManager = $optimizelyClient->configManager;
4344
```
4445

45-
Or you can also provide an implementation of the `ProjectConfigManagerInterface` in the constructor:
46+
Or you can also provide an implementation of the [`ProjectConfigManagerInterface`](https://github.com/optimizely/php-sdk/blob/master/src/Optimizely/ProjectConfigManager/ProjectConfigManagerInterface.php) in the constructor:
4647

47-
```
48+
```php
4849
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
4950
$optimizely = new Optimizely(<<DATAFILE>>, null, null, null, false, null, $configManager);
5051
```
5152

5253
#### ProjectConfigManagerInterface
5354
[`ProjectConfigManagerInterface`](https://github.com/optimizely/php-sdk/blob/master/src/Optimizely/ProjectConfigManager/ProjectConfigManagerInterface.php) exposes `getConfig` method for retrieving `ProjectConfig` instance.
5455

55-
#### HTTPProjectConfigManager
56+
#### <a name="http_config_manager"></a> HTTPProjectConfigManager
5657

5758
[`HTTPProjectConfigManager`](https://github.com/optimizely/php-sdk/blob/master/src/Optimizely/ProjectConfigManager/HTTPProjectConfigManager.php)
5859
is an implementation of `ProjectConfigManagerInterface` interface.
@@ -64,7 +65,7 @@ Calling `fetch` will update the internal ProjectConfig instance that will be ret
6465

6566
##### Use HTTPProjectConfigManager
6667

67-
```
68+
```php
6869
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
6970
```
7071

@@ -83,7 +84,7 @@ See the Optimizely Full Stack [developer documentation](https://developers.optim
8384
##### Running all tests
8485
You can run all unit tests with:
8586

86-
```
87+
```sh
8788
./vendor/bin/phpunit
8889
```
8990

0 commit comments

Comments
 (0)