update: controllers

This commit is contained in:
HDVinnie
2022-02-28 05:06:55 -05:00
parent 6613314f5d
commit bdd63aa816
28 changed files with 54 additions and 48 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ class CommentController extends Controller
/**
* CommentController Constructor.
*/
public function __construct(private TaggedUserRepository $taggedUserRepository, private ChatRepository $chatRepository)
public function __construct(private readonly TaggedUserRepository $taggedUserRepository, private readonly ChatRepository $chatRepository)
{
}
@@ -642,7 +642,7 @@ class CommentController extends Controller
];
}
$selected = \mt_rand(0, (\is_countable($thankArray) ? \count($thankArray) : 0) - 1);
$selected = random_int(0, (\is_countable($thankArray) ? \count($thankArray) : 0) - 1);
$comment->content = $thankArray[$selected];
$comment->user_id = $user->id;
$comment->torrent_id = $torrent->id;