fix(continuous-integration): correction php-cs-fixer
All checks were successful
Cadoles/nineskeletor/pipeline/pr-master This commit looks good

This commit is contained in:
2022-09-23 16:14:15 +02:00
parent 5f3cc51f5c
commit b78f54b76c
70 changed files with 5943 additions and 5549 deletions

View File

@ -1,4 +1,5 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@ -9,24 +10,24 @@ use Symfony\Component\Mercure\Update;
class PublishController extends AbstractController
{
public function sample($id){
return $this->render('Home/publishsample.html.twig',[
'id'=>$id
public function sample($id)
{
return $this->render('Home/publishsample.html.twig', [
'id' => $id,
]);
}
public function publish($channel, $id, Request $request, HubInterface $hub): Response
{
$ret=$request->get("msg");
$ret["from"]=[];
$ret["from"]["id"]=$this->getUser()->getId();
$ret["from"]["username"]=$this->getUser()->getUsername();
$ret["from"]["displayname"]=$this->getUser()->getDisplayname();
$ret["from"]["avatar"]=$this->generateUrl('app_minio_image',["file"=>"avatar/".$this->getUser()->getAvatar()]);
$ret = $request->get('msg');
$ret['from'] = [];
$ret['from']['id'] = $this->getUser()->getId();
$ret['from']['username'] = $this->getUser()->getUsername();
$ret['from']['displayname'] = $this->getUser()->getDisplayname();
$ret['from']['avatar'] = $this->generateUrl('app_minio_image', ['file' => 'avatar/'.$this->getUser()->getAvatar()]);
$update = new Update(
$channel."-".$id,
$channel.'-'.$id,
json_encode(
['ret' => $ret])
);
@ -35,4 +36,4 @@ class PublishController extends AbstractController
return new Response('published!');
}
}
}