cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,74 +1,62 @@
<?php
/*
* Copyright (C) 2017 Champs-Libres <info@champs-libres.coop>
/**
* Chill is a software for social workers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\PersonBundle\Tests\Export\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
use DateTime;
/**
*
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* @internal
* @coversNothing
*/
class AgeAggregatorTest extends AbstractAggregatorTest
{
/**
*
* @var \Chill\PersonBundle\Export\Aggregator\AgeAggregator
*/
private $aggregator;
public function setUp()
{
static::bootKernel();
$this->aggregator = static::$container->get('chill.person.export.aggregator_age');
$this->aggregator = static::$container->get('chill.person.export.aggregator_age');
}
public function getAggregator()
{
return $this->aggregator;
}
public function getFormData()
{
return array(
array(
'date_age_calculation' => \DateTime::createFromFormat('Y-m-d','2016-06-16')
)
);
}
public function getQueryBuilders()
{
if (static::$kernel === null) {
static::bootKernel();
}
$em = static::$container
->get('doctrine.orm.entity_manager');
return array(
$em->createQueryBuilder()
->select('count(person.id)')
->from('ChillPersonBundle:Person', 'person')
);
return [
[
'date_age_calculation' => DateTime::createFromFormat('Y-m-d', '2016-06-16'),
],
];
}
public function getQueryBuilders()
{
if (null === static::$kernel) {
static::bootKernel();
}
$em = static::$container
->get('doctrine.orm.entity_manager');
return [
$em->createQueryBuilder()
->select('count(person.id)')
->from('ChillPersonBundle:Person', 'person'),
];
}
}

View File

@@ -1,70 +1,59 @@
<?php
/*
* Copyright (C) 2017 Champs Libres Cooperative <info@champs-libres.coop>
/**
* Chill is a software for social workers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\PersonBundle\Tests\Export\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
/**
*
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* @internal
* @coversNothing
*/
class GenderAggregatorTest extends AbstractAggregatorTest
{
/**
*
* @var \Chill\PersonBundle\Export\Aggregator\GenderAggregator
*/
private $aggregator;
public function setUp()
{
static::bootKernel();
$this->aggregator = static::$container->get('chill.person.export.aggregator_gender');
$this->aggregator = static::$container->get('chill.person.export.aggregator_gender');
}
public function getAggregator()
{
return $this->aggregator;
}
public function getFormData()
{
return array(
array()
);
return [
[],
];
}
public function getQueryBuilders()
{
if (static::$kernel === null) {
if (null === static::$kernel) {
static::bootKernel();
}
$em = static::$container
->get('doctrine.orm.entity_manager');
return array(
return [
$em->createQueryBuilder()
->select('count(person.id)')
->from('ChillPersonBundle:Person', 'person')
);
->from('ChillPersonBundle:Person', 'person'),
];
}
}

View File

@@ -1,70 +1,60 @@
<?php
/*
* Copyright (C) 2017 Champs Libres Cooperative <info@champs-libres.coop>
/**
* Chill is a software for social workers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\PersonBundle\Tests\Export\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
/**
*
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* @internal
* @coversNothing
*/
class NationalityAggregatorTest extends AbstractAggregatorTest
{
/**
*
* @var \Chill\PersonBundle\Export\Aggregator\NationalityAggregator
*/
private $aggregator;
public function setUp()
{
static::bootKernel();
$this->aggregator = static::$container->get('chill.person.export.aggregator_nationality');
$this->aggregator = static::$container->get('chill.person.export.aggregator_nationality');
}
public function getAggregator()
{
return $this->aggregator;
}
public function getFormData()
{
return array(
array('group_by_level' => 'country'),
array('group_by_level' => 'continent')
);
return [
['group_by_level' => 'country'],
['group_by_level' => 'continent'],
];
}
public function getQueryBuilders()
{
if (static::$kernel === null) {
if (null === static::$kernel) {
static::bootKernel();
}
$em = static::$container
->get('doctrine.orm.entity_manager');
return array(
return [
$em->createQueryBuilder()
->select('count(person.id)')
->from('ChillPersonBundle:Person', 'person')
);
->from('ChillPersonBundle:Person', 'person'),
];
}
}