Skip to content

Commit 6700a05

Browse files
committed
Merge branch 'update'
2 parents 44e80ff + 54d83da commit 6700a05

File tree

15 files changed

+447
-562
lines changed

15 files changed

+447
-562
lines changed

.phive/phars.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="lkrms/pretty-php" version="^0.4.48" installed="0.4.92" location="./tools/pretty-php" copy="true"/>
4-
<phar name="php-cs-fixer" version="^3.46.0" installed="3.74.0" location="./tools/php-cs-fixer" copy="true"/>
3+
<phar name="lkrms/pretty-php" version="^0.4.48" installed="0.4.94" location="./tools/pretty-php" copy="true"/>
4+
<phar name="php-cs-fixer" version="^3.46.0" installed="3.87.1" location="./tools/php-cs-fixer" copy="true"/>
55
<phar name="salient-labs/changelog" version="^1.0.5" installed="1.0.8" location="./tools/changelog" copy="true"/>
66
<phar name="composer-require-checker" version="^4.16.1" installed="4.16.1" location="./tools/composer-require-checker" copy="true"/>
77
</phive>

composer.lock

Lines changed: 129 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Toolkit/Contract/Collection/DictionaryInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public function reverse();
132132
* The callback's return values are discarded.
133133
*
134134
* @param (callable(TValue, TValue|null $next, TValue|null $prev): mixed)|(callable(TKey, TKey|null $next, TKey|null $prev): mixed)|(callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): mixed) $callback
135+
* @param int-mask-of<CollectionInterface::*> $mode
135136
* @phpstan-param (
136137
* $mode is 3|11|19
137138
* ? (callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): mixed)
@@ -140,7 +141,6 @@ public function reverse();
140141
* : (callable(TValue, TValue|null $next, TValue|null $prev): mixed)
141142
* )
142143
* ) $callback
143-
* @param int-mask-of<CollectionInterface::*> $mode
144144
* @return $this
145145
*/
146146
public function forEach(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE);
@@ -152,6 +152,7 @@ public function forEach(callable $callback, int $mode = CollectionInterface::CAL
152152
* @template TReturn of TValue
153153
*
154154
* @param (callable(TValue, TValue|null $next, TValue|null $prev): TReturn)|(callable(TKey, TKey|null $next, TKey|null $prev): TReturn)|(callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): TReturn) $callback
155+
* @param int-mask-of<CollectionInterface::*> $mode
155156
* @phpstan-param (
156157
* $mode is 3|11|19
157158
* ? (callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): TReturn)
@@ -160,7 +161,6 @@ public function forEach(callable $callback, int $mode = CollectionInterface::CAL
160161
* : (callable(TValue, TValue|null $next, TValue|null $prev): TReturn)
161162
* )
162163
* ) $callback
163-
* @param int-mask-of<CollectionInterface::*> $mode
164164
* @return static<TKey,TReturn,TArrayValue>
165165
*/
166166
public function map(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE);
@@ -169,6 +169,7 @@ public function map(callable $callback, int $mode = CollectionInterface::CALLBAC
169169
* Reduce the collection to items that satisfy a callback
170170
*
171171
* @param (callable(TValue, TValue|null $next, TValue|null $prev): bool)|(callable(TKey, TKey|null $next, TKey|null $prev): bool)|(callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): bool) $callback
172+
* @param int-mask-of<CollectionInterface::*> $mode
172173
* @phpstan-param (
173174
* $mode is 3|11|19
174175
* ? (callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): bool)
@@ -177,7 +178,6 @@ public function map(callable $callback, int $mode = CollectionInterface::CALLBAC
177178
* : (callable(TValue, TValue|null $next, TValue|null $prev): bool)
178179
* )
179180
* ) $callback
180-
* @param int-mask-of<CollectionInterface::*> $mode
181181
* @return static
182182
*/
183183
public function filter(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE);
@@ -187,6 +187,7 @@ public function filter(callable $callback, int $mode = CollectionInterface::CALL
187187
* item in the collection
188188
*
189189
* @param (callable(TValue, TValue|null $next, TValue|null $prev): bool)|(callable(TKey, TKey|null $next, TKey|null $prev): bool)|(callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): bool) $callback
190+
* @param int-mask-of<CollectionInterface::*> $mode
190191
* @phpstan-param (
191192
* $mode is 3|11|19
192193
* ? (callable(array{TKey,TValue}, array{TKey,TValue}|null $next, array{TKey,TValue}|null $prev): bool)
@@ -195,7 +196,6 @@ public function filter(callable $callback, int $mode = CollectionInterface::CALL
195196
* : (callable(TValue, TValue|null $next, TValue|null $prev): bool)
196197
* )
197198
* ) $callback
198-
* @param int-mask-of<CollectionInterface::*> $mode
199199
* @return ($mode is 16|17|18|19 ? TKey : TValue)|null
200200
*/
201201
public function find(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE | CollectionInterface::FIND_VALUE);

src/Toolkit/Db/DbConnector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ public function getConnection(int $timeout = 15): ADOConnection
184184
*
185185
* @param T $result
186186
* @param string|int|float ...$args
187-
* @return (T is false ? never : T)
188187
* @phpstan-param T|false $result
188+
* @return (T is false ? never : T)
189189
* @phpstan-return ($result is false ? never : T)
190190
*/
191191
private static function throwOnFailure($result, string $message, ...$args)

src/Toolkit/Sync/AbstractSyncDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
* @property-read AbstractSyncDefinition::* $Conformity Conformity level of data returned by the provider for this entity
3939
* @property-read FilterPolicy::* $FilterPolicy Action to take when filters are not claimed by the provider
4040
* @property-read array<OP::*,Closure(SyncDefinitionInterface<TEntity,TProvider>, OP::*, SyncContextInterface, mixed...): (iterable<array-key,TEntity>|TEntity)> $Overrides Array that maps sync operations to closures that override other implementations
41-
* @phpstan-property-read array<OP::*,OverrideClosure> $Overrides
4241
* @property-read array<array-key,array-key|array-key[]>|null $KeyMap Array that maps keys to properties for entity data returned by the provider
4342
* @property-read int-mask-of<ArrayMapperInterface::REMOVE_NULL|ArrayMapperInterface::ADD_UNMAPPED|ArrayMapperInterface::ADD_MISSING|ArrayMapperInterface::REQUIRE_MAPPED> $KeyMapFlags Array mapper flags used if a key map is provided
4443
* @property-read PipelineInterface<mixed[],TEntity,SyncPipelineArgument>|null $PipelineFromBackend Pipeline that maps provider data to a serialized entity, or `null` if mapping is not required
4544
* @property-read PipelineInterface<TEntity,mixed[],SyncPipelineArgument>|null $PipelineToBackend Pipeline that maps a serialized entity to provider data, or `null` if mapping is not required
4645
* @property-read bool $ReadFromList Perform READ operations by iterating over entities returned by READ_LIST
4746
* @property-read EntitySource::*|null $ReturnEntitiesFrom Source of entity data for the return value of a successful CREATE, UPDATE or DELETE operation
47+
* @phpstan-property-read array<OP::*,OverrideClosure> $Overrides
4848
*
4949
* @template TEntity of SyncEntityInterface
5050
* @template TProvider of SyncProviderInterface
@@ -218,12 +218,12 @@ abstract protected function getClosure(int $operation): ?Closure;
218218
* @param AbstractSyncDefinition::* $conformity
219219
* @param FilterPolicy::*|null $filterPolicy
220220
* @param array<int-mask-of<OP::*>,Closure(SyncDefinitionInterface<TEntity,TProvider>, OP::*, SyncContextInterface, mixed...): (iterable<array-key,TEntity>|TEntity)> $overrides
221-
* @phpstan-param array<int-mask-of<OP::*>,OverrideClosure> $overrides
222221
* @param array<array-key,array-key|array-key[]>|null $keyMap
223222
* @param int-mask-of<ArrayMapperInterface::REMOVE_NULL|ArrayMapperInterface::ADD_UNMAPPED|ArrayMapperInterface::ADD_MISSING|ArrayMapperInterface::REQUIRE_MAPPED> $keyMapFlags
224223
* @param PipelineInterface<mixed[],TEntity,SyncPipelineArgument>|null $pipelineFromBackend
225224
* @param PipelineInterface<TEntity,mixed[],SyncPipelineArgument>|null $pipelineToBackend
226225
* @param EntitySource::*|null $returnEntitiesFrom
226+
* @phpstan-param array<int-mask-of<OP::*>,OverrideClosure> $overrides
227227
*/
228228
public function __construct(
229229
string $entity,

src/Toolkit/Sync/Db/DbSyncDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ final class DbSyncDefinition extends AbstractSyncDefinition implements Buildable
4747
* @param DbSyncDefinition::* $conformity
4848
* @param FilterPolicy::*|null $filterPolicy
4949
* @param array<int-mask-of<OP::*>,Closure(DbSyncDefinition<TEntity,TProvider>, OP::*, SyncContextInterface, mixed...): (iterable<array-key,TEntity>|TEntity)> $overrides
50-
* @phpstan-param array<int-mask-of<OP::*>,OverrideClosure> $overrides
5150
* @param array<array-key,array-key|array-key[]>|null $keyMap
5251
* @param int-mask-of<ArrayMapperInterface::REMOVE_NULL|ArrayMapperInterface::ADD_UNMAPPED|ArrayMapperInterface::ADD_MISSING|ArrayMapperInterface::REQUIRE_MAPPED> $keyMapFlags
5352
* @param PipelineInterface<mixed[],TEntity,SyncPipelineArgument>|null $pipelineFromBackend
5453
* @param PipelineInterface<TEntity,mixed[],SyncPipelineArgument>|null $pipelineToBackend
5554
* @param EntitySource::*|null $returnEntitiesFrom
55+
* @phpstan-param array<int-mask-of<OP::*>,OverrideClosure> $overrides
5656
*/
5757
public function __construct(
5858
string $entity,

src/Toolkit/Sync/Http/HttpSyncDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,13 @@ final class HttpSyncDefinition extends AbstractSyncDefinition implements Buildab
242242
* @param array<OP::*,HttpSyncDefinition::METHOD_*> $methodMap
243243
* @param (callable(CurlerInterface, HttpSyncDefinition<TEntity,TProvider>, OP::*, SyncContextInterface, mixed...): CurlerInterface)|null $curlerCallback
244244
* @param array<int-mask-of<OP::*>,Closure(HttpSyncDefinition<TEntity,TProvider>, OP::*, SyncContextInterface, mixed...): (iterable<array-key,TEntity>|TEntity)> $overrides
245-
* @phpstan-param array<int-mask-of<OP::*>,OverrideClosure> $overrides
246245
* @param array<array-key,array-key|array-key[]>|null $keyMap
247246
* @param int-mask-of<ArrayMapperInterface::REMOVE_NULL|ArrayMapperInterface::ADD_UNMAPPED|ArrayMapperInterface::ADD_MISSING|ArrayMapperInterface::REQUIRE_MAPPED> $keyMapFlags
248247
* @param PipelineInterface<mixed[],TEntity,SyncPipelineArgument>|null $pipelineFromBackend
249248
* @param PipelineInterface<TEntity,mixed[],SyncPipelineArgument>|null $pipelineToBackend
250249
* @param EntitySource::*|null $returnEntitiesFrom
251250
* @param mixed[]|null $args
251+
* @phpstan-param array<int-mask-of<OP::*>,OverrideClosure> $overrides
252252
*/
253253
public function __construct(
254254
string $entity,

src/Toolkit/Sync/Support/SyncEntityFuzzyResolver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ private function cacheResult(string $name, ?array $entry, ?float &$uncertainty):
307307
return null;
308308
}
309309

310-
// @phpstan-ignore parameterByRef.type
311310
$uncertainty = array_pop($entry);
312311
$this->Cache[$name] = [$entry[0], $uncertainty];
313312
return $entry[0];

src/Toolkit/Utility/Arr.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,6 @@ public static function splice(
882882
if ($length === null) {
883883
$length = count($array);
884884
}
885-
// @phpstan-ignore paramOut.type
886885
$replaced = array_splice($array, $offset, $length, $replacement);
887886
return $array;
888887
}

src/Toolkit/Utility/Regex.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ public static function replace(
215215
*
216216
* @param string[]|string $pattern
217217
* @param callable(array<array-key,string|null>):string $callback
218+
* @param T $subject
219+
* @param TFlags $flags
218220
* @phpstan-param (
219221
* TFlags is 256
220222
* ? (callable(array<array{string,int}>): string)
@@ -226,8 +228,6 @@ public static function replace(
226228
* )
227229
* )
228230
* ) $callback
229-
* @param T $subject
230-
* @param TFlags $flags
231231
* @param-out int $count
232232
* @return T
233233
*/
@@ -255,6 +255,8 @@ public static function replaceCallback(
255255
* @template TFlags of int-mask-of<\PREG_OFFSET_CAPTURE|\PREG_UNMATCHED_AS_NULL>
256256
*
257257
* @param array<string,callable(array<array-key,string|null>):string> $pattern
258+
* @param T $subject
259+
* @param TFlags $flags
258260
* @phpstan-param (
259261
* TFlags is 256
260262
* ? array<string,callable(array<array{string,int}>): string>
@@ -266,8 +268,6 @@ public static function replaceCallback(
266268
* )
267269
* )
268270
* ) $pattern
269-
* @param T $subject
270-
* @param TFlags $flags
271271
* @return T
272272
*/
273273
public static function replaceCallbackArray(

0 commit comments

Comments
 (0)