mapperBuilder ->alter(fn () => 'bar') ->alter(fn (string $value) => strtolower($value)) ->alter(fn (string $value) => strtoupper($value)) ->alter(/** @param string $value */ fn ($value) => $value . '!') ->alter(fn (int $value) => 42) ->mapper() ->map(SimpleObject::class, ['value' => 'foo']); } catch (MappingError $error) { $this->mappingFail($error); } self::assertSame('FOO!', $result->value); } }