Skip to content

Commit 80ef76e

Browse files
committed
Expand the PHPDoc for methods in IMigrateConditionType
1 parent ed94ef7 commit 80ef76e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

wcfsetup/install/files/lib/system/condition/type/IMigrateConditionType.class.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,25 @@
1111
interface IMigrateConditionType
1212
{
1313
/**
14-
* Converts the old condition structure to the new one. All migrated values must be removed from the `$conditionData` array.
14+
* Migrates old condition data to the new condition format by removing all successfully migrated entries from the `$conditionData`
15+
* and returns a list of condition-data in the new structure. The remaining entries are assumed to be unprocessed and are handled
16+
* by other condition types and must remain untouched.
17+
*
18+
* Note:
19+
* - Remove entries that you have successfully migrated.
20+
* - Leave unrecognized or unsupported entries untouched.
21+
* - If no data can be migrated, return an empty array.
22+
*
23+
* This allows `ConditionHandler::migrateConditionData()` to check whether all data has been migrated correctly and completely.
1524
*
1625
* @param array<string, mixed> $conditionData
1726
*
18-
* @return array{identifier: string, value: mixed}[]
27+
* @return list<array{identifier: string, value: mixed}>
1928
*/
2029
public function migrateConditionData(array &$conditionData): array;
2130

31+
/**
32+
* Returns `true` if the method `migrateConditionData()` can migrate data for the given `$objectType` and `false` otherwise.
33+
*/
2234
public function canMigrateConditionData(string $objectType): bool;
2335
}

0 commit comments

Comments
 (0)