mirror of
https://github.com/danog/Valinor.git
synced 2024-11-26 20:24:40 +01:00
misc: declare code type in docblocks
This commit is contained in:
parent
b7923bc383
commit
03c84a1f09
@ -12,7 +12,7 @@ use CuyZ\Valinor\Mapper\Tree\Visitor\ShellVisitor;
|
|||||||
* This attribute can be added to an object property. It will be filled with
|
* This attribute can be added to an object property. It will be filled with
|
||||||
* the iteration key from the source which is used to map the object tree.
|
* the iteration key from the source which is used to map the object tree.
|
||||||
*
|
*
|
||||||
* ```
|
* ```php
|
||||||
* use CuyZ\Valinor\Attribute\Identifier;
|
* use CuyZ\Valinor\Attribute\Identifier;
|
||||||
*
|
*
|
||||||
* final class Foo
|
* final class Foo
|
||||||
|
@ -31,7 +31,7 @@ use function is_callable;
|
|||||||
*
|
*
|
||||||
* See usage examples below:
|
* See usage examples below:
|
||||||
*
|
*
|
||||||
* ```
|
* ```php
|
||||||
* $formatter = (new MessageMapFormatter([
|
* $formatter = (new MessageMapFormatter([
|
||||||
* // Will match if the given message has this exact code
|
* // Will match if the given message has this exact code
|
||||||
* 'some_code' => 'new content / previous code was: %1$s',
|
* 'some_code' => 'new content / previous code was: %1$s',
|
||||||
|
@ -18,7 +18,7 @@ use function array_filter;
|
|||||||
* flatten all caught errors into a basic array of string that can then easily
|
* flatten all caught errors into a basic array of string that can then easily
|
||||||
* be used to inform the user of what is wrong.
|
* be used to inform the user of what is wrong.
|
||||||
*
|
*
|
||||||
* ```
|
* ```php
|
||||||
* try {
|
* try {
|
||||||
* // …
|
* // …
|
||||||
* } catch(MappingError $error) {
|
* } catch(MappingError $error) {
|
||||||
|
@ -38,7 +38,7 @@ final class NodeMessage implements Message, HasCode
|
|||||||
*
|
*
|
||||||
* See usage examples below:
|
* See usage examples below:
|
||||||
*
|
*
|
||||||
* ```
|
* ```php
|
||||||
* $content = $message->format('the previous code was: %1$s');
|
* $content = $message->format('the previous code was: %1$s');
|
||||||
*
|
*
|
||||||
* $content = $message->format(
|
* $content = $message->format(
|
||||||
|
@ -32,7 +32,7 @@ final class MapperBuilder
|
|||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
* ```
|
* ```php
|
||||||
* (new \CuyZ\Valinor\MapperBuilder())
|
* (new \CuyZ\Valinor\MapperBuilder())
|
||||||
* ->infer(UuidInterface::class, fn () => MyUuid::class)
|
* ->infer(UuidInterface::class, fn () => MyUuid::class)
|
||||||
* ->infer(SomeInterface::class, fn (string $type) => match($type) {
|
* ->infer(SomeInterface::class, fn (string $type) => match($type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user