mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs: Enable more risky rules.
This commit is contained in:
@@ -693,7 +693,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
protected function matchColumnToCustomField($row)
|
||||
{
|
||||
$cfMappingsOptions = $this->input->getOption('custom-field');
|
||||
/* @var $em \Doctrine\Persistence\ObjectManager */
|
||||
/** @var \Doctrine\Persistence\ObjectManager $em */
|
||||
$em = $this->em;
|
||||
|
||||
foreach ($cfMappingsOptions as $cfMappingStringOption) {
|
||||
@@ -877,7 +877,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
$this->output->writeln($this->helper->localize($cf->getName()));
|
||||
|
||||
// printing the possible answers
|
||||
/* @var $table \Symfony\Component\Console\Helper\Table */
|
||||
/** @var \Symfony\Component\Console\Helper\Table $table */
|
||||
$table = new Table($this->output);
|
||||
$table->setHeaders(['#', 'label', 'value']);
|
||||
$i = 0;
|
||||
@@ -954,7 +954,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
}
|
||||
|
||||
// we skip if the opening date is now (or after yesterday)
|
||||
/* @var $period \Chill\PersonBundle\Entity\AccompanyingPeriod */
|
||||
/** @var \Chill\PersonBundle\Entity\AccompanyingPeriod $period */
|
||||
$period = $person->getCurrentAccompanyingPeriod();
|
||||
|
||||
if ($period->getOpeningDate() > new DateTime('yesterday')) {
|
||||
@@ -1037,11 +1037,11 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
*/
|
||||
protected function processingCustomFields(Person $person, $row)
|
||||
{
|
||||
/* @var $cfProvider \Chill\CustomFieldsBundle\Service\CustomFieldProvider */
|
||||
/** @var \Chill\CustomFieldsBundle\Service\CustomFieldProvider $cfProvider */
|
||||
$cfProvider = $this->customFieldProvider;
|
||||
$cfData = [];
|
||||
|
||||
/* @var $$customField \Chill\CustomFieldsBundle\Entity\CustomField */
|
||||
/** @var \Chill\CustomFieldsBundle\Entity\CustomField $$customField */
|
||||
foreach ($this->customFieldMapping as $rowNumber => $customField) {
|
||||
$builder = $this->formFactory->createBuilder();
|
||||
$cfProvider->getCustomFieldByType($customField->getType())
|
||||
@@ -1139,7 +1139,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
{
|
||||
$answers = [];
|
||||
|
||||
/* @var $choice \Symfony\Component\Form\ChoiceList\View\ChoiceView */
|
||||
/** @var \Symfony\Component\Form\ChoiceList\View\ChoiceView $choice */
|
||||
foreach ($choices as $choice) {
|
||||
if ($choice instanceof \Symfony\Component\Form\ChoiceList\View\ChoiceView) {
|
||||
$answers[$choice->value] = $choice->label;
|
||||
|
@@ -318,7 +318,7 @@ class AccompanyingPeriodController extends AbstractController
|
||||
/** @var Person $person */
|
||||
$person = $this->_getPerson($person_id);
|
||||
|
||||
/* @var $period AccompanyingPeriod */
|
||||
/** @var AccompanyingPeriod $period */
|
||||
$period = array_filter(
|
||||
$person->getAccompanyingPeriods(),
|
||||
function (AccompanyingPeriod $p) use ($period_id) {
|
||||
|
@@ -122,7 +122,7 @@ class LoadCustomFields extends AbstractFixture implements
|
||||
foreach ($personIds as $id) {
|
||||
// add info on 1 person on 2
|
||||
if (rand(0, 1) === 1) {
|
||||
/* @var $person Person */
|
||||
/** @var Person $person */
|
||||
$person = $manager->getRepository(Person::class)->find($id);
|
||||
$person->setCFData([
|
||||
'remarques' => $this->createCustomFieldText()
|
||||
|
@@ -411,7 +411,7 @@ class ListPerson implements ListInterface, ExportElementValidatedInterface
|
||||
private function getLabelForCustomField($key, array $values, $data)
|
||||
{
|
||||
// for fields which are custom fields
|
||||
/* @var $cf CustomField */
|
||||
/** @var CustomField $cf */
|
||||
$cf = $this->entityManager
|
||||
->getRepository(CustomField::class)
|
||||
->findOneBy(['slug' => $this->DQLToSlug($key)]);
|
||||
|
@@ -166,8 +166,9 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
|
||||
return self::NAME;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-PHPdoc)
|
||||
/**
|
||||
* (non-PHPdoc).
|
||||
*
|
||||
* @see \Chill\MainBundle\Search\SearchInterface::getOrder()
|
||||
*/
|
||||
public function getOrder()
|
||||
@@ -175,8 +176,9 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
|
||||
return 100;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-PHPdoc)
|
||||
/**
|
||||
* (non-PHPdoc).
|
||||
*
|
||||
* @see \Chill\MainBundle\Search\SearchInterface::isActiveByDefault()
|
||||
*/
|
||||
public function isActiveByDefault()
|
||||
@@ -184,9 +186,14 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-PHPdoc)
|
||||
/**
|
||||
* (non-PHPdoc).
|
||||
*
|
||||
* @see \Chill\MainBundle\Search\SearchInterface::renderResult()
|
||||
*
|
||||
* @param mixed $start
|
||||
* @param mixed $limit
|
||||
* @param mixed $format
|
||||
*/
|
||||
public function renderResult(array $terms, $start = 0, $limit = 50, array $options = [], $format = 'html')
|
||||
{
|
||||
|
@@ -498,7 +498,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase
|
||||
]);
|
||||
|
||||
$periods = $this->person->getAccompanyingPeriodsOrdered();
|
||||
/* @var $criteria Criteria */
|
||||
/** @var Criteria $criteria */
|
||||
$criteria = Criteria::create();
|
||||
//$criteria->where(Criteria::expr()->eq('openingDate', \DateTime::createFromFormat()))
|
||||
$firstPeriod = reset($periods);
|
||||
|
Reference in New Issue
Block a user