Skip to content

Commit

Permalink
Merge pull request #327 from lokeland/arryable-normalizer-docs-typo-fix
Browse files Browse the repository at this point in the history
[Docs] Fixes Arrayable typos in docs
  • Loading branch information
rubenvanassche authored Jan 20, 2023
2 parents 4ae14a2 + 436de0f commit 18abb91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/advanced-usage/normalizers.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A `Normalizer` will take a payload like a model and will transform it into an ar
By default, there are five normalizers for each data object:

- **ModelNormalizer** will cast eloquent models
- **ArraybleNormalizer** will cast `Arrayable`'s
- **ArrayableNormalizer** will cast `Arrayable`'s
- **ObjectNormalizer** will cast `stdObject`'s
- **ArrayNormalizer** will cast arrays
- **JsonNormalizer** will cast json strings
Expand All @@ -34,7 +34,7 @@ class SongData extends Data
{
return [
ModelNormalizer::class,
ArraybleNormalizer::class,
ArrayableNormalizer::class,
ObjectNormalizer::class,
ArrayNormalizer::class,
JsonNormalizer::class,
Expand All @@ -46,7 +46,7 @@ class SongData extends Data
A normalizer implements the `Normalizer` interface and should return an array representation of the payload, or null if it cannot normalize the payload:

```php
class ArraybleNormalizer implements Normalizer
class ArrayableNormalizer implements Normalizer
{
public function normalize(mixed $value): ?array
{
Expand Down
2 changes: 1 addition & 1 deletion docs/as-a-resource/transformers.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ArtistData extends Data{
}
```

Next to a `DateTimeInterfaceTransformer` the package also ships with an `ArraybleTransformer` that transforms an `Arrayable` object to an array.
Next to a `DateTimeInterfaceTransformer` the package also ships with an `ArrayableTransformer` that transforms an `Arrayable` object to an array.

It is possible to create transformers for your specific types. You can find more info [here](/docs/laravel-data/v2/advanced-usage/creating-a-transformer).

Expand Down

0 comments on commit 18abb91

Please sign in to comment.