Skip to content

Commit 9059cb7

Browse files
authored
Merge pull request #160 from php-http/doc-style-cleanup
cleanup documentation pages
2 parents a484ddb + 20b0de7 commit 9059cb7

17 files changed

+94
-90
lines changed

clients/buzz-adapter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Or if you installed the :doc:`discovery </discovery>` layer::
5454

5555
The message factory parameter is mandatory if the discovery layer is not installed.
5656

57-
Be aware
57+
Be Aware
5858
--------
5959

6060
This adapter violates the Liskov substitution principle in a rare edge case. When the adapter is configured to use

clients/curl-client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Or you can use :doc:`../discovery`::
3737

3838
$client = new Client(MessageFactoryDiscovery::find(), StreamFactoryDiscovery::find());
3939

40-
Configuring client
40+
Configuring Client
4141
------------------
4242

4343
You can use `cURL options <http://php.net/curl_setopt>`_ to configure Client::

clients/mock-client.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To install the Mock client, run:
1414
1515
$ composer require php-http/mock-client
1616
17-
Collect requests
17+
Collect Requests
1818
----------------
1919

2020
To make assertions::
@@ -40,7 +40,7 @@ To make assertions::
4040
}
4141
}
4242

43-
Fake responses and exceptions
43+
Fake Responses and Exceptions
4444
-----------------------------
4545

4646
Test how your code behaves when the HTTP client throws exceptions or returns

components/multipart-stream-builder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A multipart stream is a special kind of stream that is used to transfer files ov
3434
3535
In the request above you see a set of HTTP headers and a body with two streams. The body starts and ends with a "boundary" and it is also this boundary that separates the streams. That boundary also needs to be specified in the ``Content-Type`` header.
3636

37-
Building a multipart stream
37+
Building a Multipart Stream
3838
```````````````````````````
3939

4040
To build a multipart stream you may use the ``MultipartStreamBuilder``. It is not coupled to any stream implementation so it needs a ``StreamFactory`` to create the streams.

development/contributing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributing
33

44
If you're here, you would like to contribute to this project and you're really welcome!
55

6-
Bug reports
6+
Bug Reports
77
-----------
88

99
If you find a bug or a documentation issue, please report it or even better: fix it :). If you report it,
@@ -14,15 +14,15 @@ please be as precise as possible. Here is a little list of required information:
1414
- Backtrace which might help identifying the bug
1515

1616

17-
Security issues
17+
Security Issues
1818
---------------
1919

2020
If you discover any security related issues,
2121
please contact us at [email protected] instead of submitting an issue on GitHub.
2222
This allows us to fix the issue and release a security hotfix without publicly disclosing the vulnerability.
2323

2424

25-
Feature requests
25+
Feature Requests
2626
----------------
2727

2828
If you think a feature is missing, please report it or even better: implement it :). If you report it, describe the more
@@ -86,7 +86,7 @@ If your branch conflicts with the master branch, you will need to rebase and re-
8686
$ git pull --rebase upstream master
8787
$ git push -f origin feature-or-bug-fix-description
8888
89-
Coding standard
89+
Coding Standard
9090
---------------
9191

9292
This repository follows the `PSR-2 standard`_ and so, if you want to contribute,

development/documentation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Install Sphinx
88
--------------
99

1010

11-
Install on local machine
11+
Install on Local Machine
1212
~~~~~~~~~~~~~~~~~~~~~~~~
1313

1414
The installation for Sphinx differs between system. See `Sphinx installation page`_ for details. When Sphinx is
@@ -42,7 +42,7 @@ without entering the container shell:
4242
on the host too.
4343

4444

45-
Build documentation
45+
Build Documentation
4646
-------------------
4747

4848
Before we can build the documentation we have to make sure to install all requirements.

httplug/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ When all packages used in an application only specify HTTPlug,
77
the application developers can choose the client that best fits their project
88
and use the same client with all packages.
99

10-
The client interfaces
11-
---------------------
10+
Client Interfaces
11+
-----------------
1212

1313
HTTPlug defines two HTTP client interfaces that we kept as simple as possible:
1414

httplug/library-developers.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
HTTPlug for library developers
1+
HTTPlug for Library Developers
22
==============================
33

44
If you’re developing a library or framework that performs HTTP requests, you
@@ -7,7 +7,7 @@ Instead, you should only make sure that *some* HTTP client is available. It is
77
then up to your users to decide which HTTP client they want to include in their
88
projects. This complies with the `dependency inversion principle`_.
99

10-
Manage dependencies
10+
Manage Dependencies
1111
-------------------
1212

1313
To depend on *some* HTTP client, specify either
@@ -78,14 +78,14 @@ If your library relies on specific plugins, the recommended way is to provide a
7878
your users, so they can create the correct client from a base HttpClient. See
7979
:ref:`plugin-client.libraries` for a concrete example.
8080

81-
User documentation
81+
User Documentation
8282
------------------
8383

8484
To explain to your users that they need to install a concrete HTTP client,
8585
you can point them to :doc:`users`.
8686

8787

88-
Your final ``composer.json``
88+
Your Final ``composer.json``
8989
----------------------------
9090

9191
Putting it all together your final ``composer.json`` is much likely to look similar to this:

httplug/tutorial.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
HTTPlug tutorial
1+
HTTPlug Tutorial
22
================
33

44
This tutorial should give you an idea how to use HTTPlug in your project. HTTPlug has two main use cases:
@@ -17,7 +17,7 @@ We use Composer_ for dependency management. Install it if you don't have it yet.
1717
there is an integration available. Framework integrations will simplify the way
1818
you set up clients, letting you focus on handling the requests.
1919

20-
Setting up the project
20+
Setting up the Project
2121
----------------------
2222

2323
.. code-block:: bash
@@ -32,7 +32,7 @@ The last command will install Guzzle as well as the Guzzle HTTPlug adapter and t
3232
We are now ready to start coding.
3333

3434

35-
Writing some simple code
35+
Writing Some Simple Code
3636
------------------------
3737

3838
Create a file ``demo.php`` in the root folder and write the following code::
@@ -43,7 +43,7 @@ Create a file ``demo.php`` in the root folder and write the following code::
4343
TODO: create client instance with discovery and do some requests
4444

4545

46-
Using an asynchronous client
46+
Using an Asynchronous Client
4747
----------------------------
4848

4949
Asynchronous client accepts a PSR-7 ``RequestInterface`` and returns a ``Http\Promise\Promise``::
@@ -53,10 +53,10 @@ Asynchronous client accepts a PSR-7 ``RequestInterface`` and returns a ``Http\Pr
5353
$httpAsyncClient = HttpAsyncClientDiscovery::find();
5454
$promise = $httpAsyncClient->sendAsyncRequest($request);
5555

56-
Using callback system
57-
^^^^^^^^^^^^^^^^^^^^^
56+
Using the Callback System
57+
^^^^^^^^^^^^^^^^^^^^^^^^^
5858

59-
This promise allows you to add callbacks for when the response is available or an errors happens by using the then method::
59+
The promise allows you to add callbacks for when the response is available or an errors happens by using the then method::
6060

6161
$promise->then(function (ResponseInterface $response) {
6262
// onFulfilled callback
@@ -161,7 +161,7 @@ Here is a full example of a classic usage when using the ``sendAsyncRequest`` me
161161
// Do your stuff with the response
162162
...
163163

164-
Handling errors
164+
Handling Errors
165165
---------------
166166

167167
TODO: explain how to handle exceptions, distinction between network exception and HttpException.

httplug/usage.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ HTTPlug is relevant for three groups of users:
66
.. toctree::
77
:maxdepth: 1
88

9-
Library users <users>
10-
Application developers <tutorial>
11-
Library developers <library-developers>
9+
Library Users <users>
10+
Application Developers <tutorial>
11+
Library Developers <library-developers>
1212

0 commit comments

Comments
 (0)