Skip to content

Commit 476cf9f

Browse files
nextcloud-commandsusnux
authored andcommitted
chore(autoloader): Dump autoloader
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 parent c040d2a commit 476cf9f

6 files changed

Lines changed: 39 additions & 22 deletions

File tree

composer/installed.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -994,17 +994,17 @@
994994
},
995995
{
996996
"name": "gapple/structured-fields",
997-
"version": "v2.3.2",
998-
"version_normalized": "2.3.2.0",
997+
"version": "v2.3.3",
998+
"version_normalized": "2.3.3.0",
999999
"source": {
10001000
"type": "git",
10011001
"url": "https://github.com/gapple/structured-fields.git",
1002-
"reference": "f753bf49ffccc44a1287706c4fab973ddf6e2f5f"
1002+
"reference": "4c6936249482d100cc56732aed8c163a76c10dd3"
10031003
},
10041004
"dist": {
10051005
"type": "zip",
1006-
"url": "https://api.github.com/repos/gapple/structured-fields/zipball/f753bf49ffccc44a1287706c4fab973ddf6e2f5f",
1007-
"reference": "f753bf49ffccc44a1287706c4fab973ddf6e2f5f",
1006+
"url": "https://api.github.com/repos/gapple/structured-fields/zipball/4c6936249482d100cc56732aed8c163a76c10dd3",
1007+
"reference": "4c6936249482d100cc56732aed8c163a76c10dd3",
10081008
"shasum": ""
10091009
},
10101010
"require": {
@@ -1013,14 +1013,15 @@
10131013
"require-dev": {
10141014
"httpwg/structured-field-tests": "*@dev",
10151015
"paragonie/constant_time_encoding": "^3.0.0",
1016+
"phpcompatibility/php-compatibility": "^10@dev",
10161017
"phpmd/phpmd": "^2.15",
1017-
"phpstan/phpstan": "^1.12",
1018-
"phpstan/phpstan-phpunit": "^1.4",
1018+
"phpstan/phpstan": "^2.1",
1019+
"phpstan/phpstan-phpunit": "^2.0",
10191020
"phpunit/phpunit": "^10.5",
10201021
"slevomat/coding-standard": "^8.15",
1021-
"squizlabs/php_codesniffer": "^3.11"
1022+
"squizlabs/php_codesniffer": "^4.0"
10221023
},
1023-
"time": "2025-04-14T03:43:17+00:00",
1024+
"time": "2026-06-12T23:47:46+00:00",
10241025
"type": "library",
10251026
"extra": {
10261027
"branch-alias": {

composer/installed.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@
137137
'dev_requirement' => false,
138138
),
139139
'gapple/structured-fields' => array(
140-
'pretty_version' => 'v2.3.2',
141-
'version' => '2.3.2.0',
142-
'reference' => 'f753bf49ffccc44a1287706c4fab973ddf6e2f5f',
140+
'pretty_version' => 'v2.3.3',
141+
'version' => '2.3.3.0',
142+
'reference' => '4c6936249482d100cc56732aed8c163a76c10dd3',
143143
'type' => 'library',
144144
'install_path' => __DIR__ . '/../gapple/structured-fields',
145145
'aliases' => array(),

gapple/structured-fields/src/InnerList.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace gapple\StructuredFields;
66

7+
/**
8+
* @method array<TupleInterface|list{mixed,object}> getValue()
9+
*/
710
class InnerList implements TupleInterface
811
{
912
use TupleTrait;

gapple/structured-fields/src/Item.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace gapple\StructuredFields;
66

7+
/**
8+
* @method mixed getValue()
9+
*/
710
class Item implements TupleInterface
811
{
912
use TupleTrait;

gapple/structured-fields/src/Parser.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,13 @@ private static function parseKey(ParsingInput $input): string
219219
private static function parseBoolean(ParsingInput $input): bool
220220
{
221221
$input->consumeChar('?');
222-
return match ($input->consumeChar()) {
222+
$value = '';
223+
try {
224+
$value = $input->consumeChar();
225+
} catch (\RuntimeException) {
226+
// Consume may throw if value character is missing at end of string. Fall through to default error.
227+
}
228+
return match ($value) {
223229
'0' => false,
224230
'1' => true,
225231
default => throw new ParseException('Invalid boolean at position ' . $input->position()),

gapple/structured-fields/src/Serializer.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@ public static function serializeItem(mixed $value, ?object $parameters = null):
3939
}
4040

4141
/**
42-
* @param iterable<TupleInterface|array{mixed, object}> $value
42+
* @param iterable<TupleInterface|list{TupleInterface|list{mixed, object}, object}> $value
4343
*/
4444
public static function serializeList(iterable $value): string
4545
{
4646
if ($value instanceof \Traversable) {
47-
// @todo Checking for Traversable is not required for PHP ^8.2.0.
4847
$value = iterator_to_array($value);
4948
}
5049

5150
$returnValue = array_map(function ($item) {
52-
if ($item instanceof TupleInterface) {
53-
$itemValue = $item->getValue();
54-
$itemParameters = $item->getParameters();
55-
} elseif (is_array($item) && count($item) === 2) {
51+
if (is_array($item) && count($item) === 2) {
5652
$itemValue = $item[0];
5753
$itemParameters = $item[1];
54+
} elseif ($item instanceof TupleInterface) {
55+
$itemValue = $item->getValue();
56+
$itemParameters = $item->getParameters();
5857
} else {
5958
throw new SerializeException("Invalid item in list");
6059
}
6160

6261
if (is_array($itemValue)) {
62+
/** @var array<TupleInterface|list{mixed, object}> $itemValue */
6363
return self::serializeInnerList($itemValue, $itemParameters);
6464
} else {
6565
return self::serializeItem($itemValue, $itemParameters);
@@ -73,8 +73,6 @@ public static function serializeList(iterable $value): string
7373
* Serialize an object as a dictionary.
7474
*
7575
* Either a Traversable object can be provided, or the public properties of the object will be extracted.
76-
*
77-
* @param Dictionary|object $value
7876
*/
7977
public static function serializeDictionary(object $value): string
8078
{
@@ -84,6 +82,10 @@ public static function serializeDictionary(object $value): string
8482
$value = get_object_vars($value);
8583
}
8684

85+
/**
86+
* @var string $key
87+
* @var TupleInterface|list{TupleInterface|list{mixed,object}, object} $item
88+
*/
8789
foreach ($value as $key => $item) {
8890
if (!empty($returnValue)) {
8991
$returnValue .= ', ';
@@ -102,6 +104,7 @@ public static function serializeDictionary(object $value): string
102104
if ($itemValue === true) {
103105
$returnValue .= self::serializeParameters($itemParameters);
104106
} elseif (is_array($itemValue)) {
107+
/** @var array<TupleInterface|list{mixed, object}> $itemValue */
105108
$returnValue .= '=' . self::serializeInnerList($itemValue, $itemParameters);
106109
} else {
107110
$returnValue .= '=' . self::serializeItem($itemValue, $itemParameters);
@@ -189,7 +192,7 @@ private static function serializeDecimal(float $value): string
189192

190193
// Casting to a string loses a digit on long numbers, but is preserved
191194
// by json_encode (e.g. 111111111111.111).
192-
/** @var string $result */
195+
/** @var non-empty-string $result */
193196
$result = json_encode(round($value, 3, PHP_ROUND_HALF_EVEN));
194197

195198
if (!str_contains($result, '.')) {
@@ -250,6 +253,7 @@ private static function serializeParameters(object $value): string
250253
$value = get_object_vars($value);
251254
}
252255

256+
/** @var string $key */
253257
foreach ($value as $key => $item) {
254258
$returnValue .= ';' . self::serializeKey($key);
255259

0 commit comments

Comments
 (0)