Skip to content

Commit

Permalink
misc: fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Oct 18, 2023
1 parent 3b663a9 commit 5cf8ae5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions docs/pages/other/static-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ To help static analysis of a codebase using this library, an extension for
better understand the behaviour of the mapper.

!!! note
To activate this feature, the plugin must be registered correcly:

To activate this feature, the plugin must be registered correctly:

=== "PHPStan"

```yaml title="phpstan.neon"
includes:
- vendor/cuyz/valinor/qa/PHPStan/valinor-phpstan-configuration.php
```

=== "Psalm"

```json title="composer.json"
Expand All @@ -23,7 +23,7 @@ better understand the behaviour of the mapper.
"vendor/cuyz/valinor/qa/Psalm/ValinorPsalmPlugin.php"
]
}
```
```

```xml title="psalm.xml"
<plugins>
Expand Down Expand Up @@ -57,16 +57,16 @@ $objects = (new \CuyZ\Valinor\MapperBuilder())
foreach ($objects as $object) {
// ✅
echo $object->foo;

// ✅
echo $object->bar * 2;

// ❌ Cannot perform operation between `string` and `int`
echo $object->foo * $object->bar;

// ❌ Property `SomeClass::$fiz` is not defined
echo $object->fiz;
}
}
```

**Mapping to a shaped array**
Expand Down Expand Up @@ -96,7 +96,7 @@ echo $array['fiz'];

```php
$someFunction = function(string $foo, int $bar): string {
return "$foo / $bar";
return "$foo / $bar";
};

$arguments = (new \CuyZ\Valinor\MapperBuilder())
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/project/changelog/version-1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ You can click on the entries below to get advice on available replacements.

??? tip "Mapper builder `flexible` method removal"

The flexible has been splitted in three disctint modes, see [type strictness
The flexible has been split in three disctint modes, see [type strictness
& flexibility chapter].

??? tip "Mapper builder `withCacheDir` method removal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function (string $type, int $key): string {
return SomeClassThatInheritsInterfaceB::class;
}

self::fail("Combinaison `$type` / `$key` not handled.");
self::fail("Combination `$type` / `$key` not handled.");
}
)
->mapper()
Expand Down

0 comments on commit 5cf8ae5

Please sign in to comment.