From 5cf8ae54d57dee1b92097d0e01e06105b73b7732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 18 Oct 2023 17:55:36 +0200 Subject: [PATCH] misc: fix some typos --- docs/pages/other/static-analysis.md | 20 +++++++++---------- docs/pages/project/changelog/version-1.0.0.md | 2 +- .../Mapping/InterfaceInferringMappingTest.php | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/pages/other/static-analysis.md b/docs/pages/other/static-analysis.md index 07f4968b..2a992867 100644 --- a/docs/pages/other/static-analysis.md +++ b/docs/pages/other/static-analysis.md @@ -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" @@ -23,7 +23,7 @@ better understand the behaviour of the mapper. "vendor/cuyz/valinor/qa/Psalm/ValinorPsalmPlugin.php" ] } - ``` + ``` ```xml title="psalm.xml" @@ -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** @@ -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()) diff --git a/docs/pages/project/changelog/version-1.0.0.md b/docs/pages/project/changelog/version-1.0.0.md index 12f79a07..de4e9251 100644 --- a/docs/pages/project/changelog/version-1.0.0.md +++ b/docs/pages/project/changelog/version-1.0.0.md @@ -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" diff --git a/tests/Integration/Mapping/InterfaceInferringMappingTest.php b/tests/Integration/Mapping/InterfaceInferringMappingTest.php index 4a50b465..d6c00ac7 100644 --- a/tests/Integration/Mapping/InterfaceInferringMappingTest.php +++ b/tests/Integration/Mapping/InterfaceInferringMappingTest.php @@ -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()