Reformat code

master
Julien Rosset 1 year ago
parent 0e494bb3f1
commit 412dc1360a

@ -5,7 +5,6 @@ namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
class Kernel extends BaseKernel
{
class Kernel extends BaseKernel {
use MicroKernelTrait;
}

@ -14,15 +14,12 @@ use Doctrine\Persistence\ManagerRegistry;
* @method Document[] findAll()
* @method Document[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class DocumentRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
class DocumentRepository extends ServiceEntityRepository {
public function __construct (ManagerRegistry $registry) {
parent::__construct($registry, Document::class);
}
public function save(Document $entity, bool $flush = false): void
{
public function save (Document $entity, bool $flush = false): void {
$this->getEntityManager()->persist($entity);
if ($flush) {
@ -30,8 +27,7 @@ class DocumentRepository extends ServiceEntityRepository
}
}
public function remove(Document $entity, bool $flush = false): void
{
public function remove (Document $entity, bool $flush = false): void {
$this->getEntityManager()->remove($entity);
if ($flush) {

@ -14,15 +14,12 @@ use Doctrine\Persistence\ManagerRegistry;
* @method Tag[] findAll()
* @method Tag[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class TagRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
class TagRepository extends ServiceEntityRepository {
public function __construct (ManagerRegistry $registry) {
parent::__construct($registry, Tag::class);
}
public function save(Tag $entity, bool $flush = false): void
{
public function save (Tag $entity, bool $flush = false): void {
$this->getEntityManager()->persist($entity);
if ($flush) {
@ -30,8 +27,7 @@ class TagRepository extends ServiceEntityRepository
}
}
public function remove(Tag $entity, bool $flush = false): void
{
public function remove (Tag $entity, bool $flush = false): void {
$this->getEntityManager()->remove($entity);
if ($flush) {

@ -17,15 +17,12 @@ use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
* @method User[] findAll()
* @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
{
public function __construct(ManagerRegistry $registry)
{
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface {
public function __construct (ManagerRegistry $registry) {
parent::__construct($registry, User::class);
}
public function save(User $entity, bool $flush = false): void
{
public function save (User $entity, bool $flush = false): void {
$this->getEntityManager()->persist($entity);
if ($flush) {
@ -33,8 +30,7 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
}
}
public function remove(User $entity, bool $flush = false): void
{
public function remove (User $entity, bool $flush = false): void {
$this->getEntityManager()->remove($entity);
if ($flush) {
@ -45,8 +41,7 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
/**
* Used to upgrade (rehash) the user's password automatically over time.
*/
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
{
public function upgradePassword (PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void {
if (!$user instanceof User) {
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user)));
}

Loading…
Cancel
Save