PSR 2 compliance
This commit is contained in:
parent
4273607594
commit
7781298d3f
|
@ -6,10 +6,10 @@ use App\Controller\Admin\AdminController;
|
|||
use App\Entity\Blog\Post as Entity;
|
||||
use App\Factory\Blog\PostFactory as EntityFactory;
|
||||
use App\Form\Blog\PostType as EntityType;
|
||||
use App\Form\FileUploadHandler;
|
||||
use App\Manager\EntityManager;
|
||||
use App\Repository\Blog\PostRepositoryQuery;
|
||||
use App\Repository\Blog\PostRepositoryQuery as RepositoryQuery;
|
||||
use App\Form\FileUploadHandler;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
namespace App\EventSuscriber;
|
||||
|
||||
use App\Event\EntityManager\EntityManagerEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use App\Entity\EntityInterface;
|
||||
use App\Entity\Blog\Post;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use App\Entity\EntityInterface;
|
||||
use App\Event\EntityManager\EntityManagerEvent;
|
||||
use App\Repository\Blog\PostRepositoryQuery;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,8 @@ class BlogPostEventSubscriber implements EventSubscriberInterface
|
|||
$post = $this->query->create()
|
||||
->where('.image = :image')
|
||||
->setParameter(':image', $image)
|
||||
->findOne();
|
||||
->findOne()
|
||||
;
|
||||
|
||||
if (null === $post) {
|
||||
$this->filesystem->remove($file->getRealPath());
|
||||
|
|
|
@ -18,7 +18,8 @@ class PostFactory
|
|||
|
||||
$entity
|
||||
->setAuthor($author)
|
||||
->setStatus(0);
|
||||
->setStatus(0)
|
||||
;
|
||||
|
||||
return $entity;
|
||||
}
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
namespace App\Form\Blog;
|
||||
|
||||
use App\Entity\Blog\Post;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use App\Entity\Blog\Category;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use App\Entity\Blog\Post;
|
||||
use App\Entity\User;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateType;
|
||||
use Symfony\Component\Validator\Constraints\Date;
|
||||
use App\Entity\User;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Validator\Constraints\Date;
|
||||
use Symfony\Component\Validator\Constraints\Image;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
class PostType extends AbstractType
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue