Skip to content

Commit

Permalink
PHP 8.4: Implicitly nullable parameters deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Nov 21, 2024
1 parent 4cf5d22 commit 562cb8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Discord/Discord.php
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ public function getChannel($channel_id): ?Channel
* Add listener for incoming application command from interaction.
*
* @param string|array $name
* @param callable $callback
* @param callable|null $callback
* @param callable|null $autocomplete_callback
*
* @throws \LogicException
Expand Down
10 changes: 5 additions & 5 deletions src/Discord/Helpers/RegisteredCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ class RegisteredCommand
* RegisteredCommand represents a command that has been registered with the
* Discord servers and has a handler to handle when the command is triggered.
*
* @param Discord $discord
* @param string $name
* @param callable $callback
* @param ?callable $autocomplete_callback Callback returning list of auto complete suggestions
* @param Discord $discord
* @param string $name
* @param callable|null $callback
* @param callable|null $autocomplete_callback Callback returning list of auto complete suggestions
*/
public function __construct(Discord $discord, string $name, callable $callback = null, ?callable $autocomplete_callback = null)
public function __construct(Discord $discord, string $name, ?callable $callback = null, ?callable $autocomplete_callback = null)
{
$this->discord = $discord;
$this->name = $name;
Expand Down

0 comments on commit 562cb8a

Please sign in to comment.