Skip to content

Commit 84c0a8a

Browse files
committed
Remove the type ConditionValue and replace it with mixed.
1 parent 4aaa262 commit 84c0a8a

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

wcfsetup/install/files/lib/action/ConditionAddAction.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
4141
throw new UserInputException('provider', 'invalid');
4242
}
4343

44-
/** @var AbstractConditionProvider<IConditionType> $provider */
44+
/** @var AbstractConditionProvider<IConditionType<mixed>> $provider */
4545
$provider = new $parameters['provider']();
4646

4747
$form = $this->getForm($provider);
@@ -74,7 +74,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
7474
}
7575

7676
/**
77-
* @param AbstractConditionProvider<IConditionType> $provider
77+
* @param AbstractConditionProvider<IConditionType<mixed>> $provider
7878
*/
7979
private function getForm(AbstractConditionProvider $provider): Psr15DialogForm
8080
{

wcfsetup/install/files/lib/data/user/group/assignment/UserGroupAssignment.class.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use wcf\data\DatabaseObject;
66
use wcf\data\user\group\UserGroup;
7-
use wcf\system\condition\ConditionHandler;
87
use wcf\system\request\IRouteController;
98
use wcf\util\JSON;
109

@@ -20,15 +19,13 @@
2019
* @property-read string $title title of the automatic user group assignment
2120
* @property-read int $isDisabled is `1` if the user group assignment is disabled and thus not checked for automatic assignments, otherwise `0`
2221
* @property-read string $conditions JSON-encoded string containing the conditions of the automatic user group assignment
23-
*
24-
* @phpstan-import-type ConditionValue from ConditionHandler
2522
*/
2623
class UserGroupAssignment extends DatabaseObject implements IRouteController
2724
{
2825
/**
2926
* Returns the conditions of the automatic assignment to a user group.
3027
*
31-
* @return array{identifier: string, value: ConditionValue}[]
28+
* @return array{identifier: string, value: mixed}[]
3229
*/
3330
public function getConditions(): array
3431
{

wcfsetup/install/files/lib/system/condition/ConditionHandler.class.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
* @author Olaf Braun, Matthias Schmidt
2020
* @copyright 2001-2025 WoltLab GmbH
2121
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
22-
*
23-
* @phpstan-type ConditionValue float|int|string
2422
*/
2523
final class ConditionHandler extends SingletonFactory
2624
{
@@ -149,7 +147,7 @@ public function updateConditions($objectID, array $oldConditions, array $conditi
149147
*
150148
* @template T of IConditionType
151149
* @param AbstractConditionProvider<T> $provider
152-
* @param array{identifier: string, value: ConditionValue}[] $conditions
150+
* @param array{identifier: string, value: mixed}[] $conditions
153151
*
154152
* @return T[]
155153
*/

0 commit comments

Comments
 (0)