]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/commit - lib/ServerBan.php
Don't use arrays in parameters but use explicit options everwhere.
authorBram Matthys <redacted>
Fri, 6 Jan 2023 14:24:17 +0000 (15:24 +0100)
committerBram Matthys <redacted>
Fri, 6 Jan 2023 14:24:17 +0000 (15:24 +0100)
commit92f8fc2fb5ade3dc82eb896c4cf42a5ef8448a7b
tree12572598f4e19df60247ca3cac1a40e999780605
parente4de690d60fe81d2904b27925cd762938a59da8c
Don't use arrays in parameters but use explicit options everwhere.
For example in ServerBan, from:
public function add(string $user, array $params): stdClass;
To:
public function add(string $name, string $type, string $duration, string $reason): stdClass;

As the whole point of having these PHP functions is that it is immediately
transparent which things you need to pass.
lib/Contracts/Contract.php
lib/Contracts/ServerBan.php
lib/Contracts/User.php
lib/ServerBan.php
lib/User.php