Rector changes + namespace changes

This commit is contained in:
Julie Lenaerts 2024-04-23 17:43:23 +02:00
parent 63fe8070c4
commit ed3e0f889e
116 changed files with 816 additions and 831 deletions

View File

@ -21,7 +21,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface
{
// add specific role for this filter
public function addRole()
public function addRole(): ?string
{
// we do not need any new role for this filter, so we return null
return null;

View File

@ -28,6 +28,9 @@ return static function (RectorConfig $rectorConfig): void {
// register a single rule
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
$rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector::class);
$rectorConfig->rule(Rector\TypeDeclaration\Rector\Class_\MergeDateTimePropertyTypeDeclarationRector::class);
$rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationBasedOnParentClassMethodRector::class);
// part of the symfony 54 rules
$rectorConfig->rule(\Rector\Symfony\Symfony53\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector::class);

View File

@ -79,11 +79,10 @@ class ActivityReason
/**
* Set active.
*
* @param bool $active
*
* @return ActivityReason
*/
public function setActive($active)
public function setActive(bool $active)
{
$this->active = $active;
@ -110,11 +109,10 @@ class ActivityReason
/**
* Set name.
*
* @param array $name
*
* @return ActivityReason
*/
public function setName($name)
public function setName(array $name)
{
$this->name = $name;

View File

@ -100,7 +100,7 @@ class Charge extends AbstractElement implements HasCentersInterface
return $this;
}
public function setHelp($help)
public function setHelp(?string $help)
{
$this->help = $help;

View File

@ -172,11 +172,10 @@ class CustomField
/**
* Set active.
*
* @param bool $active
*
* @return CustomField
*/
public function setActive($active)
public function setActive(bool $active)
{
$this->active = $active;
@ -228,14 +227,14 @@ class CustomField
*
* @return CustomField
*/
public function setOrdering($order)
public function setOrdering(?float $order)
{
$this->ordering = $order;
return $this;
}
public function setRequired($required)
public function setRequired(bool $required)
{
$this->required = $required;
@ -245,7 +244,7 @@ class CustomField
/**
* @return $this
*/
public function setSlug($slug)
public function setSlug(?string $slug)
{
$this->slug = $slug;
@ -259,7 +258,7 @@ class CustomField
*
* @return CustomField
*/
public function setType($type)
public function setType(?string $type)
{
$this->type = $type;

View File

@ -129,7 +129,7 @@ class Option
/**
* @return $this
*/
public function setActive($active)
public function setActive(bool $active)
{
$this->active = $active;
@ -139,7 +139,7 @@ class Option
/**
* @return $this
*/
public function setInternalKey($internal_key)
public function setInternalKey(string $internal_key)
{
$this->internalKey = $internal_key;
@ -149,7 +149,7 @@ class Option
/**
* @return $this
*/
public function setKey($key)
public function setKey(?string $key)
{
$this->key = $key;

View File

@ -69,7 +69,7 @@ class CustomFieldsDefaultGroup
*
* @return CustomFieldsDefaultGroup
*/
public function setCustomFieldsGroup($customFieldsGroup)
public function setCustomFieldsGroup(?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldsGroup)
{
$this->customFieldsGroup = $customFieldsGroup;
@ -83,7 +83,7 @@ class CustomFieldsDefaultGroup
*
* @return CustomFieldsDefaultGroup
*/
public function setEntity($entity)
public function setEntity(?string $entity)
{
$this->entity = $entity;

View File

@ -169,7 +169,7 @@ class CustomFieldsGroup
*
* @return CustomFieldsGroup
*/
public function setEntity($entity)
public function setEntity(?string $entity)
{
$this->entity = $entity;

View File

@ -129,7 +129,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
return $this;
}
public function setUser($user): self
public function setUser(?\Chill\MainBundle\Entity\User $user): self
{
$this->user = $user;

View File

@ -86,7 +86,7 @@ class DocumentCategory
return $this;
}
public function setDocumentClass($documentClass): self
public function setDocumentClass(?string $documentClass): self
{
$this->documentClass = $documentClass;

View File

@ -55,14 +55,14 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt
return $this->scope;
}
public function setPerson($person): self
public function setPerson(\Chill\PersonBundle\Entity\Person $person): self
{
$this->person = $person;
return $this;
}
public function setScope($scope): self
public function setScope(?\Chill\MainBundle\Entity\Scope $scope): self
{
$this->scope = $scope;

View File

@ -269,7 +269,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return Event
*/
public function setName($label)
public function setName(?string $label)
{
$this->name = $label;

View File

@ -146,11 +146,10 @@ class EventType
/**
* Set active.
*
* @param bool $active
*
* @return EventType
*/
public function setActive($active)
public function setActive(bool $active)
{
$this->active = $active;

View File

@ -81,11 +81,10 @@ class Role
/**
* Set active.
*
* @param bool $active
*
* @return Role
*/
public function setActive($active)
public function setActive(bool $active)
{
$this->active = $active;

View File

@ -81,11 +81,10 @@ class Status
/**
* Set active.
*
* @param bool $active
*
* @return Status
*/
public function setActive($active)
public function setActive(bool $active)
{
$this->active = $active;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\ApiHelper;
namespace Chill\FranceTravailApiBundle\ApiHelper;
use Chill\MainBundle\Redis\ChillRedis;
use GuzzleHttp\Client;
@ -33,7 +33,7 @@ class ApiWrapper
*/
public const UNPERSONAL_BEARER = 'api_pemploi_bear_';
public function __construct(private $clientId, private $clientSecret, private readonly ChillRedis $redis)
public function __construct(private $clientId, private $clientSecret, private ChillRedis $redis)
{
$this->client = new Client([
'base_uri' => 'https://entreprise.pole-emploi.fr/connexion/oauth2/access_token',
@ -66,8 +66,7 @@ class ApiWrapper
// ]);
]);
} catch (ClientException $e) {
dump(Psr7\str($e->getRequest()));
dump(Psr7\str($e->getResponse()));
dump($e->getResponse());
}
$data = \json_decode((string) $response->getBody());

View File

@ -9,10 +9,11 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\ApiHelper;
namespace Chill\FranceTravailApiBundle\ApiHelper;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Utils;
use Psr\Log\LoggerInterface;
/**
@ -79,7 +80,7 @@ class PartenaireRomeAppellation
$this->logger
);
return \GuzzleHttp\json_decode((string) $response->getBody());
return Utils::jsonDecode((string) $response->getBody());
}
public function getAppellation($code)
@ -103,6 +104,6 @@ class PartenaireRomeAppellation
$this->logger
);
return \GuzzleHttp\json_decode((string) $response->getBody());
return Utils::jsonDecode((string) $response->getBody());
}
}

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\ApiHelper;
namespace Chill\FranceTravailApiBundle\ApiHelper;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
@ -30,7 +30,6 @@ trait ProcessRequestTrait
* @param Request $request the request
* @param array $parameters the requests parameters
*
* @return type
*/
protected function handleRequest(
Request $request,
@ -49,10 +48,6 @@ trait ProcessRequestTrait
/**
* internal method to handle recursive requests.
*
* @param type $counter
*
* @return type
*
* @throws BadResponseException
*/
private function handleRequestRecursive(

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle;
namespace Chill\FranceTravailApiBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;

View File

@ -9,15 +9,15 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\Controller;
namespace Chill\FranceTravailApiBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Chill\ChillFranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation;
use Chill\FranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
class RomeController extends Controller
class RomeController extends AbstractController
{
/**
* @var PartenaireRomeAppellation
@ -29,12 +29,7 @@ class RomeController extends Controller
$this->apiAppellation = $apiAppellation;
}
/**
* @Route("/{_locale}/pole-emploi/appellation/search.{_format}",
* name="chill_pole_emploi_api_appellation_search",
* requirements={ "_format" = "json" }
* )
*/
#[Route(path: '/{_locale}/france-travail/appellation/search.{_format}', name: 'chill_france_travail_api_appellation_search')]
public function appellationSearchAction(Request $request)
{
if (false === $request->query->has('q')) {

View File

@ -9,10 +9,11 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\DependencyInjection;
namespace Chill\FranceTravailApiBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
@ -21,7 +22,7 @@ use Symfony\Component\DependencyInjection\Loader;
*
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class ChillFranceTravailApiExtension extends Extension
class ChillFranceTravailApiExtension extends Extension implements PrependExtensionInterface
{
public function load(array $configs, ContainerBuilder $container)
{
@ -31,4 +32,21 @@ class ChillFranceTravailApiExtension extends Extension
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}
public function prepend(ContainerBuilder $container): void
{
$this->prependRoute($container);
}
protected function prependRoute(ContainerBuilder $container): void
{
// declare routes for france travail api bundle
$container->prependExtensionConfig('chill_main', [
'routing' => [
'resources' => [
'@ChillFranceTravailApiBundle/Resources/config/routing.yml',
],
],
]);
}
}

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\DependencyInjection;
namespace Chill\FranceTravailApiBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
@ -23,9 +23,8 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('chill_pole_emploi_api');
$treeBuilder = new TreeBuilder('chill_france_travail_api');
$rootNode = $treeBuilder->getRootNode();
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.

View File

@ -1,3 +1,3 @@
chill_poleemploi_api_controllers:
resource: "@ChillPoleEmploiApiBundle/Controller"
chill_france_travail_api_controllers:
resource: "@ChillFranceTravailApiBundle/Controller"
type: annotation

View File

@ -1,14 +1,14 @@
services:
Chill\ChillFranceTravailApiBundle\ApiHelper\ApiWrapper:
$clientId: '%pole_emploi_dev_client_id%'
$clientSecret: '%pole_emploi_dev_client_secret%'
Chill\FranceTravailApiBundle\ApiHelper\ApiWrapper:
# $clientId: '%pole_emploi_dev_client_id%'
# $clientSecret: '%pole_emploi_dev_client_secret%'
$redis: '@Chill\MainBundle\Redis\ChillRedis'
Chill\ChillFranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation:
$wrapper: '@Chill\ChillFranceTravailApiBundle\ApiHelper\ApiWrapper'
Chill\FranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation:
$wrapper: '@Chill\FranceTravailApiBundle\ApiHelper\ApiWrapper'
$logger: '@Psr\Log\LoggerInterface'
Chill\ChillFranceTravailApiBundle\Controller\RomeController:
Chill\FranceTravailApiBundle\Controller\RomeController:
arguments:
$apiAppellation: '@Chill\ChillFranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation'
$apiAppellation: '@Chill\FranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation'
tags: ['controller.service_arguments']

View File

@ -9,10 +9,10 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\Tests\ApiHelper;
namespace Chill\FranceTravailApiBundle\Tests\ApiHelper;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Chill\ChillFranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation;
use Chill\FranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation;
/**
* @author Julien Fastré <julien.fastre@champs-libres.coop>
@ -23,7 +23,7 @@ use Chill\ChillFranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation;
*/
class PartenaireRomeAppellationTest extends KernelTestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillFranceTravailApiBundle\Tests\Controller;
namespace Chill\FranceTravailApiBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle;
namespace Chill\JobBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;

View File

@ -9,12 +9,13 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Controller;
namespace Chill\JobBundle\Controller;
use Chill\PersonBundle\CRUD\Controller\EntityPersonCRUDController;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Chill\ChillJobBundle\Entity\Immersion;
use Chill\JobBundle\Entity\Immersion;
use Symfony\Component\HttpFoundation\Response;
/**
* CRUD Controller for reports (Frein, ...).
@ -23,12 +24,12 @@ class CSCrudReportController extends EntityPersonCRUDController
{
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
protected function onBeforeRedirectAfterSubmission(string $action, $entity, FormInterface $form, Request $request)
protected function onBeforeRedirectAfterSubmission(string $action, $entity, FormInterface $form, Request $request): ?Response
{
$next = $request->request->get('submit', 'save-and-close');
return match ($next) {
'save-and-close', 'delete-and-close' => $this->redirectToRoute('chill_csconnectes_csreport_index', [
'save-and-close', 'delete-and-close' => $this->redirectToRoute('chill_job_report_index', [
'person' => $entity->getPerson()->getId(),
]),
default => parent::onBeforeRedirectAfterSubmission($action, $entity, $form, $request),
@ -39,7 +40,7 @@ class CSCrudReportController extends EntityPersonCRUDController
{
if ('cscv' === $this->getCrudName()) {
$id = $request->query->get('duplicate_id', 0);
/** @var \Chill\ChillJobBundle\Entity\CV $cv */
/** @var \Chill\JobBundle\Entity\CV $cv */
$cv = $this->getEntity($action, $id, $request);
$em = $this->managerRegistry->getManager();
@ -60,7 +61,7 @@ class CSCrudReportController extends EntityPersonCRUDController
}
if ('projet_prof' === $this->getCrudName()) {
$id = $request->query->get('duplicate_id', 0);
/** @var \Chill\ChillJobBundle\Entity\ProjetProfessionnel $original */
/** @var \Chill\JobBundle\Entity\ProjetProfessionnel $original */
$original = $this->getEntity($action, $id, $request);
$new = parent::duplicateEntity($action, $request);
@ -115,7 +116,7 @@ class CSCrudReportController extends EntityPersonCRUDController
/**
* Edit immersion bilan.
*
* @param type $id
* @param int $id
*/
public function editBilan(Request $request, $id): \Symfony\Component\HttpFoundation\Response
{

View File

@ -9,15 +9,16 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Controller;
namespace Chill\JobBundle\Controller;
use Chill\PersonBundle\CRUD\Controller\OneToOneEntityPersonCRUDController;
use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Chill\ChillJobBundle\Form\CSPersonPersonalSituationType;
use Chill\ChillJobBundle\Form\CSPersonDispositifsType;
use Chill\JobBundle\Form\CSPersonPersonalSituationType;
use Chill\JobBundle\Form\CSPersonDispositifsType;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class CSPersonController extends OneToOneEntityPersonCRUDController
{
@ -41,18 +42,22 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
);
}
public function personalSituationView(Request $request, $id): Response
#[Route(path: '{_locale}/person/job/{person}/personal_situation', name: 'chill_job_personal_situation_view')]
public function personalSituationView(Request $request, $person): Response
{
return $this->viewAction('ps_situation_view', $request, $id);
return $this->viewAction('ps_situation_view', $request, $person);
}
public function dispositifsView(Request $request, $id): Response
#[Route(path: '{_locale}/person/job/{person}/dispositifs', name: 'chill_job_dispositifs_view')]
public function dispositifsView(Request $request, $person): Response
{
return $this->viewAction('dispositifs_view', $request, $id);
return $this->viewAction('dispositifs_view', $request, $person);
}
protected function generateRedirectOnCreateRoute($action, Request $request, $entity)
protected function generateRedirectOnCreateRoute($action, Request $request, $entity): string
{
$route = '';
switch ($action) {
case 'ps_situation_view':
$route = 'chill_crud_csperson_personal_situation_edit';
@ -82,7 +87,7 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
};
}
protected function onBeforeRedirectAfterSubmission(string $action, $entity, FormInterface $form, Request $request)
protected function onBeforeRedirectAfterSubmission(string $action, $entity, FormInterface $form, Request $request): ?Response
{
return match ($action) {
'ps_situation_edit' => $this->redirectToRoute(
@ -101,13 +106,13 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
{
switch ($action) {
case 'ps_situation_edit':
return '@CSConnectesSP/CSPerson/personal_situation_edit.html.twig';
return '@ChillJob/CSPerson/personal_situation_edit.html.twig';
case 'dispositifs_edit':
return '@CSConnectesSP/CSPerson/dispositifs_edit.html.twig';
return '@ChillJob/CSPerson/dispositifs_edit.html.twig';
case 'ps_situation_view':
return '@CSConnectesSP/CSPerson/personal_situation_view.html.twig';
return '@ChillJob/CSPerson/personal_situation_view.html.twig';
case 'dispositifs_view':
return '@CSConnectesSP/CSPerson/dispositifs_view.html.twig';
return '@ChillJob/CSPerson/dispositifs_view.html.twig';
default:
parent::getTemplateFor($action, $entity, $request);
}
@ -150,7 +155,7 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
throw new \LogicException("this formName is not supported: {$formName}");
break;
default:
return parent::generateLabelForButton($action, $formName, $form);
return 'Enregistrer';
}
}
}

View File

@ -9,26 +9,26 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Controller;
namespace Chill\JobBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Chill\PersonBundle\Entity\Person;
use Symfony\Component\HttpFoundation\Response;
use Chill\ChillJobBundle\Entity\Frein;
use Chill\ChillJobBundle\Entity\CV;
use Chill\ChillJobBundle\Entity\Immersion;
use Chill\ChillJobBundle\Entity\ProjetProfessionnel;
use Chill\JobBundle\Entity\Frein;
use Chill\JobBundle\Entity\CV;
use Chill\JobBundle\Entity\Immersion;
use Chill\JobBundle\Entity\ProjetProfessionnel;
use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Chill\ChillJobBundle\Security\Authorization\CSConnectesVoter;
use Chill\JobBundle\Security\Authorization\CSConnectesVoter;
class CSReportController extends Controller
class CSReportController extends AbstractController
{
/**
* @Route("{_locale}/csconnectes/person/{person}/report",
* name="chill_csconnectes_csreport_index"
* )
*/
public function __construct(private \Doctrine\Persistence\ManagerRegistry $managerRegistry)
{
}
#[Route(path: '{_locale}/person/job/{person}/report', name: 'chill_job_report_index')]
public function index(Person $person): Response
{
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person, 'The access to '
@ -36,12 +36,12 @@ class CSReportController extends Controller
$reports = $this->getReports($person);
return $this->render('@CSConnectesSP/Report/index.html.twig', \array_merge([
return $this->render('@ChillJob/Report/index.html.twig', \array_merge([
'person' => $person,
], $reports));
}
protected function getReports(Person $person)
protected function getReports(Person $person): array
{
$results = [];
@ -65,7 +65,7 @@ class CSReportController extends Controller
'immersions' => ['debutDate' => 'DESC'],
default => ['reportDate' => 'DESC'],
};
$results[$key] = $this->getDoctrine()->getManager()
$results[$key] = $this->managerRegistry->getManager()
->getRepository($className)
->findByPerson($person, $ordering);
}

View File

@ -9,10 +9,14 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\DependencyInjection;
namespace Chill\JobBundle\DependencyInjection;
use Chill\JobBundle\Controller\CSPersonController;
use Chill\JobBundle\Entity\CSPerson;
use Chill\JobBundle\Form\CSPersonPersonalSituationType;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
@ -21,17 +25,70 @@ use Symfony\Component\DependencyInjection\Loader;
*
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class ChillJobExtension extends Extension
class ChillJobExtension extends Extension implements PrependExtensionInterface
{
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
$loader->load('services/3party_type.yml');
$loader->load('services/controller.yml');
$loader->load('services/form.yml');
$loader->load('services/export.yml');
$loader->load('services/menu.yml');
$loader->load('services/security.yml');
// exports: list_CSperson override list_person
$container->setAlias('chill.person.export.list_person', \Chill\ChillJobBundle\Export\ListCSPerson::class);
$container->setAlias('chill.person.export.list_person', \Chill\JobBundle\Export\ListCSPerson::class);
}
public function prepend(ContainerBuilder $container): void
{
$this->prependRoute($container);
}
/* protected function prependCruds(ContainerBuilder $container)
{
$container->prependExtensionConfig('chill_main', [
'cruds' => [
[
'class' => CSPerson::class,
'controller' => CSPersonController::class,
'name' => 'admin_personal_situation',
// 'base_path' => '/admin/main/personal_situation',
'base_role' => 'ROLE_USER',
'form_class' => CSPersonPersonalSituationType::class,
'actions' => [
'index' => [
'role' => 'ROLE_USER',
'template' => '@ChillPerson/CRUD/index.html.twig',
],
'new' => [
'role' => 'ROLE_USER',
'template' => '@ChillPerson/CRUD/new.html.twig',
],
'edit' => [
'role' => 'ROLE_USER',
'template' => '@ChillPerson/CRUD/edit.html.twig',
],
],
]
],
]);
}*/
protected function prependRoute(ContainerBuilder $container): void
{
// declare routes for job bundle
$container->prependExtensionConfig('chill_main', [
'routing' => [
'resources' => [
'@ChillJobBundle/Resources/config/routing.yml',
],
],
]);
}
}

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\DependencyInjection;
namespace Chill\JobBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
@ -23,8 +23,8 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('cs_connectes_sp');
$treeBuilder = new TreeBuilder('chill_job');
$rootNode = $treeBuilder->getRootNode();
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for

View File

@ -1,6 +1,6 @@
<?php
namespace Chill\ChillJobBundle\Entity;
namespace Chill\JobBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\PersonBundle\Entity\Person;
@ -15,7 +15,7 @@ use ChampsLibres\AsyncUploaderBundle\Validator\Constraints\AsyncFileExists;
* CSPerson
*/
#[ORM\Table(name: 'chill_csconnectes.cs_person')]
#[ORM\Entity(repositoryClass: \Chill\ChillJobBundle\Repository\CSPersonRepository::class)]
#[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CSPersonRepository::class)]
class CSPerson
{
/**
@ -159,14 +159,14 @@ class CSPerson
* @var double
*/
#[ORM\Column(name: 'CPFMontant', type: \Doctrine\DBAL\Types\Types::DECIMAL, nullable: true, precision: 10, scale: 2)] // Assert\GreaterOrEqualThan(0)
private ?string $cPFMontant = null;
private ?float $cPFMontant = null;
/**
*
* @var double
*/
#[ORM\Column(name: 'acomptedif', type: \Doctrine\DBAL\Types\Types::DECIMAL, nullable: true, precision: 10, scale: 2)] // Assert\GreaterOrEqualThan(0)
private ?string $acompteDIF = null;
private ?float $acompteDIF = null;
public const ACCOMPAGNEMENTS = [
'plie',
@ -255,7 +255,7 @@ class CSPerson
* @var bool
*/
#[ORM\Column(name: 'NEETEligibilite', type: \Doctrine\DBAL\Types\Types::STRING, nullable: true)]
private ?string $nEETEligibilite = null;
private ?bool $nEETEligibilite = null;
/**
* @var \DateTimeInterface
@ -479,11 +479,10 @@ class CSPerson
/**
* Set situationLogement.
*
* @param string|null $situationLogement
*
* @return CSPerson
*/
public function setSituationLogement($situationLogement = null)
public function setSituationLogement(?string $situationLogement = null)
{
$this->situationLogement = $situationLogement;
@ -503,11 +502,10 @@ class CSPerson
/**
* Set enfantACharge.
*
* @param int|null $enfantACharge
*
* @return CSPerson
*/
public function setEnfantACharge($enfantACharge = null)
public function setEnfantACharge(?int $enfantACharge = null)
{
$this->enfantACharge = $enfantACharge;
@ -527,8 +525,6 @@ class CSPerson
/**
* Set niveauMaitriseLangue.
*
* @param json $niveauMaitriseLangue
*
* @return CSPerson
*/
public function setNiveauMaitriseLangue($niveauMaitriseLangue)
@ -583,7 +579,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setVehiculePersonnel($vehiculePersonnel)
public function setVehiculePersonnel(?bool $vehiculePersonnel)
{
$this->vehiculePersonnel = $vehiculePersonnel;
@ -603,8 +599,6 @@ class CSPerson
/**
* Set permisConduire.
*
* @param json $permisConduire
*
* @return CSPerson
*/
public function setPermisConduire($permisConduire)
@ -617,7 +611,6 @@ class CSPerson
/**
* Get permisConduire.
*
* @return json
*/
public function getPermisConduire()
{
@ -631,7 +624,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setSituationProfessionnelle($situationProfessionnelle)
public function setSituationProfessionnelle(?string $situationProfessionnelle)
{
$this->situationProfessionnelle = $situationProfessionnelle;
@ -655,7 +648,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setDateFinDernierEmploi($dateFinDernierEmploi)
public function setDateFinDernierEmploi(?\DateTimeInterface $dateFinDernierEmploi)
{
$this->dateFinDernierEmploi = $dateFinDernierEmploi;
@ -675,7 +668,6 @@ class CSPerson
/**
* Set typeContrat.
*
* @param json $typeContrat
*
* @return CSPerson
*/
@ -689,7 +681,6 @@ class CSPerson
/**
* Get typeContrat.
*
* @return json
*/
public function getTypeContrat()
{
@ -699,8 +690,6 @@ class CSPerson
/**
* Set ressources.
*
* @param json $ressources
*
* @return CSPerson
*/
public function setRessources($ressources)
@ -713,7 +702,6 @@ class CSPerson
/**
* Get ressources.
*
* @return json
*/
public function getRessources()
{
@ -727,7 +715,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setRessourcesComment($ressourcesComment)
public function setRessourcesComment(?string $ressourcesComment)
{
$this->ressourcesComment = $ressourcesComment;
@ -751,7 +739,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setRessourceDate1Versement($ressourceDate1Versement)
public function setRessourceDate1Versement(?\DateTimeInterface $ressourceDate1Versement)
{
$this->ressourceDate1Versement = $ressourceDate1Versement;
@ -761,7 +749,7 @@ class CSPerson
/**
* Get ressourceDate1Versement.
*
* @return \DateTime
* @return \DateTimeInterface
*/
public function getRessourceDate1Versement()
{
@ -773,7 +761,7 @@ class CSPerson
return $this->cPFMontant;
}
function setCPFMontant($cPFMontant)
function setCPFMontant(?float $cPFMontant)
{
$this->cPFMontant = $cPFMontant;
@ -783,8 +771,6 @@ class CSPerson
/**
* Set accompagnement.
*
* @param json $accompagnement
*
* @return CSPerson
*/
public function setAccompagnement($accompagnement)
@ -797,7 +783,6 @@ class CSPerson
/**
* Get accompagnement.
*
* @return json
*/
public function getAccompagnement()
{
@ -811,7 +796,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setAccompagnementRQTHDate($accompagnementRQTHDate)
public function setAccompagnementRQTHDate(?\DateTimeInterface $accompagnementRQTHDate)
{
$this->accompagnementRQTHDate = $accompagnementRQTHDate;
@ -821,7 +806,7 @@ class CSPerson
/**
* Get accompagnementRQTHDate.
*
* @return \DateTime
* @return \DateTimeInterface
*/
public function getAccompagnementRQTHDate()
{
@ -835,7 +820,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setAccompagnementComment($accompagnementComment)
public function setAccompagnementComment(?string $accompagnementComment)
{
$this->accompagnementComment = $accompagnementComment;
@ -859,7 +844,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setPoleEmploiId($poleEmploiId)
public function setPoleEmploiId(?string $poleEmploiId)
{
$this->poleEmploiId = $poleEmploiId;
@ -883,7 +868,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setPoleEmploiInscriptionDate($poleEmploiInscriptionDate)
public function setPoleEmploiInscriptionDate(?\DateTimeInterface $poleEmploiInscriptionDate)
{
$this->poleEmploiInscriptionDate = $poleEmploiInscriptionDate;
@ -893,7 +878,7 @@ class CSPerson
/**
* Get poleEmploiInscriptionDate.
*
* @return \DateTime
* @return \DateTimeInterface
*/
public function getPoleEmploiInscriptionDate()
{
@ -907,7 +892,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setCafId($cafId)
public function setCafId(?string $cafId)
{
$this->cafId = $cafId;
@ -931,7 +916,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setCafInscriptionDate($cafInscriptionDate)
public function setCafInscriptionDate(?\DateTimeInterface $cafInscriptionDate)
{
$this->cafInscriptionDate = $cafInscriptionDate;
@ -941,7 +926,7 @@ class CSPerson
/**
* Get cafInscriptionDate.
*
* @return \DateTime
* @return \DateTimeInterface
*/
public function getCafInscriptionDate()
{
@ -955,7 +940,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setCERInscriptionDate($cERInscriptionDate)
public function setCERInscriptionDate(?\DateTimeInterface $cERInscriptionDate)
{
$this->cERInscriptionDate = $cERInscriptionDate;
@ -965,7 +950,7 @@ class CSPerson
/**
* Get cERInscriptionDate.
*
* @return \DateTime
* @return \DateTimeInterface
*/
public function getCERInscriptionDate()
{
@ -979,7 +964,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setPPAEInscriptionDate($pPAEInscriptionDate)
public function setPPAEInscriptionDate(?\DateTimeInterface $pPAEInscriptionDate)
{
$this->pPAEInscriptionDate = $pPAEInscriptionDate;
@ -989,7 +974,7 @@ class CSPerson
/**
* Get pPAEInscriptionDate.
*
* @return \DateTime
* @return \DateTimeInterface
*/
public function getPPAEInscriptionDate()
{
@ -1006,12 +991,12 @@ class CSPerson
return $this->pPAESignataire;
}
public function setCERSignataire($cERSignataire)
public function setCERSignataire(?string $cERSignataire)
{
$this->cERSignataire = $cERSignataire;
}
public function setPPAESignataire($pPAESignataire)
public function setPPAESignataire(?string $pPAESignataire)
{
$this->pPAESignataire = $pPAESignataire;
}
@ -1024,7 +1009,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setNEETEligibilite($nEETEligibilite)
public function setNEETEligibilite(?bool $nEETEligibilite)
{
$this->nEETEligibilite = $nEETEligibilite;
@ -1048,7 +1033,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setNEETCommissionDate($nEETCommissionDate)
public function setNEETCommissionDate(?\DateTimeInterface $nEETCommissionDate)
{
$this->nEETCommissionDate = $nEETCommissionDate;
@ -1058,7 +1043,7 @@ class CSPerson
/**
* Get nEETCommissionDate.
*
* @return \DateTime
* @return \DateTimeInterface
*/
public function getNEETCommissionDate()
{
@ -1072,7 +1057,7 @@ class CSPerson
*
* @return CSPerson
*/
public function setFSEMaDemarcheCode($fSEMaDemarcheCode)
public function setFSEMaDemarcheCode(?string $fSEMaDemarcheCode)
{
$this->fSEMaDemarcheCode = $fSEMaDemarcheCode;
@ -1094,7 +1079,7 @@ class CSPerson
return $this->dispositifsNotes;
}
function setDispositifsNotes($dispositifsNotes)
function setDispositifsNotes(?string $dispositifsNotes)
{
$this->dispositifsNotes = $dispositifsNotes;
}
@ -1305,7 +1290,7 @@ class CSPerson
return $this;
}
public function setMobiliteNotes($mobiliteNotes)
public function setMobiliteNotes(?string $mobiliteNotes)
{
$this->mobiliteNotes = $mobiliteNotes;
@ -1322,31 +1307,31 @@ class CSPerson
return $this->documentAttestationSecuriteSociale;
}
public function setSituationLogementPrecision($situationLogementPrecision)
public function setSituationLogementPrecision(?string $situationLogementPrecision)
{
$this->situationLogementPrecision = $situationLogementPrecision;
return $this;
}
public function setAcompteDIF($acompteDIF)
public function setAcompteDIF(?float $acompteDIF)
{
$this->acompteDIF = $acompteDIF;
return $this;
}
public function setHandicapIs($handicapIs)
public function setHandicapIs(?bool $handicapIs)
{
$this->handicapIs = $handicapIs;
return $this;
}
public function setHandicapNotes($handicapNotes)
public function setHandicapNotes(?string $handicapNotes)
{
$this->handicapNotes = $handicapNotes;
return $this;
}
public function setHandicapRecommandation($handicapRecommandation)
public function setHandicapRecommandation(?string $handicapRecommandation)
{
$this->handicapRecommandation = $handicapRecommandation;
return $this;
@ -1364,7 +1349,7 @@ class CSPerson
return $this;
}
public function getDateContratIEJ(): ?\DateTime
public function getDateContratIEJ(): \DateTimeInterface
{
return $this->dateContratIEJ;
}
@ -1380,13 +1365,13 @@ class CSPerson
return $this->typeContratAide;
}
public function setTypeContratAide($typeContratAide)
public function setTypeContratAide(?string $typeContratAide)
{
$this->typeContratAide = $typeContratAide;
return $this;
}
public function getDateAvenantIEJ(): ?\DateTime
public function getDateAvenantIEJ(): \DateTimeInterface
{
return $this->dateAvenantIEJ;
}

View File

@ -9,8 +9,9 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Entity;
namespace Chill\JobBundle\Entity;
use Doctrine\Common\Collections\Order;
use Doctrine\ORM\Mapping as ORM;
use Chill\PersonBundle\Entity\Person;
use Doctrine\Common\Collections\ArrayCollection;
@ -21,7 +22,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* CV.
*/
#[ORM\Table(name: 'chill_csconnectes.cv')]
#[ORM\Entity(repositoryClass: \Chill\ChillJobBundle\Repository\CVRepository::class)]
#[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CVRepository::class)]
class CV implements \Stringable
{
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -71,18 +72,18 @@ class CV implements \Stringable
/**
* @Assert\Valid(traverse=true)
* @var \Doctrine\Common\Collections\Collection<int, \Chill\ChillJobBundle\Entity\CV\Formation>
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\CV\Formation>
*/
#[ORM\OneToMany(targetEntity: CV\Formation::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
#[ORM\OrderBy(['startDate' => \Doctrine\Common\Collections\Criteria::DESC, 'endDate' => 'DESC'])]
#[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
private Collection $formations;
/**
* @Assert\Valid(traverse=true)
* @var \Doctrine\Common\Collections\Collection<int, \Chill\ChillJobBundle\Entity\CV\Experience>
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\CV\Experience>
*/
#[ORM\OneToMany(targetEntity: CV\Experience::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
#[ORM\OrderBy(['startDate' => \Doctrine\Common\Collections\Criteria::DESC, 'endDate' => 'DESC'])]
#[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
private Collection $experiences;
#[ORM\ManyToOne(targetEntity: Person::class)]
@ -108,11 +109,10 @@ class CV implements \Stringable
/**
* Set reportDate.
*
* @param \DateTime $reportDate
*
* @return CV
*/
public function setReportDate($reportDate)
public function setReportDate(\DateTime $reportDate): self
{
$this->reportDate = $reportDate;
@ -122,9 +122,8 @@ class CV implements \Stringable
/**
* Get reportDate.
*
* @return \DateTime
*/
public function getReportDate()
public function getReportDate(): \DateTimeInterface|null
{
return $this->reportDate;
}
@ -136,7 +135,7 @@ class CV implements \Stringable
*
* @return CV
*/
public function setFormationLevel($formationLevel = null)
public function setFormationLevel(string $formationLevel = null): self
{
$this->formationLevel = $formationLevel;
@ -156,11 +155,10 @@ class CV implements \Stringable
/**
* Set formationType.
*
* @param string $formationType
*
* @return CV
*/
public function setFormationType($formationType)
public function setFormationType(string $formationType): self
{
$this->formationType = $formationType;
@ -172,7 +170,7 @@ class CV implements \Stringable
*
* @return string
*/
public function getFormationType()
public function getFormationType(): ?string
{
return $this->formationType;
}
@ -180,11 +178,9 @@ class CV implements \Stringable
/**
* Set spokenLanguages.
*
* @param json|null $spokenLanguages
*
* @return CV
*/
public function setSpokenLanguages($spokenLanguages = null)
public function setSpokenLanguages($spokenLanguages = null): self
{
$this->spokenLanguages = $spokenLanguages;
@ -194,9 +190,8 @@ class CV implements \Stringable
/**
* Get spokenLanguages.
*
* @return json|null
*/
public function getSpokenLanguages()
public function getSpokenLanguages(): array
{
return $this->spokenLanguages ?? [];
}
@ -208,7 +203,7 @@ class CV implements \Stringable
*
* @return CV
*/
public function setNotes($notes = null)
public function setNotes(string $notes = null): self
{
$this->notes = $notes;
@ -220,7 +215,7 @@ class CV implements \Stringable
*
* @return string|null
*/
public function getNotes()
public function getNotes(): ?string
{
return $this->notes;
}
@ -235,7 +230,7 @@ class CV implements \Stringable
return $this->experiences;
}
public function setFormations(Collection $formations)
public function setFormations(Collection $formations): self
{
foreach ($formations as $formation) {
/* @var CV\Formation $formation */
@ -246,7 +241,7 @@ class CV implements \Stringable
return $this;
}
public function addFormation(CV\Formation $formation)
public function addFormation(CV\Formation $formation): self
{
if ($this->formations->contains($formation)) {
return $this;
@ -258,7 +253,7 @@ class CV implements \Stringable
return $this;
}
public function removeFormation(CV\Formation $formation)
public function removeFormation(CV\Formation $formation): self
{
if (false === $this->formations->contains($formation)) {
return $this;
@ -270,7 +265,7 @@ class CV implements \Stringable
return $this;
}
public function setExperiences(Collection $experiences)
public function setExperiences(Collection $experiences): self
{
foreach ($experiences as $experience) {
/* @var CV\Experience $experience */
@ -282,7 +277,7 @@ class CV implements \Stringable
return $this;
}
public function addExperience(CV\Experience $experience)
public function addExperience(CV\Experience $experience): self
{
if ($this->experiences->contains($experience)) {
return $this;
@ -294,7 +289,7 @@ class CV implements \Stringable
return $this;
}
public function removeExperience(CV\Experience $experience)
public function removeExperience(CV\Experience $experience): self
{
if (false === $this->experiences->contains($experience)) {
return $this;

View File

@ -9,17 +9,17 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Entity\CV;
namespace Chill\JobBundle\Entity\CV;
use Doctrine\ORM\Mapping as ORM;
use Chill\ChillJobBundle\Entity\CV;
use Chill\JobBundle\Entity\CV;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Experience.
*/
#[ORM\Table(name: 'chill_csconnectes.cv_experience')]
#[ORM\Entity(repositoryClass: \Chill\ChillJobBundle\Repository\CV\ExperienceRepository::class)]
#[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CV\ExperienceRepository::class)]
class Experience
{
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -72,7 +72,7 @@ class Experience
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
@ -80,11 +80,10 @@ class Experience
/**
* Set poste.
*
* @param string|null $poste
*
* @return Experience
*/
public function setPoste($poste = null)
public function setPoste(?string $poste = null): self
{
$this->poste = $poste;
@ -96,7 +95,7 @@ class Experience
*
* @return string|null
*/
public function getPoste()
public function getPoste(): ?string
{
return $this->poste;
}
@ -104,11 +103,10 @@ class Experience
/**
* Set structure.
*
* @param string|null $structure
*
* @return Experience
*/
public function setStructure($structure = null)
public function setStructure(?string $structure = null): self
{
$this->structure = $structure;
@ -120,7 +118,7 @@ class Experience
*
* @return string|null
*/
public function getStructure()
public function getStructure(): ?string
{
return $this->structure;
}
@ -132,7 +130,7 @@ class Experience
*
* @return Experience
*/
public function setStartDate($startDate = null)
public function setStartDate(?\DateTimeInterface $startDate = null): self
{
$this->startDate = $startDate;
@ -142,7 +140,7 @@ class Experience
/**
* Get startDate.
*
* @return \DateTime|null
* @return \DateTimeInterface
*/
public function getStartDate()
{
@ -156,7 +154,7 @@ class Experience
*
* @return Experience
*/
public function setEndDate($endDate = null)
public function setEndDate(?\DateTimeInterface $endDate = null): self
{
$this->endDate = $endDate;
@ -166,7 +164,7 @@ class Experience
/**
* Get endDate.
*
* @return \DateTime|null
* @return \DateTimeInterface
*/
public function getEndDate()
{
@ -180,7 +178,7 @@ class Experience
*
* @return Experience
*/
public function setContratType($contratType)
public function setContratType(?string $contratType): self
{
$this->contratType = $contratType;
@ -192,7 +190,7 @@ class Experience
*
* @return string
*/
public function getContratType()
public function getContratType(): ?string
{
return $this->contratType;
}
@ -204,7 +202,7 @@ class Experience
*
* @return Experience
*/
public function setNotes($notes)
public function setNotes(?string $notes): self
{
$this->notes = $notes;
@ -216,7 +214,7 @@ class Experience
*
* @return string
*/
public function getNotes()
public function getNotes(): ?string
{
return $this->notes;
}
@ -226,7 +224,7 @@ class Experience
return $this->CV;
}
public function setCV(?CV $CV = null)
public function setCV(?CV $CV = null): self
{
$this->CV = $CV;

View File

@ -9,17 +9,17 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Entity\CV;
namespace Chill\JobBundle\Entity\CV;
use Doctrine\ORM\Mapping as ORM;
use Chill\ChillJobBundle\Entity\CV;
use Chill\JobBundle\Entity\CV;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Formation.
*/
#[ORM\Table(name: 'chill_csconnectes.cv_formation')]
#[ORM\Entity(repositoryClass: \Chill\ChillJobBundle\Repository\CV\FormationRepository::class)]
#[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\CV\FormationRepository::class)]
class Formation
{
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -81,7 +81,7 @@ class Formation
*
* @return Formation
*/
public function setTitle($title)
public function setTitle(?string $title)
{
$this->title = $title;
@ -105,7 +105,7 @@ class Formation
*
* @return Formation
*/
public function setStartDate($startDate = null)
public function setStartDate(?\DateTimeInterface $startDate = null)
{
$this->startDate = $startDate;
@ -115,7 +115,7 @@ class Formation
/**
* Get startDate.
*
* @return \DateTime|null
* @return \DateTimeInterface
*/
public function getStartDate()
{
@ -129,7 +129,7 @@ class Formation
*
* @return Formation
*/
public function setEndDate($endDate = null)
public function setEndDate(?\DateTimeInterface $endDate = null)
{
$this->endDate = $endDate;
@ -139,7 +139,7 @@ class Formation
/**
* Get endDate.
*
* @return \DateTime|null
* @return \DateTimeInterface
*/
public function getEndDate()
{
@ -149,11 +149,9 @@ class Formation
/**
* Set diplomaObtained.
*
* @param json|null $diplomaObtained
*
* @return Formation
*/
public function setDiplomaObtained($diplomaObtained = null)
public function setDiplomaObtained(?string $diplomaObtained = null)
{
$this->diplomaObtained = $diplomaObtained;
@ -162,8 +160,6 @@ class Formation
/**
* Get diplomaObtained.
*
* @return json|null
*/
public function getDiplomaObtained()
{
@ -173,11 +169,10 @@ class Formation
/**
* Set diplomaReconnue.
*
* @param string|null $diplomaReconnue
*
* @return Formation
*/
public function setDiplomaReconnue($diplomaReconnue = null)
public function setDiplomaReconnue(?string $diplomaReconnue = null): self
{
$this->diplomaReconnue = $diplomaReconnue;
@ -189,7 +184,7 @@ class Formation
*
* @return string|null
*/
public function getDiplomaReconnue()
public function getDiplomaReconnue(): ?string
{
return $this->diplomaReconnue;
}
@ -201,7 +196,7 @@ class Formation
*
* @return Formation
*/
public function setOrganisme($organisme)
public function setOrganisme(?string $organisme): self
{
$this->organisme = $organisme;
@ -213,7 +208,7 @@ class Formation
*
* @return string
*/
public function getOrganisme()
public function getOrganisme(): ?string
{
return $this->organisme;
}
@ -223,7 +218,7 @@ class Formation
return $this->CV;
}
public function setCV(?CV $CV = null)
public function setCV(?CV $CV = null): self
{
$this->CV = $CV;

View File

@ -9,8 +9,9 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Entity;
namespace Chill\JobBundle\Entity;
use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM;
use Chill\PersonBundle\Entity\HasPerson;
use Symfony\Component\Validator\Constraints as Assert;
@ -20,7 +21,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
* Frein.
*/
#[ORM\Table(name: 'chill_csconnectes.frein')]
#[ORM\Entity(repositoryClass: \Chill\ChillJobBundle\Repository\FreinRepository::class)]
#[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\FreinRepository::class)]
class Frein implements HasPerson, \Stringable
{
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -78,152 +79,92 @@ class Frein implements HasPerson, \Stringable
private ?string $notesEmploi = '';
/**
* @var Person
*
* @ORM\ManytoOne(
* targetEntity="Chill\PersonBundle\Entity\Person")
*
* @Assert\NotNull()
*/
private $person;
private Person $person;
public function __construct()
{
$this->reportDate = new \DateTime('today');
}
/**
* Get id.
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
/**
* Set reportDate.
*
* @param \DateTime $reportDate
*
* @return Frein
*/
public function setReportDate($reportDate)
public function setReportDate(?\DateTimeInterface $reportDate): self
{
$this->reportDate = $reportDate;
return $this;
}
/**
* Get reportDate.
*
* @return \DateTime
*/
public function getReportDate()
public function getReportDate(): ?\DateTimeInterface
{
return $this->reportDate;
}
/**
* Set freinsPerso.
*
* @param string[] $freinsPerso
*
* @return Frein
*/
public function setFreinsPerso(array $freinsPerso = [])
public function setFreinsPerso(array $freinsPerso = []): self
{
$this->freinsPerso = $freinsPerso;
return $this;
}
/**
* Get freinsPerso.
*
* @return json
*/
public function getFreinsPerso()
public function getFreinsPerso(): array
{
return $this->freinsPerso;
}
/**
* Set notesPerso.
*
* @return Frein
*/
public function setNotesPerso(?string $notesPerso = null)
public function setNotesPerso(?string $notesPerso = null): self
{
$this->notesPerso = (string) $notesPerso;
return $this;
}
/**
* Get notesPerso.
*
* @return string
*/
public function getNotesPerso()
public function getNotesPerso(): ?string
{
return $this->notesPerso;
}
/**
* Set freinsEmploi.
*
* @param json $freinsEmploi
*
* @return Frein
*/
public function setFreinsEmploi(array $freinsEmploi = [])
public function setFreinsEmploi(array $freinsEmploi = []): self
{
$this->freinsEmploi = $freinsEmploi;
return $this;
}
/**
* Get freinsEmploi.
*
* @return json
*/
public function getFreinsEmploi()
public function getFreinsEmploi(): array
{
return $this->freinsEmploi;
}
/**
* Set notesEmploi.
*
* @return Frein
*/
public function setNotesEmploi(?string $notesEmploi = null)
public function setNotesEmploi(?string $notesEmploi = null): self
{
$this->notesEmploi = (string) $notesEmploi;
return $this;
}
/**
* Get notesEmploi.
*
* @return string
*/
public function getNotesEmploi()
public function getNotesEmploi(): ?string
{
return $this->notesEmploi;
}
public function getPerson(): ?\Chill\PersonBundle\Entity\Person
public function getPerson(): ?Person
{
return $this->person;
}
public function setPerson(?\Chill\PersonBundle\Entity\Person $person = null): HasPerson
public function setPerson(?Person $person = null): HasPerson
{
$this->person = $person;
@ -231,13 +172,9 @@ class Frein implements HasPerson, \Stringable
}
/**
* Vérifie qu'au moins un frein a été coché parmi les freins perso + emploi.
*
* @param array $payload
*
* @Assert\Callback()
*/
public function validateFreinsCount(ExecutionContextInterface $context, $payload)
public function validateFreinsCount(ExecutionContextInterface $context, $payload): void
{
$nb = count($this->getFreinsEmploi()) + count($this->getFreinsPerso());

View File

@ -1,8 +1,8 @@
<?php
namespace Chill\ChillJobBundle\Entity;
namespace Chill\JobBundle\Entity;
use Chill\ChillJobBundle\Repository\ImmersionRepository;
use Chill\JobBundle\Repository\ImmersionRepository;
use Doctrine\ORM\Mapping as ORM;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\PersonBundle\Entity\Person;
@ -439,11 +439,10 @@ class Immersion implements \Stringable
/**
* Set domaineActivite.
*
* @param string|null $domaineActivite
*
* @return Immersion
*/
public function setDomaineActivite($domaineActivite = null)
public function setDomaineActivite(?string $domaineActivite = null)
{
$this->domaineActivite = $domaineActivite;
@ -463,11 +462,10 @@ class Immersion implements \Stringable
/**
* Set tuteurName.
*
* @param string|null $tuteurName
*
* @return Immersion
*/
public function setTuteurName($tuteurName = null)
public function setTuteurName(?string $tuteurName = null)
{
$this->tuteurName = $tuteurName;
@ -487,11 +485,10 @@ class Immersion implements \Stringable
/**
* Set tuteurFonction.
*
* @param string|null $tuteurFonction
*
* @return Immersion
*/
public function setTuteurFonction($tuteurFonction = null)
public function setTuteurFonction(?string $tuteurFonction = null)
{
$this->tuteurFonction = $tuteurFonction;
@ -511,11 +508,10 @@ class Immersion implements \Stringable
/**
* Set tuteurPhoneNumber.
*
* @param string|null $tuteurPhoneNumber
*
* @return Immersion
*/
public function setTuteurPhoneNumber($tuteurPhoneNumber = null)
public function setTuteurPhoneNumber(?string $tuteurPhoneNumber = null)
{
$this->tuteurPhoneNumber = $tuteurPhoneNumber;
@ -535,11 +531,10 @@ class Immersion implements \Stringable
/**
* Set structureAccName.
*
* @param string|null $structureAccName
*
* @return Immersion
*/
public function setStructureAccName($structureAccName = null)
public function setStructureAccName(?string $structureAccName = null)
{
$this->structureAccName = $structureAccName;
@ -563,7 +558,7 @@ class Immersion implements \Stringable
*
* @return Immersion
*/
public function setStructureAccPhonenumber($structureAccPhonenumber)
public function setStructureAccPhonenumber(?string $structureAccPhonenumber)
{
$this->structureAccPhonenumber = $structureAccPhonenumber;
@ -583,11 +578,10 @@ class Immersion implements \Stringable
/**
* Set posteDescriptif.
*
* @param string|null $posteDescriptif
*
* @return Immersion
*/
public function setPosteDescriptif($posteDescriptif = null)
public function setPosteDescriptif(?string $posteDescriptif = null)
{
$this->posteDescriptif = $posteDescriptif;
@ -607,11 +601,10 @@ class Immersion implements \Stringable
/**
* Set posteTitle.
*
* @param string|null $posteTitle
*
* @return Immersion
*/
public function setPosteTitle($posteTitle = null)
public function setPosteTitle(?string $posteTitle = null)
{
$this->posteTitle = $posteTitle;
@ -631,11 +624,10 @@ class Immersion implements \Stringable
/**
* Set posteLieu.
*
* @param string|null $posteLieu
*
* @return Immersion
*/
public function setPosteLieu($posteLieu = null)
public function setPosteLieu(?string $posteLieu = null)
{
$this->posteLieu = $posteLieu;
@ -659,7 +651,7 @@ class Immersion implements \Stringable
*
* @return Immersion
*/
public function setDebutDate($debutDate = null)
public function setDebutDate(?\DateTimeInterface $debutDate = null)
{
$this->debutDate = $debutDate;
@ -710,11 +702,10 @@ class Immersion implements \Stringable
/**
* Set horaire.
*
* @param string|null $horaire
*
* @return Immersion
*/
public function setHoraire($horaire = null)
public function setHoraire(?string $horaire = null)
{
$this->horaire = $horaire;
@ -760,7 +751,7 @@ class Immersion implements \Stringable
return $this->objectifsAutre;
}
public function setObjectifsAutre($objectifsAutre)
public function setObjectifsAutre(?string $objectifsAutre)
{
$this->objectifsAutre = $objectifsAutre;
@ -818,11 +809,10 @@ class Immersion implements \Stringable
/**
* Set principalesActivites.
*
* @param string|null $principalesActivites
*
* @return Immersion
*/
public function setPrincipalesActivites($principalesActivites = null)
public function setPrincipalesActivites(?string $principalesActivites = null)
{
$this->principalesActivites = $principalesActivites;
@ -842,11 +832,10 @@ class Immersion implements \Stringable
/**
* Set competencesAcquises.
*
* @param string|null $competencesAcquises
*
* @return Immersion
*/
public function setCompetencesAcquises($competencesAcquises = null)
public function setCompetencesAcquises(?string $competencesAcquises = null)
{
$this->competencesAcquises = $competencesAcquises;
@ -866,11 +855,10 @@ class Immersion implements \Stringable
/**
* Set competencesADevelopper.
*
* @param string|null $competencesADevelopper
*
* @return Immersion
*/
public function setCompetencesADevelopper($competencesADevelopper = null)
public function setCompetencesADevelopper(?string $competencesADevelopper = null)
{
$this->competencesADevelopper = $competencesADevelopper;
@ -890,11 +878,10 @@ class Immersion implements \Stringable
/**
* Set noteBilan.
*
* @param string|null $noteBilan
*
* @return Immersion
*/
public function setNoteBilan($noteBilan = null)
public function setNoteBilan(?string $noteBilan = null)
{
$this->noteBilan = $noteBilan;
@ -954,7 +941,7 @@ class Immersion implements \Stringable
return $this->structureAccAddress;
}
public function setStructureAccEmail($structureAccEmail)
public function setStructureAccEmail(?string $structureAccEmail)
{
$this->structureAccEmail = $structureAccEmail;
return $this;
@ -976,13 +963,13 @@ class Immersion implements \Stringable
return $this->savoirEtreNote;
}
public function setIsBilanFullfilled($isBilanFullfilled)
public function setIsBilanFullfilled(?bool $isBilanFullfilled)
{
$this->isBilanFullfilled = $isBilanFullfilled;
return $this;
}
public function setSavoirEtreNote($savoirEtreNote)
public function setSavoirEtreNote(?string $savoirEtreNote)
{
$this->savoirEtreNote = $savoirEtreNote;
return $this;
@ -1098,133 +1085,133 @@ class Immersion implements \Stringable
return $this->respectHierarchieNote;
}
public function setPonctualiteSalarie($ponctualiteSalarie)
public function setPonctualiteSalarie(?string $ponctualiteSalarie)
{
$this->ponctualiteSalarie = $ponctualiteSalarie;
return $this;
}
public function setPonctualiteSalarieNote($ponctualiteSalarieNote)
public function setPonctualiteSalarieNote(?string $ponctualiteSalarieNote)
{
$this->ponctualiteSalarieNote = $ponctualiteSalarieNote;
return $this;
}
public function setAssiduite($assiduite)
public function setAssiduite(?string $assiduite)
{
$this->assiduite = $assiduite;
return $this;
}
public function setAssiduiteNote($assiduiteNote)
public function setAssiduiteNote(?string $assiduiteNote)
{
$this->assiduiteNote = $assiduiteNote;
return $this;
}
public function setInteretActivite($interetActivite)
public function setInteretActivite(?string $interetActivite)
{
$this->interetActivite = $interetActivite;
return $this;
}
public function setInteretActiviteNote($interetActiviteNote)
public function setInteretActiviteNote(?string $interetActiviteNote)
{
$this->interetActiviteNote = $interetActiviteNote;
return $this;
}
public function setIntegreRegle($integreRegle)
public function setIntegreRegle(?string $integreRegle)
{
$this->integreRegle = $integreRegle;
return $this;
}
public function setIntegreRegleNote($integreRegleNote)
public function setIntegreRegleNote(?string $integreRegleNote)
{
$this->integreRegleNote = $integreRegleNote;
return $this;
}
public function setEspritInitiative($espritInitiative)
public function setEspritInitiative(?string $espritInitiative)
{
$this->espritInitiative = $espritInitiative;
return $this;
}
public function setEspritInitiativeNote($espritInitiativeNote)
public function setEspritInitiativeNote(?string $espritInitiativeNote)
{
$this->espritInitiativeNote = $espritInitiativeNote;
return $this;
}
public function setOrganisation($organisation)
public function setOrganisation(?string $organisation)
{
$this->organisation = $organisation;
return $this;
}
public function setOrganisationNote($organisationNote)
public function setOrganisationNote(?string $organisationNote)
{
$this->organisationNote = $organisationNote;
return $this;
}
public function setCapaciteTravailEquipe($capaciteTravailEquipe)
public function setCapaciteTravailEquipe(?string $capaciteTravailEquipe)
{
$this->capaciteTravailEquipe = $capaciteTravailEquipe;
return $this;
}
public function setCapaciteTravailEquipeNote($capaciteTravailEquipeNote)
public function setCapaciteTravailEquipeNote(?string $capaciteTravailEquipeNote)
{
$this->capaciteTravailEquipeNote = $capaciteTravailEquipeNote;
return $this;
}
public function setStyleVestimentaire($styleVestimentaire)
public function setStyleVestimentaire(?string $styleVestimentaire)
{
$this->styleVestimentaire = $styleVestimentaire;
return $this;
}
public function setStyleVestimentaireNote($styleVestimentaireNote)
public function setStyleVestimentaireNote(?string $styleVestimentaireNote)
{
$this->styleVestimentaireNote = $styleVestimentaireNote;
return $this;
}
public function setLangageProf($langageProf)
public function setLangageProf(?string $langageProf)
{
$this->langageProf = $langageProf;
return $this;
}
public function setLangageProfNote($langageProfNote)
public function setLangageProfNote(?string $langageProfNote)
{
$this->langageProfNote = $langageProfNote;
return $this;
}
public function setAppliqueConsigne($appliqueConsigne)
public function setAppliqueConsigne(?string $appliqueConsigne)
{
$this->appliqueConsigne = $appliqueConsigne;
return $this;
}
public function setAppliqueConsigneNote($appliqueConsigneNote)
public function setAppliqueConsigneNote(?string $appliqueConsigneNote)
{
$this->appliqueConsigneNote = $appliqueConsigneNote;
return $this;
}
public function setRespectHierarchie($respectHierarchie)
public function setRespectHierarchie(?string $respectHierarchie)
{
$this->respectHierarchie = $respectHierarchie;
return $this;
}
public function setRespectHierarchieNote($respectHierarchieNote)
public function setRespectHierarchieNote(?string $respectHierarchieNote)
{
$this->respectHierarchieNote = $respectHierarchieNote;
return $this;

View File

@ -9,16 +9,16 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Entity;
namespace Chill\JobBundle\Entity;
use Chill\ChillJobBundle\Repository\ProjetProfessionnelRepository;
use Chill\JobBundle\Repository\ProjetProfessionnelRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
use Chill\PersonBundle\Entity\Person;
use Chill\ChillJobBundle\Entity\Rome\Appellation;
use Chill\JobBundle\Entity\Rome\Appellation;
/**
* ProjetProfessionnel.
@ -49,7 +49,7 @@ class ProjetProfessionnel implements \Stringable
private ?\DateTimeInterface $reportDate = null;
/**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\ChillJobBundle\Entity\Rome\Appellation>
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\Rome\Appellation>
*/
#[ORM\JoinTable(name: 'chill_csconnectes.projetprofessionnel_souhait')]
#[ORM\ManyToMany(targetEntity: Appellation::class, cascade: ['persist'])]
@ -98,7 +98,7 @@ class ProjetProfessionnel implements \Stringable
private ?string $enCoursConstruction = null;
/**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\ChillJobBundle\Entity\Rome\Appellation>
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\Rome\Appellation>
*/
#[ORM\JoinTable(name: 'chill_csconnectes.projetprofessionnel_valide')]
#[ORM\ManyToMany(targetEntity: Appellation::class)]
@ -136,7 +136,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return ProjetProfessionnel
*/
public function setReportDate($reportDate)
public function setReportDate(?\DateTimeInterface $reportDate)
{
$this->reportDate = $reportDate;
@ -180,11 +180,10 @@ class ProjetProfessionnel implements \Stringable
/**
* Set typeContratNotes.
*
* @param string|null $typeContratNotes
*
* @return ProjetProfessionnel
*/
public function setTypeContratNotes($typeContratNotes = null)
public function setTypeContratNotes(?string $typeContratNotes = null)
{
$this->typeContratNotes = $typeContratNotes;
@ -228,11 +227,10 @@ class ProjetProfessionnel implements \Stringable
/**
* Set volumeHoraireNotes.
*
* @param string|null $volumeHoraireNotes
*
* @return ProjetProfessionnel
*/
public function setVolumeHoraireNotes($volumeHoraireNotes = null)
public function setVolumeHoraireNotes(?string $volumeHoraireNotes = null)
{
$this->volumeHoraireNotes = $volumeHoraireNotes;
@ -252,11 +250,10 @@ class ProjetProfessionnel implements \Stringable
/**
* Set idee.
*
* @param string|null $idee
*
* @return ProjetProfessionnel
*/
public function setIdee($idee = null)
public function setIdee(?string $idee = null)
{
$this->idee = $idee;
@ -276,11 +273,10 @@ class ProjetProfessionnel implements \Stringable
/**
* Set enCoursConstruction.
*
* @param string|null $enCoursConstruction
*
* @return ProjetProfessionnel
*/
public function setEnCoursConstruction($enCoursConstruction = null)
public function setEnCoursConstruction(?string $enCoursConstruction = null)
{
$this->enCoursConstruction = $enCoursConstruction;
@ -300,11 +296,10 @@ class ProjetProfessionnel implements \Stringable
/**
* Set valideNotes.
*
* @param string|null $valideNotes
*
* @return ProjetProfessionnel
*/
public function setValideNotes($valideNotes = null)
public function setValideNotes(?string $valideNotes = null)
{
$this->valideNotes = $valideNotes;
@ -324,11 +319,10 @@ class ProjetProfessionnel implements \Stringable
/**
* Set projetProfessionnelNote.
*
* @param string|null $projetProfessionnelNote
*
* @return ProjetProfessionnel
*/
public function setProjetProfessionnelNote($projetProfessionnelNote = null)
public function setProjetProfessionnelNote(?string $projetProfessionnelNote = null)
{
$this->projetProfessionnelNote = $projetProfessionnelNote;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Entity\Rome;
namespace Chill\JobBundle\Entity\Rome;
use Doctrine\ORM\Mapping as ORM;
@ -17,7 +17,7 @@ use Doctrine\ORM\Mapping as ORM;
* Appellation.
*/
#[ORM\Table(name: 'chill_csconnectes.rome_appellation')]
#[ORM\Entity(repositoryClass: \Chill\ChillJobBundle\Repository\Rome\AppellationRepository::class)]
#[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\Rome\AppellationRepository::class)]
class Appellation implements \Stringable
{
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -51,7 +51,7 @@ class Appellation implements \Stringable
*
* @return Appellation
*/
public function setCode($code)
public function setCode(?string $code)
{
$this->code = $code;
@ -75,7 +75,7 @@ class Appellation implements \Stringable
*
* @return Appellation
*/
public function setLibelle($libelle)
public function setLibelle(?string $libelle)
{
$this->libelle = $libelle;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Entity\Rome;
namespace Chill\JobBundle\Entity\Rome;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
@ -18,7 +18,7 @@ use Doctrine\Common\Collections\ArrayCollection;
* Metier.
*/
#[ORM\Table(name: 'chill_csconnectes.rome_metier')]
#[ORM\Entity(repositoryClass: \Chill\ChillJobBundle\Repository\Rome\MetierRepository::class)]
#[ORM\Entity(repositoryClass: \Chill\JobBundle\Repository\Rome\MetierRepository::class)]
class Metier
{
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -33,7 +33,7 @@ class Metier
private ?string $code = '';
/**
* @var \Doctrine\Common\Collections\Collection<int, \Chill\ChillJobBundle\Entity\Rome\Appellation>
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\Rome\Appellation>
*/
#[ORM\OneToMany(targetEntity: Appellation::class, mappedBy: 'metier')]
private readonly \Doctrine\Common\Collections\Collection $appellations;
@ -61,7 +61,7 @@ class Metier
*
* @return Metier
*/
public function setLibelle($libelle)
public function setLibelle(?string $libelle)
{
$this->libelle = $libelle;
@ -85,7 +85,7 @@ class Metier
*
* @return Metier
*/
public function setCode($code)
public function setCode(?string $code)
{
$this->code = $code;

View File

@ -9,21 +9,21 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Export;
namespace Chill\JobBundle\Export;
use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Export\ListInterface;
use Chill\PersonBundle\Export\Export\ListPerson;
use Chill\ChillJobBundle\Entity\CSPerson;
use Chill\JobBundle\Entity\CSPerson;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
use Symfony\Component\Validator\Constraints\Callback;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Class ListCSPerson.
@ -240,7 +240,7 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
break;
case 'type_contrat__label':
if (! empty($value)) {
if ($value !== '') {
$res[$key] = ($f) ? $value : null;
} else {
$res[$key] = null;
@ -406,7 +406,7 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
str_replace('__', '.', $key)
);
}
if (empty($value)) {
if ($value === '') {
return '';
}
$arr = [];
@ -423,7 +423,7 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
str_replace('__', '.', $key)
);
}
if (empty($value)) {
if ($value === '') {
return '';
}
$this->translationCompatKey($value, $key);
@ -434,7 +434,7 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
if ('_header' === $value) {
return $key;
}
if (empty($value)) {
if ($value === '') {
return '';
}
@ -462,7 +462,7 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
if ('_header' === $value) {
return $key;
}
if (empty($value)) {
if ($value === '') {
return '';
}
@ -638,4 +638,9 @@ WHERE
ORDER BY p.id ASC
SQL;
public function validateForm(mixed $data, ExecutionContextInterface $context)
{
// TODO: Implement validateForm() method.
}
}

View File

@ -9,14 +9,14 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Export;
namespace Chill\JobBundle\Export;
use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\ListInterface;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\PersonBundle\Entity\Person;
use Chill\ChillJobBundle\Security\Authorization\ExportsVoter;
use Chill\JobBundle\Security\Authorization\ExportsVoter;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
@ -194,7 +194,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
*
* @return Role
*/
public function requiredRole()
public function requiredRole(): string
{
return new Role(ExportsVoter::EXPORT);
}
@ -393,4 +393,9 @@ AND (
ORDER BY cv.reportdate DESC
SQL;
public function getFormDefaultData(): array
{
return [];
}
}

View File

@ -9,15 +9,15 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Export;
namespace Chill\JobBundle\Export;
use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\ListInterface;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\PersonBundle\Entity\Person;
use Chill\ChillJobBundle\Entity\Frein;
use Chill\ChillJobBundle\Security\Authorization\ExportsVoter;
use Chill\JobBundle\Entity\Frein;
use Chill\JobBundle\Security\Authorization\ExportsVoter;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
@ -207,7 +207,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
*
* @return Role
*/
public function requiredRole()
public function requiredRole(): string
{
return new Role(ExportsVoter::EXPORT);
}
@ -498,4 +498,9 @@ AND (
ORDER BY fr.reportdate DESC
SQL;
public function getFormDefaultData(): array
{
return [];
}
}

View File

@ -9,15 +9,15 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Export;
namespace Chill\JobBundle\Export;
use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\ListInterface;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\PersonBundle\Entity\Person;
use Chill\ChillJobBundle\Entity\ProjetProfessionnel;
use Chill\ChillJobBundle\Security\Authorization\ExportsVoter;
use Chill\JobBundle\Entity\ProjetProfessionnel;
use Chill\JobBundle\Security\Authorization\ExportsVoter;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
@ -213,7 +213,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
*
* @return Role
*/
public function requiredRole()
public function requiredRole(): string
{
return new Role(ExportsVoter::EXPORT);
}
@ -586,4 +586,9 @@ AND (
ORDER BY pp.reportdate DESC
SQL;
public function getFormDefaultData(): array
{
return [];
}
}

View File

@ -9,12 +9,12 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form;
namespace Chill\JobBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\ChillJobBundle\Entity\CSPerson;
use Chill\JobBundle\Entity\CSPerson;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;

View File

@ -9,12 +9,12 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form;
namespace Chill\JobBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\ChillJobBundle\Entity\CSPerson;
use Chill\JobBundle\Entity\CSPerson;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form\CV;
namespace Chill\JobBundle\Form\CV;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -18,7 +18,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\MainBundle\Form\Type\ChillDateType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Chill\ChillJobBundle\Entity\CV\Experience;
use Chill\JobBundle\Entity\CV\Experience;
class ExperienceType extends AbstractType
{

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form\CV;
namespace Chill\JobBundle\Form\CV;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -17,7 +17,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Chill\MainBundle\Form\Type\ChillDateType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\ChillJobBundle\Entity\CV\Formation as F;
use Chill\JobBundle\Entity\CV\Formation as F;
class FormationType extends AbstractType
{

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form;
namespace Chill\JobBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -17,10 +17,10 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\MainBundle\Form\Type\ChillDateType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Chill\ChillJobBundle\Entity\CV;
use Chill\JobBundle\Entity\CV;
use Chill\MainBundle\Form\Type\ChillCollectionType;
use Chill\ChillJobBundle\Form\CV\FormationType;
use Chill\ChillJobBundle\Form\CV\ExperienceType;
use Chill\JobBundle\Form\CV\FormationType;
use Chill\JobBundle\Form\CV\ExperienceType;
use Chill\MainBundle\Form\Type\Select2LanguageType;
class CVType extends AbstractType

View File

@ -9,15 +9,15 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form\ChoiceLoader;
namespace Chill\JobBundle\Form\ChoiceLoader;
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
use Chill\ChillJobBundle\Entity\Rome\Appellation;
use Chill\JobBundle\Entity\Rome\Appellation;
use Doctrine\ORM\EntityManagerInterface;
use Chill\PoleEmploiApiBundle\ApiHelper\PartenaireRomeAppellation;
use Chill\ChillJobBundle\Entity\Rome\Metier;
use Chill\JobBundle\Entity\Rome\Metier;
use Symfony\Component\Validator\Validator\ValidatorInterface;
/**
@ -36,7 +36,7 @@ class RomeAppellationChoiceLoader implements ChoiceLoaderInterface
protected $em;
/**
* @var \Chill\ChillJobBundle\Repository\Rome\AppellationRepository
* @var \Chill\JobBundle\Repository\Rome\AppellationRepository
*/
protected $appellationRepository;

View File

@ -9,14 +9,14 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form;
namespace Chill\JobBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\MainBundle\Form\Type\ChillDateType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\ChillJobBundle\Entity\Frein;
use Chill\JobBundle\Entity\Frein;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
class FreinType extends AbstractType

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form;
namespace Chill\JobBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -21,7 +21,7 @@ use Chill\ThirdPartyBundle\Form\Type\PickThirdPartyType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Chill\MainBundle\Form\Type\DateIntervalType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\ChillJobBundle\Entity\Immersion;
use Chill\JobBundle\Entity\Immersion;
use Chill\MainBundle\Form\Type\AddressType;
class ImmersionType extends AbstractType

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form;
namespace Chill\JobBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -17,8 +17,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\MainBundle\Form\Type\ChillDateType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\ChillJobBundle\Entity\ProjetProfessionnel;
use Chill\ChillJobBundle\Form\Type\PickRomeAppellationType;
use Chill\JobBundle\Entity\ProjetProfessionnel;
use Chill\JobBundle\Form\Type\PickRomeAppellationType;
class ProjetProfessionnelType extends AbstractType
{

View File

@ -9,20 +9,20 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Form\Type;
namespace Chill\JobBundle\Form\Type;
use Chill\FranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\FormBuilderInterface;
use Chill\ChillJobBundle\Entity\Rome\Appellation;
use Chill\JobBundle\Entity\Rome\Appellation;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Chill\PoleEmploiApiBundle\ApiHelper\PartenaireRomeAppellation;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\OptionsResolver\Options;
use Chill\ChillJobBundle\Form\ChoiceLoader\RomeAppellationChoiceLoader;
use Chill\JobBundle\Form\ChoiceLoader\RomeAppellationChoiceLoader;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Allow to grab an appellation.
@ -41,7 +41,7 @@ class PickRomeAppellationType extends AbstractType
// /**
// *
// * @var \Chill\ChillJobBundle\Form\DataTransformer\RomeAppellationTransformer
// * @var \Chill\JobBundle\Form\DataTransformer\RomeAppellationTransformer
// */
// protected $romeAppellationTransformer;

View File

@ -9,12 +9,12 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Menu;
namespace Chill\JobBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Chill\ChillJobBundle\Security\Authorization\CSConnectesVoter;
use Chill\JobBundle\Security\Authorization\CSConnectesVoter;
class MenuBuilder implements LocalMenuBuilderInterface
{
@ -33,29 +33,29 @@ class MenuBuilder implements LocalMenuBuilderInterface
/** @var \Chill\PersonBundle\Entity\Person $person */
$person = $parameters['person'];
if ($this->authorizationChecker->isGranted(CSConnectesVoter::REPORT_NEW, $person)) {
// if ($this->authorizationChecker->isGranted(CSConnectesVoter::REPORT_NEW, $person)) {
$menu->addChild('Situation personnelle', [
'route' => 'chill_crud_csperson_personal_situation_view',
'route' => 'chill_job_personal_situation_view',
'routeParameters' => [
'id' => $person->getId(),
'person' => $person->getId(),
],
])
->setExtras([
'order' => 50,
]);
$menu->addChild('Dispositifs', [
'route' => 'chill_crud_csperson_dispositifs_view',
'route' => 'chill_job_dispositifs_view',
'routeParameters' => [
'id' => $person->getId(),
'person' => $person->getId(),
],
])
->setExtras([
'order' => 51,
]);
}
// }
$menu->addChild('Parcours d\'accompagnement', [
'route' => 'chill_csconnectes_csreport_index',
$menu->addChild('Emploi', [
'route' => 'chill_job_report_index',
'routeParameters' => [
'person' => $person->getId(),
],

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository;
namespace Chill\JobBundle\Repository;
/**
* CSPersonRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository\CV;
namespace Chill\JobBundle\Repository\CV;
/**
* ExperienceRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository\CV;
namespace Chill\JobBundle\Repository\CV;
/**
* FormationRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository;
namespace Chill\JobBundle\Repository;
/**
* CVRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository;
namespace Chill\JobBundle\Repository;
/**
* FreinRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository;
namespace Chill\JobBundle\Repository;
/**
* ImmersionRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository;
namespace Chill\JobBundle\Repository;
/**
* ProjetProfessionnelRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository\Rome;
namespace Chill\JobBundle\Repository\Rome;
/**
* AppellationRepository.

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Repository\Rome;
namespace Chill\JobBundle\Repository\Rome;
/**
* MetierRepository.

View File

@ -1,3 +1,3 @@
csconnectes_sp_controllers:
resource: "@CSConnectesSPBundle/Controller"
chill_job_controllers:
resource: "@ChillJobBundle/Controller"
type: annotation

View File

@ -8,5 +8,5 @@ imports:
services:
# cs_connectes_sp.example:
# class: Chill\ChillJobBundle\Example
# class: Chill\JobBundle\Example
# arguments: ["@service_id", "plain_value", "%parameter%"]

View File

@ -1,9 +1,9 @@
services:
Chill\ChillJobBundle\ThirdParty\PrescripteurType:
Chill\JobBundle\ThirdParty\PrescripteurType:
tags:
- { name: chill_3party.provider }
Chill\ChillJobBundle\ThirdParty\EntrepriseType:
Chill\JobBundle\ThirdParty\EntrepriseType:
tags:
- { name: chill_3party.provider }

View File

@ -1,3 +1,13 @@
services:
Chill\ChillJobBundle\Controller\CSReportController:
Chill\JobBundle\Controller\CSReportController:
autoconfigure: true
autowire: true
tags: ['controller.service_arguments']
Chill\JobBundle\Controller\CSPersonController:
autoconfigure: true
autowire: true
tags: ['controller.service_arguments']
Chill\JobBundle\Controller\CSCrudReportController:
autoconfigure: true
autowire: true
tags: [ 'controller.service_arguments' ]

View File

@ -1,6 +1,6 @@
services:
Chill\ChillJobBundle\Export\ListCSPerson:
Chill\JobBundle\Export\ListCSPerson:
arguments:
$em: '@doctrine.orm.entity_manager'
$translator: "@translator"
@ -9,19 +9,19 @@ services:
tags:
- { name: chill.export, alias: list_CSPerson }
Chill\ChillJobBundle\Export\ListCV:
Chill\JobBundle\Export\ListCV:
arguments:
$em: '@doctrine.orm.entity_manager'
tags:
- { name: chill.export, alias: list_CV }
Chill\ChillJobBundle\Export\ListFrein:
Chill\JobBundle\Export\ListFrein:
arguments:
$em: '@doctrine.orm.entity_manager'
tags:
- { name: chill.export, alias: list_Frein }
Chill\ChillJobBundle\Export\ListProjetProfessionnel:
Chill\JobBundle\Export\ListProjetProfessionnel:
arguments:
$em: '@doctrine.orm.entity_manager'
tags:

View File

@ -1,8 +1,8 @@
services:
Chill\ChillJobBundle\Form\Type\PickRomeAppellationType:
Chill\JobBundle\Form\Type\PickRomeAppellationType:
autowire: true
tags:
- { name: form.type }
Chill\ChillJobBundle\Form\DataTransformer\RomeAppellationTransformer:
Chill\JobBundle\Form\DataTransformer\RomeAppellationTransformer:
autowire: true

View File

@ -1,5 +1,5 @@
services:
Chill\ChillJobBundle\Menu\MenuBuilder:
Chill\JobBundle\Menu\MenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
tags:

View File

@ -1,12 +1,12 @@
services:
Chill\ChillJobBundle\Security\Authorization\CSConnectesVoter:
Chill\JobBundle\Security\Authorization\CSConnectesVoter:
arguments:
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
tags:
- { name: security.voter }
- { name: chill.role }
Chill\ChillJobBundle\Security\Authorization\ExportsVoter:
Chill\JobBundle\Security\Authorization\ExportsVoter:
arguments:
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
tags:

View File

@ -11,7 +11,7 @@
{# surcharge le block "retour" par un lien vers la page vue #}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_csperson_dispositifs_view', { 'id': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_dispositifs_view', { 'id': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -10,7 +10,7 @@
{% block title 'Dispositifs d\'accompagnement de %name%'|trans( { '%name%': person.firstName ~ ' ' ~ person.lastName } ) %}
{% block personcontent %}
{% block content %}
<h1>{{ 'Dispositifs d\'accompagnement de %name%'|trans( { '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
<h2>Accompagnement</h2>
@ -105,10 +105,10 @@
<dt>IEJ</dt>
<dd>
{% if entity.dateContratIEJ != null %}
<p>Date du contrat IEJ&nbsp;: {{ entity.dateContratIEJ|localizeddate('long', 'none') }}</p>
<p>Date du contrat IEJ&nbsp;: {{ entity.dateContratIEJ|format_date('long', 'none') }}</p>
{% endif %}
{% if entity.dateAvenantIEJ != null %}
<p>Date de l'avenant IEJ&nbsp;: {{ entity.dateAvenantIEJ|localizeddate('long', 'none') }}</p>
<p>Date de l'avenant IEJ&nbsp;: {{ entity.dateAvenantIEJ|format_date('long', 'none') }}</p>
{% endif %}
</dd>
{% endif %}

View File

@ -11,7 +11,7 @@
{# surcharge le block "retour" par un lien vers la page vue #}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_csperson_personal_situation_view', { 'id': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_personal_situation_view', { 'id': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -12,7 +12,7 @@
{% block title 'Situation personnelle de %name%'|trans( { '%name%': person.firstName ~ ' ' ~ person.lastName } ) %}
{% block personcontent %}
{% block content %}
<h1>{{ 'Situation personnelle de %name%'|trans( { '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
<h2>Logement</h2>
@ -132,7 +132,7 @@
<dt>Date de fin du dernier emploi</dt>
{% if entity.dateFinDernierEmploi is not null %}
<dd>{{ entity.dateFinDernierEmploi|localizeddate('medium', 'none') }}
<dd>{{ entity.dateFinDernierEmploi|format_date('medium', 'none') }}
{% else %}
<dd>{{ null|chill_print_or_message }}</dd>
{% endif %}
@ -175,7 +175,7 @@
<dt>Date du premier versement</dt>
{% if entity.ressourceDate1Versement is not null %}
<dd>{{ entity.ressourceDate1Versement|localizeddate('medium', 'none') }}
<dd>{{ entity.ressourceDate1Versement|format_date('medium', 'none') }}
{% else %}
<dd>{{ null|chill_print_or_message }}</dd>
{% endif %}

View File

@ -48,7 +48,7 @@
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -48,7 +48,7 @@
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -9,7 +9,7 @@
{% block crud_content_view_details %}
<dl class="chill_view_data">
<dt>Date du rapport</dt>
<dd>{{ entity.reportDate|localizeddate('long', 'none') }}</dd>
<dd>{{ entity.reportDate|format_date('long', 'none') }}</dd>
<h2>Compétences</h2>
@ -51,11 +51,11 @@
{% if f.startDate is null and f.endDate is null %}
{{ null|chill_print_or_message("Aucune date indiquée") }}
{% elseif f.startDate is null %}
Jusqu'au {{ f.endDate|localizeddate('long', 'none') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
Jusqu'au {{ f.endDate|format_date('long', 'none') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
{% elseif f.endDate is null %}
Depuis le {{ f.startDate|localizeddate('long', 'none') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
Depuis le {{ f.startDate|format_date('long', 'none') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
{% else %}
Du {{ f.startDate|localizeddate('long', 'none') }} au {{ f.endDate|localizeddate('long', 'none') }}
Du {{ f.startDate|format_date('long', 'none') }} au {{ f.endDate|format_date('long', 'none') }}
{% endif %}
</dd>
@ -85,11 +85,11 @@
{% if f.startDate is null and f.endDate is null %}
{{ null|chill_print_or_message("Aucune date indiquée") }}
{% elseif f.startDate is null %}
Jusqu'au {{ f.endDate|localizeddate('long', 'none') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
Jusqu'au {{ f.endDate|format_date('long', 'none') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
{% elseif f.endDate is null %}
Depuis le {{ f.startDate|localizeddate('long', 'none') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
Depuis le {{ f.startDate|format_date('long', 'none') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
{% else %}
Du {{ f.startDate|localizeddate('long', 'none') }} au {{ f.endDate|localizeddate('long', 'none') }}
Du {{ f.startDate|format_date('long', 'none') }} au {{ f.endDate|format_date('long', 'none') }}
{% endif %}
</dd>
@ -119,7 +119,7 @@
{% block content_view_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', { 'person': entity.person.id }) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', { 'person': entity.person.id }) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -11,7 +11,7 @@
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -14,7 +14,7 @@
{% endblock crud_content_header %}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -9,7 +9,7 @@
{% block crud_content_view_details %}
<dl class="chill_view_data">
<dt>Date du rapport</dt>
<dd>{{ entity.reportDate|localizeddate('long', 'none') }}</dd>
<dd>{{ entity.reportDate|format_date('long', 'none') }}</dd>
<dt>Freins identifiés</dt>
<dd>
@ -49,7 +49,7 @@
{% block content_view_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', { 'person': entity.person.id }) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', { 'person': entity.person.id }) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -15,7 +15,7 @@ Bilan d'immersion
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>
@ -23,7 +23,7 @@ Bilan d'immersion
{% block crud_content_form_rows %}
<p>
Immersion du {{ entity.debutDate|localizeddate('long', 'none') }} au {{ entity.getDateEndComputed|localizeddate('long', 'none') }},
Immersion du {{ entity.debutDate|format_date('long', 'none') }} au {{ entity.getDateEndComputed|format_date('long', 'none') }},
auprès de <pre>{{ entity.entreprise.name }}</pre>
Domaine d'activité: {{ entity.domaineActivite }}
<br/><br/>

View File

@ -11,7 +11,7 @@
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -14,7 +14,7 @@
{% endblock crud_content_header %}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -54,8 +54,8 @@
<dd>{{ entity.posteLieu|chill_print_or_message }}</dd>
<dt>Dates</dt>
<dd>Du {{ entity.debutDate|localizeddate('long', 'none') }}
au {{ entity.getDateEndComputed|localizeddate('long', 'none') }}
<dd>Du {{ entity.debutDate|format_date('long', 'none') }}
au {{ entity.getDateEndComputed|format_date('long', 'none') }}
</dd>
<dt>Horaire</dt>
@ -188,7 +188,7 @@
{% block content_view_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', { 'person': entity.person.id }) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', { 'person': entity.person.id }) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -43,7 +43,7 @@
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -43,7 +43,7 @@
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -9,7 +9,7 @@
{% block crud_content_view_details %}
<dl class="chill_view_data">
<dt>Date</dt>
<dd>{{ entity.reportDate|localizeddate('long', 'none') }}</dd>
<dd>{{ entity.reportDate|format_date('long', 'none') }}</dd>
<h2>Souhaits</h2>
@ -97,7 +97,7 @@
{% block content_view_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', { 'person': entity.person.id }) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', { 'person': entity.person.id }) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -7,7 +7,7 @@
{% embed '@ChillMain/CRUD/_delete_content.html.twig' %}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_csconnectes_csreport_index', {'person': entity.person.id}) }}">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@ -1,8 +1,8 @@
{% extends '@ChillPerson/layout.html.twig' %}
{% extends '@ChillPerson/Person/layout.html.twig' %}
{% set activeRouteKey = '' %}
{% block personcontent %}
{% block content %}
<div class="grid-12">
<h1>Rapports pour {{ person|chill_entity_render_string }}</h1>
@ -22,7 +22,7 @@
<tbody>
{% for cv in cvs %}
<tr>
<td>{{ cv.reportDate|localizeddate('short', 'none') }}</td>
<td>{{ cv.reportDate|format_date('short', 'none') }}</td>
<td>
<ul class="record_actions">
<li>
@ -70,7 +70,7 @@
<tbody>
{% for frein in freins %}
<tr>
<td>{{ frein.reportDate|localizeddate('short', 'none') }}</td>
<td>{{ frein.reportDate|format_date('short', 'none') }}</td>
<td>
{% if frein.freinsPerso|merge(frein.freinsEmploi)|length > 0 %}
<ul>
@ -133,7 +133,7 @@
<tbody>
{% for im in immersions %}
<tr>
<td>{{ im.debutDate|localizeddate('short', 'none') }}</td>
<td>{{ im.debutDate|format_date('short', 'none') }}</td>
<td>
{{ im.entreprise.name }}
</td>
@ -192,7 +192,7 @@
<tbody>
{% for pr in projet_professionnels %}
<tr>
<td>{{ pr.reportDate|localizeddate('short', 'none') }}</td>
<td>{{ pr.reportDate|format_date('short', 'none') }}</td>
<td>
{% set romes = [] %}
{% if pr.valide|length > 0 %}

View File

@ -9,15 +9,15 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Security\Authorization;
namespace Chill\JobBundle\Security\Authorization;
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Chill\ChillJobBundle\Entity\Frein;
use Chill\ChillJobBundle\Entity\CV;
use Chill\JobBundle\Entity\Frein;
use Chill\JobBundle\Entity\CV;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
use Chill\ChillJobBundle\Entity\Immersion;
use Chill\ChillJobBundle\Entity\ProjetProfessionnel;
use Chill\JobBundle\Entity\Immersion;
use Chill\JobBundle\Entity\ProjetProfessionnel;
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
use Chill\PersonBundle\Entity\Person;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
@ -103,7 +103,7 @@ class CSConnectesVoter extends AbstractChillVoter implements ProvideRoleHierarch
return true;
}
public function getRoles()
public function getRoles(): array
{
return self::ALL;
}

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Security\Authorization;
namespace Chill\JobBundle\Security\Authorization;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\User;
@ -89,7 +89,7 @@ class ExportsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInt
*
* @return array where keys are the hierarchy, and values an array of roles: `[ 'title' => [ 'CHILL_FOO_SEE', 'CHILL_FOO_UPDATE' ] ]`
*/
public function getRolesWithHierarchy()
public function getRolesWithHierarchy(): array
{
return ['CSConnectes' => $this->getRoles()];
}
@ -99,7 +99,7 @@ class ExportsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInt
*
* @return string[] array of roles (as string)
*/
public function getRoles()
public function getRoles(): array
{
return $this->getAttributes();
}
@ -109,7 +109,7 @@ class ExportsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInt
*
* @return string[] array of roles without scopes
*/
public function getRolesWithoutScope()
public function getRolesWithoutScope(): array
{
return $this->getAttributes();
}

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Tests\Controller;
namespace Chill\JobBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\Tests\Controller;
namespace Chill\JobBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\ThirdParty;
namespace Chill\JobBundle\ThirdParty;
use Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeProviderInterface;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ChillJobBundle\ThirdParty;
namespace Chill\JobBundle\ThirdParty;
use Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeProviderInterface;

View File

@ -446,7 +446,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
return $this;
}
public function setLinkedToThirdParty($linkedToThirdParty): self
public function setLinkedToThirdParty(?\Chill\ThirdPartyBundle\Entity\ThirdParty $linkedToThirdParty): self
{
$this->linkedToThirdParty = $linkedToThirdParty;

View File

@ -111,7 +111,7 @@ class Center implements HasCenterInterface, \Stringable
/**
* @return $this
*/
public function setName($name)
public function setName(string $name)
{
$this->name = $name;

Some files were not shown because too many files have changed in this diff Show More