Skip to content

Commit 58131bf

Browse files
authored
Merge pull request #657 from dunglas/proselint
Apply some fixes suggested by proselint
2 parents e2c81a9 + c6865ec commit 58131bf

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

admin/handling-relations-to-collections.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ class Book
7171

7272
The admin handles this `to-many` relation automatically!
7373

74-
But we can go further:
75-
7674
## Customizing a Property
7775

7876
Let's customize the components used for the `authors` property, to display them by their 'name' instead 'id' (the default behavior).

client-generator/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The API Platform Client Generator
22

3-
Client Generator is the fastest way to scaffold fully-featured webapps and native mobile apps from APIs supporting the [Hydra](http://www.hydra-cg.com/) format.
3+
Client Generator is the fastest way to scaffold fully featured webapps and native mobile apps from APIs supporting the [Hydra](http://www.hydra-cg.com/) format.
44

55
![Screencast](images/client-generator-demo.gif)
66

core/file-upload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,5 +252,5 @@ uploaded cover, you can have a nice illustrated book record!
252252
}
253253
```
254254

255-
Voila! You can now send files to your API, and link them to any other resources
255+
Voilà! You can now send files to your API, and link them to any other resources
256256
in your app.

core/serialization.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ all set!
5858

5959
It is simple to specify what groups to use in the API system:
6060

61-
1. Add the `normalizationContext` and `denormalizationContext` annotation properties to the `@ApiResource` annotation, and specify which groups to use. Here you see that we add `read` and `write`, respectively. You can use any group names you wish.
61+
1. Add the `normalizationContext` and `denormalizationContext` annotation properties to the `@ApiResource` annotation, and specify which groups to use. Here you see that we add `read` and `write`, respectively. You can use any group names you wish.
6262
2. Apply the `@Groups` annotation to properties in the object.
6363

6464
```php
@@ -129,7 +129,7 @@ App\Entity\Book:
129129
```
130130

131131
In the previous example, the `name` property will be visible when reading (`GET`) the object, and it will also be available
132-
to write (`PUT/POST`). The `author` property will be write-only; it will not be visible when serialized responses are
132+
to write (`PUT/POST`). The `author` property will be write-only; it will not be visible when serialized responses are
133133
returned by the API.
134134

135135
Internally, API Platform passes the value of the `normalization_context` to the Symfony Serializer during the normalization
@@ -415,7 +415,7 @@ final class BookContextBuilder implements SerializerContextBuilderInterface
415415
```
416416

417417
If the user has the `ROLE_ADMIN` permission and the subject is an instance of Book, `admin_input` group will be dynamically added to the
418-
denormalization context. The `$normalization` variable lets you check whether the context is for normalization (if `TRUE`) or denormalization
418+
denormalization context. The `$normalization` variable lets you check whether the context is for normalization (if `TRUE`) or denormalization
419419
(`FALSE`).
420420

421421
## Changing the Serialization Context on a Per-item Basis
@@ -500,8 +500,8 @@ class BookAttributeNormalizer implements ContextAwareNormalizerInterface, Normal
500500
This will add the serialization group `can_retrieve_book` only if the currently logged-in user has access to the given book
501501
instance.
502502

503-
Note: In this example, we use the `TokenStorageInterface` to verify access to the book instance. However, Symfony
504-
provides many useful other services that might be better suited to your use case. For example, the [`AuthorizationChecker`](https://symfony.com/doc/current/components/security/authorization.html#authorization-checker).
503+
Note: In this example, we use the `TokenStorageInterface` to verify access to the book instance. However, Symfony
504+
provides many useful other services that might be better suited to your use case. For example, the [`AuthorizationChecker`](https://symfony.com/doc/current/components/security/authorization.html#authorization-checker).
505505

506506
## Name Conversion
507507

@@ -524,7 +524,7 @@ api_platform:
524524

525525
## Decorating a Serializer and Adding Extra Data
526526

527-
In the following example, we will see how we add extra informations to the serialized output. Here is how we add the
527+
In the following example, we will see how we add extra informations to the serialized output. Here is how we add the
528528
date on each request in `GET`:
529529

530530
```yaml
@@ -599,7 +599,7 @@ API Platform is able to guess the entity identifier using [Doctrine metadata](ht
599599
It also supports composite identifiers.
600600

601601
If you are not using the Doctrine ORM Provider, you must explicitly mark the identifier using the `identifier` attribute of
602-
the `ApiPlatform\Core\Annotation\ApiProperty` annotation. For example:
602+
the `ApiPlatform\Core\Annotation\ApiProperty` annotation. For example:
603603

604604

605605
```php
@@ -644,7 +644,7 @@ App\Entity\Book:
644644
```
645645

646646
In some cases, you will want to set the identifier of a resource from the client (e.g. a client-side generated UUID, or a slug).
647-
In such cases, you must make the identifier property a writable class property. Specifically, to use client-generated IDs, you
647+
In such cases, you must make the identifier property a writable class property. Specifically, to use client-generated IDs, you
648648
must do the following:
649649

650650
1. create a setter for the identifier of the entity (e.g. `public function setId(string $id)`) or make it a `public` property ,

deployment/kubernetes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Before running your application for the first time, be sure to create the databa
8383

8484
## Tiller RBAC Issue
8585

86-
We noticed that some tiller RBAC trouble occured, you generally can resolve it running:
86+
We noticed that some tiller RBAC trouble occurred, you generally can resolve it running:
8787

8888
kubectl create serviceaccount --namespace kube-system tiller
8989
serviceaccount "tiller" created

distribution/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
> - Fabien Potencier (creator of Symfony), SymfonyCon 2017
77
88
[API Platform](https://api-platform.com) is a powerful but easy to use **full stack** framework dedicated to API-driven projects.
9-
It contains a **PHP** library to create fully-featured APIs supporting industry-leading standards (JSON-LD, GraphQL, OpenAPI...),
9+
It contains a **PHP** library to create fully featured APIs supporting industry-leading standards (JSON-LD, GraphQL, OpenAPI...),
1010
provides ambitious **JavaScript** tooling to consume those APIs in a snap (admin, PWA and mobile apps generators, hypermedia
1111
client...) and is shipped with a nice **Docker** and **Kubernetes** integration to develop and deploy instantly in the cloud.
1212

@@ -510,7 +510,7 @@ Now try to add another book by issuing a `POST` request to `/books` with the fol
510510
}
511511
```
512512

513-
Oops, we missed to add the title. But submit the request anyway. You should get a 500 error with the following message:
513+
Oops, we missed to add the title. Submit the request anyway, you should get a 500 error with the following message:
514514

515515
An exception occurred while executing 'INSERT INTO book [...] VALUES [...]' with params [...]:
516516
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null

0 commit comments

Comments
 (0)