mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix cs ?
This commit is contained in:
parent
11824adda4
commit
5cebcfddb7
@ -26,7 +26,7 @@ class CollectionDocGenNormalizer implements ContextAwareNormalizerInterface, Nor
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $object
|
* @param Collection $object
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*
|
*
|
||||||
* @return array|ArrayObject|bool|float|int|string|void|null
|
* @return array|ArrayObject|bool|float|int|string|void|null
|
||||||
*/
|
*/
|
||||||
|
@ -66,7 +66,7 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
|
|||||||
if (!$this->classMetadataFactory->hasMetadataFor($classMetadataKey)) {
|
if (!$this->classMetadataFactory->hasMetadataFor($classMetadataKey)) {
|
||||||
throw new LogicException(sprintf(
|
throw new LogicException(sprintf(
|
||||||
'This object does not have metadata: %s. Add groups on this entity to allow to serialize with the format %s and groups %s',
|
'This object does not have metadata: %s. Add groups on this entity to allow to serialize with the format %s and groups %s',
|
||||||
is_object($object) ? get_class($object) : '(todo' /*$context['docgen:expects'],*/,
|
is_object($object) ? get_class($object) : '(todo' /*$context['docgen:expects'],*/ ,
|
||||||
$format,
|
$format,
|
||||||
implode(', ', ($context['groups'] ?? []))
|
implode(', ', ($context['groups'] ?? []))
|
||||||
));
|
));
|
||||||
|
@ -52,11 +52,11 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
$menu
|
$menu
|
||||||
->addChild(
|
->addChild(
|
||||||
$this->translator->trans('My notifications'),
|
$this->translator->trans('My notifications'),
|
||||||
['route' => 'chill_main_notification_show']
|
['route' => 'chill_main_notification_my']
|
||||||
)
|
)
|
||||||
->setExtras([
|
->setExtras([
|
||||||
'order' => 600,
|
'order' => 600,
|
||||||
'icon' => 'envelope'
|
'icon' => 'envelope',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$menu
|
$menu
|
||||||
|
@ -48,7 +48,7 @@ class AddressNormalizer implements ContextAwareNormalizerInterface, NormalizerAw
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Address $address
|
* @param Address $address
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($address, $format = null, array $context = [])
|
public function normalize($address, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ class CollectionNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $collection
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($collection, $format = null, array $context = [])
|
public function normalize($collection, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,7 @@ final class ExportManagerTest extends KernelTestCase
|
|||||||
|
|
||||||
public function testGetAggregatorNonExistant()
|
public function testGetAggregatorNonExistant()
|
||||||
{
|
{
|
||||||
$this->expectException(\RuntimeException::class);
|
$this->expectException(RuntimeException::class);
|
||||||
|
|
||||||
$exportManager = $this->createExportManager();
|
$exportManager = $this->createExportManager();
|
||||||
|
|
||||||
@ -446,7 +446,7 @@ final class ExportManagerTest extends KernelTestCase
|
|||||||
|
|
||||||
public function testGetExportNonExistant()
|
public function testGetExportNonExistant()
|
||||||
{
|
{
|
||||||
$this->expectException(\RuntimeException::class);
|
$this->expectException(RuntimeException::class);
|
||||||
|
|
||||||
$exportManager = $this->createExportManager();
|
$exportManager = $this->createExportManager();
|
||||||
|
|
||||||
@ -485,7 +485,7 @@ final class ExportManagerTest extends KernelTestCase
|
|||||||
|
|
||||||
public function testGetFilterNonExistant()
|
public function testGetFilterNonExistant()
|
||||||
{
|
{
|
||||||
$this->expectException(\RuntimeException::class);
|
$this->expectException(RuntimeException::class);
|
||||||
|
|
||||||
$exportManager = $this->createExportManager();
|
$exportManager = $this->createExportManager();
|
||||||
|
|
||||||
@ -646,7 +646,7 @@ final class ExportManagerTest extends KernelTestCase
|
|||||||
|
|
||||||
public function testNonExistingFormatter()
|
public function testNonExistingFormatter()
|
||||||
{
|
{
|
||||||
$this->expectException(\RuntimeException::class);
|
$this->expectException(RuntimeException::class);
|
||||||
|
|
||||||
$exportManager = $this->createExportManager();
|
$exportManager = $this->createExportManager();
|
||||||
|
|
||||||
@ -668,10 +668,10 @@ final class ExportManagerTest extends KernelTestCase
|
|||||||
?UserInterface $user = null
|
?UserInterface $user = null
|
||||||
): ExportManager {
|
): ExportManager {
|
||||||
$localUser = $user ?? self::$container->get(
|
$localUser = $user ?? self::$container->get(
|
||||||
'doctrine.orm.entity_manager'
|
'doctrine.orm.entity_manager'
|
||||||
)
|
)
|
||||||
->getRepository('ChillMainBundle:User')
|
->getRepository('ChillMainBundle:User')
|
||||||
->findOneBy(['username' => 'center a_social']);
|
->findOneBy(['username' => 'center a_social']);
|
||||||
$token = new UsernamePasswordToken($localUser, 'password', 'provider');
|
$token = new UsernamePasswordToken($localUser, 'password', 'provider');
|
||||||
$tokenStorage = new TokenStorage();
|
$tokenStorage = new TokenStorage();
|
||||||
$tokenStorage->setToken($token);
|
$tokenStorage->setToken($token);
|
||||||
|
@ -16,6 +16,7 @@ use Chill\MainBundle\Security\PasswordRecover\TokenManager;
|
|||||||
use DateInterval;
|
use DateInterval;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
use UnexpectedValueException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
@ -57,7 +58,7 @@ final class TokenManagerTest extends KernelTestCase
|
|||||||
|
|
||||||
public function testGenerateEmptyUsernameCanonical()
|
public function testGenerateEmptyUsernameCanonical()
|
||||||
{
|
{
|
||||||
$this->expectException(\UnexpectedValueException::class);
|
$this->expectException(UnexpectedValueException::class);
|
||||||
|
|
||||||
$tokenManager = $this->tokenManager;
|
$tokenManager = $this->tokenManager;
|
||||||
// set a username, but not a username canonical
|
// set a username, but not a username canonical
|
||||||
|
@ -13,4 +13,4 @@ services:
|
|||||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||||
$routeParameters: '%chill_main.notifications%'
|
$routeParameters: '%chill_main.notifications%'
|
||||||
|
|
||||||
Chill\MainBundle\Notification\NotificationRenderer: ~
|
Chill\MainBundle\Notification\NotificationHandlerManager: ~
|
||||||
|
@ -351,3 +351,7 @@ By: Par
|
|||||||
For: Pour
|
For: Pour
|
||||||
Created for: Créé pour
|
Created for: Créé pour
|
||||||
Created by: Créé par
|
Created by: Créé par
|
||||||
|
|
||||||
|
notification:
|
||||||
|
Notify: Notifier
|
||||||
|
Notification create: Notification envoyée
|
||||||
|
@ -187,7 +187,7 @@ class HouseholdMemberController extends ApiController
|
|||||||
$_format,
|
$_format,
|
||||||
['groups' => ['read']]
|
['groups' => ['read']]
|
||||||
);
|
);
|
||||||
} catch (Exception\InvalidArgumentException|Exception\UnexpectedValueException $e) {
|
} catch (Exception\InvalidArgumentException | Exception\UnexpectedValueException $e) {
|
||||||
throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e);
|
throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class LoadHouseholdPosition extends Fixture
|
|||||||
{
|
{
|
||||||
foreach (
|
foreach (
|
||||||
self::POSITIONS_DATA as [$name, $share, $allowHolder,
|
self::POSITIONS_DATA as [$name, $share, $allowHolder,
|
||||||
$ordering, $ref, ]
|
$ordering, $ref, ]
|
||||||
) {
|
) {
|
||||||
$position = (new Position())
|
$position = (new Position())
|
||||||
->setLabel(['fr' => $name])
|
->setLabel(['fr' => $name])
|
||||||
|
@ -93,7 +93,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param AccompanyingPeriod|null $period
|
* @param AccompanyingPeriod|null $period
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($period, $format = null, array $context = [])
|
public function normalize($period, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ final class AccompanyingPeriodOriginNormalizer implements NormalizerInterface
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param Origin $origin
|
* @param Origin $origin
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($origin, $format = null, array $context = [])
|
public function normalize($origin, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ class AccompanyingPeriodParticipationNormalizer implements NormalizerAwareInterf
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param AccompanyingPeriodParticipation $participation
|
* @param AccompanyingPeriodParticipation $participation
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($participation, $format = null, array $context = [])
|
public function normalize($participation, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,7 @@ class PersonJsonNormalizer implements
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Person $person
|
* @param Person $person
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($person, $format = null, array $context = [])
|
public function normalize($person, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ class RelationshipDocGenNormalizer implements ContextAwareNormalizerInterface, N
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Relationship $relation
|
* @param Relationship $relation
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($relation, $format = null, array $context = [])
|
public function normalize($relation, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
|||||||
namespace Chill\PersonBundle\Tests\Form\Type;
|
namespace Chill\PersonBundle\Tests\Form\Type;
|
||||||
|
|
||||||
use Chill\PersonBundle\Form\Type\PickPersonType;
|
use Chill\PersonBundle\Form\Type\PickPersonType;
|
||||||
|
use RuntimeException;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||||
use function count;
|
use function count;
|
||||||
@ -52,7 +53,7 @@ final class PickPersonTypeTest extends KernelTestCase
|
|||||||
*/
|
*/
|
||||||
public function testWithInvalidOptionCenters()
|
public function testWithInvalidOptionCenters()
|
||||||
{
|
{
|
||||||
$this->expectException(\RuntimeException::class);
|
$this->expectException(RuntimeException::class);
|
||||||
|
|
||||||
$this->markTestSkipped('need to inject locale into url generator without request');
|
$this->markTestSkipped('need to inject locale into url generator without request');
|
||||||
$this->formFactory
|
$this->formFactory
|
||||||
|
@ -30,7 +30,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ThirdParty $thirdParty
|
* @param ThirdParty $thirdParty
|
||||||
* @param null|string $format
|
* @param string|null $format
|
||||||
*/
|
*/
|
||||||
public function normalize($thirdParty, $format = null, array $context = [])
|
public function normalize($thirdParty, $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user