[TOOLS] Fix errors found by PHPStan

This commit is contained in:
Hugo Sales 2021-12-27 20:33:56 +00:00
parent d74a9ad373
commit c40e38c5ba
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 4 additions and 4 deletions

View File

@ -7,12 +7,12 @@ namespace App\DataFixtures;
use App\Core\UserRoles;
use App\Core\VisibilityScope;
use App\Entity\Actor;
use App\Entity\GroupInbox;
use App\Entity\GroupMember;
use App\Entity\LocalGroup;
use App\Entity\LocalUser;
use App\Entity\Note;
use App\Entity\Subscription;
use Component\Group\Entity\GroupInbox;
use Component\Group\Entity\GroupMember;
use Component\Group\Entity\LocalGroup;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;

View File

@ -357,7 +357,7 @@ abstract class Formatting
$group_matches = self::findMentionsRaw($text, '!');
foreach ($group_matches as $group_match) {
$nickname = Nickname::normalize($group_match[0], check_already_used: false, check_is_allowed: false);
$group = LocalGroup::getActorByNickname($nickname, Actor::GROUP);
$group = LocalGroup::getActorByNickname($nickname);
$mentions[] = [
'mentioned' => [$group],