PSR 2 compliance

This commit is contained in:
Simon Vieille 2021-03-18 21:40:45 +01:00
parent b8335d3882
commit 313f8dee98
10 changed files with 11 additions and 25 deletions

View file

@ -16,9 +16,6 @@ use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\TaggedContainerInterface;
/**
* @Route("/admin/site/node")

View file

@ -8,11 +8,11 @@ use App\Factory\Site\Page\PageFactory as EntityFactory;
use App\Form\Site\Page\PageType as EntityType;
use App\Manager\EntityManager;
use App\Page\FooPage;
use App\Page\SimplePage;
use App\Repository\Site\Page\PageRepositoryQuery as EntityRepositoryQuery;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Page\SimplePage;
/**
* @Route("/admin/site/page")

View file

@ -2,9 +2,9 @@
namespace App\Entity\Site\Page;
use App\Doctrine\Timestampable;
use App\Repository\Site\Page\BlockRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Doctrine\Timestampable;
/**
* @ORM\Entity(repositoryClass=BlockRepository::class)

View file

@ -3,12 +3,12 @@
namespace App\Entity\Site\Page;
use App\Doctrine\Timestampable;
use App\Entity\EntityInterface;
use App\Repository\Site\Page\PageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Form\FormBuilderInterface;
use App\Entity\EntityInterface;
/**
* @ORM\Entity(repositoryClass=PageRepository::class)

View file

@ -2,9 +2,6 @@
namespace App\Factory\Site\Page;
use App\Entity\Site\Menu;
use App\Entity\Site\Navigation;
use App\Site\SimplePage;
use App\Entity\Site\Page\Page;
/**
@ -16,8 +13,6 @@ class PageFactory
{
public function create(string $className): Page
{
$entity = new $className();
return $entity;
return new $className();
}
}

View file

@ -4,9 +4,9 @@ namespace App\Form\Site\Page;
use App\Entity\Site\Page\Page;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
class PageType extends AbstractType
{

View file

@ -4,9 +4,9 @@ namespace App\Form\Site\Page;
use App\Entity\Site\Page\Block;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
class TextBlockType extends AbstractType
{

View file

@ -2,13 +2,8 @@
namespace App\Form\Site\Page;
use App\Entity\Site\Page\Block;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use App\Form\Site\Page\TextBlockType;
use Symfony\Component\Form\FormBuilderInterface;
class TextareaBlockType extends TextBlockType
{

View file

@ -4,12 +4,10 @@ namespace App\Page;
use App\Entity\Site\Page\Block;
use App\Entity\Site\Page\Page;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use App\Form\Site\Page\TextareaBlockType;
use App\Form\Site\Page\TextBlockType;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Form\FormBuilderInterface;
/**
* @ORM\Entity
@ -43,7 +41,7 @@ class SimplePage extends Page
],
'constraints' => [
],
]
],
]
);
}

View file

@ -21,7 +21,8 @@ class PageRepositoryQuery extends RepositoryQuery
{
$this
->where('.id = :id')
->setParameter(':id', $id);
->setParameter(':id', $id)
;
return $this;
}