mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
cs: Switch to a stricter way of coding - this might break in a lot of places.
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* 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;
|
||||
@@ -16,7 +25,7 @@ use DateTime;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class AgeAggregatorTest extends AbstractAggregatorTest
|
||||
final class AgeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Export\Aggregator\AgeAggregator
|
||||
@@ -25,9 +34,9 @@ class AgeAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = static::$container->get('chill.person.export.aggregator_age');
|
||||
$this->aggregator = self::$container->get('chill.person.export.aggregator_age');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@@ -46,11 +55,11 @@ class AgeAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders()
|
||||
{
|
||||
if (null === static::$kernel) {
|
||||
static::bootKernel();
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
$em = static::$container
|
||||
$em = self::$container
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
return [
|
||||
|
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* 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;
|
||||
@@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class GenderAggregatorTest extends AbstractAggregatorTest
|
||||
final class GenderAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Export\Aggregator\GenderAggregator
|
||||
@@ -24,9 +33,9 @@ class GenderAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = static::$container->get('chill.person.export.aggregator_gender');
|
||||
$this->aggregator = self::$container->get('chill.person.export.aggregator_gender');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@@ -43,11 +52,11 @@ class GenderAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders()
|
||||
{
|
||||
if (null === static::$kernel) {
|
||||
static::bootKernel();
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
$em = static::$container
|
||||
$em = self::$container
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
return [
|
||||
|
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* 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;
|
||||
@@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class NationalityAggregatorTest extends AbstractAggregatorTest
|
||||
final class NationalityAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Export\Aggregator\NationalityAggregator
|
||||
@@ -24,9 +33,9 @@ class NationalityAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = static::$container->get('chill.person.export.aggregator_nationality');
|
||||
$this->aggregator = self::$container->get('chill.person.export.aggregator_nationality');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@@ -44,11 +53,11 @@ class NationalityAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders()
|
||||
{
|
||||
if (null === static::$kernel) {
|
||||
static::bootKernel();
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
$em = static::$container
|
||||
$em = self::$container
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
return [
|
||||
|
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
@@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class CountPersonTest extends AbstractExportTest
|
||||
final class CountPersonTest extends AbstractExportTest
|
||||
{
|
||||
/**
|
||||
* @var
|
||||
@@ -26,9 +35,9 @@ class CountPersonTest extends AbstractExportTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
$this->export = static::$container->get('chill.person.export.export_count_person');
|
||||
$this->export = self::$container->get('chill.person.export.export_count_person');
|
||||
}
|
||||
|
||||
public function getExport()
|
||||
|
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
@@ -19,7 +28,7 @@ use DateTime;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class ListPersonTest extends AbstractExportTest
|
||||
final class ListPersonTest extends AbstractExportTest
|
||||
{
|
||||
/**
|
||||
* @var ListPerson
|
||||
@@ -28,9 +37,9 @@ class ListPersonTest extends AbstractExportTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
$this->export = static::$container->get('chill.person.export.list_person');
|
||||
$this->export = self::$container->get('chill.person.export.list_person');
|
||||
|
||||
// add a fake request with a default locale (used in translatable string)
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
@@ -38,7 +47,7 @@ class ListPersonTest extends AbstractExportTest
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
static::$container->get('request_stack')
|
||||
self::$container->get('request_stack')
|
||||
->push($request->reveal());
|
||||
}
|
||||
|
||||
|
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Filter;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
@@ -17,7 +26,7 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class AccompanyingPeriodFilterTest extends AbstractFilterTest
|
||||
final class AccompanyingPeriodFilterTest extends AbstractFilterTest
|
||||
{
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Export\Filter\BirthdateFilter
|
||||
@@ -26,10 +35,10 @@ class AccompanyingPeriodFilterTest extends AbstractFilterTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
try {
|
||||
$this->filter = static::$container->get('chill.person.export.filter_accompanying_period');
|
||||
$this->filter = self::$container->get('chill.person.export.filter_accompanying_period');
|
||||
} catch (ServiceNotFoundException $e) {
|
||||
$this->markTestSkipped('The current configuration does not use accompanying_periods');
|
||||
}
|
||||
@@ -52,11 +61,11 @@ class AccompanyingPeriodFilterTest extends AbstractFilterTest
|
||||
|
||||
public function getQueryBuilders()
|
||||
{
|
||||
if (null === static::$kernel) {
|
||||
static::bootKernel();
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
$em = static::$container
|
||||
$em = self::$container
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
return [
|
||||
|
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Filter;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
@@ -16,7 +25,7 @@ use DateTime;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class BirthdayFilterTest extends AbstractFilterTest
|
||||
final class BirthdayFilterTest extends AbstractFilterTest
|
||||
{
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Export\Filter\BirthdateFilter
|
||||
@@ -25,9 +34,9 @@ class BirthdayFilterTest extends AbstractFilterTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = static::$container->get('chill.person.export.filter_birthdate');
|
||||
$this->filter = self::$container->get('chill.person.export.filter_birthdate');
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
@@ -47,11 +56,11 @@ class BirthdayFilterTest extends AbstractFilterTest
|
||||
|
||||
public function getQueryBuilders()
|
||||
{
|
||||
if (null === static::$kernel) {
|
||||
static::bootKernel();
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
$em = static::$container
|
||||
$em = self::$container
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
return [
|
||||
|
@@ -7,6 +7,15 @@
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers.
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Filter;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
@@ -16,7 +25,7 @@ use Chill\PersonBundle\Entity\Person;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class GenderFilterTest extends AbstractFilterTest
|
||||
final class GenderFilterTest extends AbstractFilterTest
|
||||
{
|
||||
/**
|
||||
* @var \Chill\PersonBundle\Export\Filter\GenderFilter
|
||||
@@ -25,7 +34,7 @@ class GenderFilterTest extends AbstractFilterTest
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
self::bootKernel();
|
||||
|
||||
// add a fake request with a default locale (used in translatable string)
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
@@ -33,7 +42,7 @@ class GenderFilterTest extends AbstractFilterTest
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
$this->filter = static::$container->get('chill.person.export.filter_gender');
|
||||
$this->filter = self::$container->get('chill.person.export.filter_gender');
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
@@ -58,11 +67,11 @@ class GenderFilterTest extends AbstractFilterTest
|
||||
|
||||
public function getQueryBuilders()
|
||||
{
|
||||
if (null === static::$kernel) {
|
||||
static::bootKernel();
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
$em = static::$container
|
||||
$em = self::$container
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
return [
|
||||
|
Reference in New Issue
Block a user