PSR 2 compliance

This commit is contained in:
Simon Vieille 2021-03-30 21:17:05 +02:00
parent e93419eafd
commit 835a28aa34
5 changed files with 6 additions and 5 deletions

View File

@ -6,12 +6,12 @@ use App\Core\Manager\EntityManager;
use App\Entity\Blog\Category;
use App\Entity\Blog\Comment;
use App\Entity\Blog\Post;
use App\Repository\Blog\PostRepositoryQuery;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use App\Repository\Blog\PostRepositoryQuery;
class MigrateDataCommand extends Command
{

View File

@ -267,7 +267,7 @@ class Post implements EntityInterface
}
}
usort($tags, function($a, $b) {
usort($tags, function ($a, $b) {
return $a['label'] < $b['label'] ? -1 : 1;
});

View File

@ -3,9 +3,9 @@
namespace App\Form\Blog;
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;
use Symfony\Component\Validator\Constraints\NotBlank;
class PostTagType extends AbstractType

View File

@ -9,6 +9,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
@ -20,7 +21,6 @@ use Symfony\Component\Validator\Constraints\Image;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Constraints\Url;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
class PostType extends AbstractType
{

View File

@ -123,7 +123,8 @@ class PostRepositoryQuery extends RepositoryQuery
if ($tag) {
$this
->andWhere('.tags LIKE :tag')
->setParameter(':tag', '%'.$tag.'%');
->setParameter(':tag', '%'.$tag.'%')
;
}
return $this;