|
1 | | -<?php declare(strict_types=1); |
| 1 | +<?php declare (strict_types=1); |
2 | 2 |
|
3 | 3 | namespace Acelot\AutoMapper; |
4 | 4 |
|
@@ -89,21 +89,41 @@ public static function callCtx(callable $callable): CallWithContext |
89 | 89 | return self::getInstance(Processors::class)->callCtx($callable); |
90 | 90 | } |
91 | 91 |
|
| 92 | + /** |
| 93 | + * @param callable(mixed): bool $condition |
| 94 | + * @param ProcessorInterface $true |
| 95 | + * @param ProcessorInterface|null $false |
| 96 | + * @return Condition |
| 97 | + */ |
92 | 98 | public static function condition(callable $condition, ProcessorInterface $true, ?ProcessorInterface $false = null): Condition |
93 | 99 | { |
94 | 100 | return self::getInstance(Processors::class)->condition($condition, $true, $false); |
95 | 101 | } |
96 | 102 |
|
| 103 | + /** |
| 104 | + * @param callable(ContextInterface, mixed): bool $condition |
| 105 | + * @param ProcessorInterface $true |
| 106 | + * @param ProcessorInterface|null $false |
| 107 | + * @return ConditionWithContext |
| 108 | + */ |
97 | 109 | public static function conditionCtx(callable $condition, ProcessorInterface $true, ?ProcessorInterface $false = null): ConditionWithContext |
98 | 110 | { |
99 | 111 | return self::getInstance(Processors::class)->conditionCtx($condition, $true, $false); |
100 | 112 | } |
101 | 113 |
|
| 114 | + /** |
| 115 | + * @param callable(mixed, int|string): bool $predicate |
| 116 | + * @return Find |
| 117 | + */ |
102 | 118 | public static function find(callable $predicate): Find |
103 | 119 | { |
104 | 120 | return self::getInstance(Processors::class)->find($predicate); |
105 | 121 | } |
106 | 122 |
|
| 123 | + /** |
| 124 | + * @param callable(ContextInterface, mixed, int|string): bool $predicate |
| 125 | + * @return FindWithContext |
| 126 | + */ |
107 | 127 | public static function findCtx(callable $predicate): FindWithContext |
108 | 128 | { |
109 | 129 | return self::getInstance(Processors::class)->findCtx($predicate); |
@@ -199,6 +219,10 @@ public static function ifNotEqual(mixed $to, ProcessorInterface $true, ?Processo |
199 | 219 | return self::getInstance(Helpers::class)->ifNotEqual($to, $true, $false, $strict); |
200 | 220 | } |
201 | 221 |
|
| 222 | + /** |
| 223 | + * @param non-empty-string $separator |
| 224 | + * @return Pipeline |
| 225 | + */ |
202 | 226 | public static function explodeString(string $separator): Pipeline |
203 | 227 | { |
204 | 228 | return self::getInstance(Helpers::class)->explodeString($separator); |
|
0 commit comments