cs: Switch to a stricter way of coding - this might break in a lot of places.

This commit is contained in:
Pol Dellaiera
2021-11-30 13:33:18 +01:00
parent 28d2c42454
commit 47c5855a21
957 changed files with 9025 additions and 568 deletions

View File

@@ -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\ActivityBundle\Tests\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
@@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
* @internal
* @coversNothing
*/
class ActivityReasonAggregatorTest extends AbstractAggregatorTest
final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
{
/**
* @var \Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator
@@ -26,9 +35,9 @@ class ActivityReasonAggregatorTest extends AbstractAggregatorTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
$container = static::$kernel->getContainer();
$container = self::$kernel->getContainer();
$this->aggregator = $container->get('chill.activity.export.reason_aggregator');
@@ -57,11 +66,11 @@ class ActivityReasonAggregatorTest extends AbstractAggregatorTest
public function getQueryBuilders()
{
if (null === static::$kernel) {
static::bootKernel();
if (null === self::$kernel) {
self::bootKernel();
}
$em = static::$kernel->getContainer()
$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
return [

View File

@@ -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\ActivityBundle\Tests\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
@@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
* @internal
* @coversNothing
*/
class ActivityTypeAggregatorTest extends AbstractAggregatorTest
final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
{
/**
* @var \Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator
@@ -26,9 +35,9 @@ class ActivityTypeAggregatorTest extends AbstractAggregatorTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
$container = static::$kernel->getContainer();
$container = self::$kernel->getContainer();
$this->aggregator = $container->get('chill.activity.export.type_aggregator');
@@ -56,11 +65,11 @@ class ActivityTypeAggregatorTest extends AbstractAggregatorTest
public function getQueryBuilders()
{
if (null === static::$kernel) {
static::bootKernel();
if (null === self::$kernel) {
self::bootKernel();
}
$em = static::$kernel->getContainer()
$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
return [

View File

@@ -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\ActivityBundle\Tests\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
@@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
* @internal
* @coversNothing
*/
class ActivityUserAggregatorTest extends AbstractAggregatorTest
final class ActivityUserAggregatorTest extends AbstractAggregatorTest
{
/**
* @var \Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator
@@ -26,9 +35,9 @@ class ActivityUserAggregatorTest extends AbstractAggregatorTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
$container = static::$kernel->getContainer();
$container = self::$kernel->getContainer();
$this->aggregator = $container->get('chill.activity.export.user_aggregator');
@@ -56,11 +65,11 @@ class ActivityUserAggregatorTest extends AbstractAggregatorTest
public function getQueryBuilders()
{
if (null === static::$kernel) {
static::bootKernel();
if (null === self::$kernel) {
self::bootKernel();
}
$em = static::$kernel->getContainer()
$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
return [

View File

@@ -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\ActivityBundle\Tests\Export\Export;
use Chill\MainBundle\Test\Export\AbstractExportTest;
@@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
* @internal
* @coversNothing
*/
class CountActivityTest extends AbstractExportTest
final class CountActivityTest extends AbstractExportTest
{
/**
* @var
@@ -24,7 +33,7 @@ class CountActivityTest extends AbstractExportTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */
$container = self::$kernel->getContainer();

View File

@@ -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\ActivityBundle\Tests\Export\Export;
use Chill\MainBundle\Test\Export\AbstractExportTest;
@@ -15,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
* @internal
* @coversNothing
*/
class ListActivityTest extends AbstractExportTest
final class ListActivityTest extends AbstractExportTest
{
/**
* @var \Chill\ActivityBundle\Export\Export\ListActivity
@@ -24,7 +33,7 @@ class ListActivityTest extends AbstractExportTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */
$container = self::$kernel->getContainer();

View File

@@ -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\ActivityBundle\Tests\Export\Export;
use Chill\MainBundle\Test\Export\AbstractExportTest;
@@ -17,7 +26,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
* @internal
* @coversNothing
*/
class StatActivityDurationSumTest extends AbstractExportTest
final class StatActivityDurationSumTest extends AbstractExportTest
{
/**
* @var \Chill\ActivityBundle\Export\Export\StatActivityDuration
@@ -26,7 +35,7 @@ class StatActivityDurationSumTest extends AbstractExportTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */
$container = self::$kernel->getContainer();

View File

@@ -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\ActivityBundle\Tests\Filter;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
@@ -16,7 +25,7 @@ use Doctrine\Common\Collections\ArrayCollection;
* @internal
* @coversNothing
*/
class ActivityReasonFilterTest extends AbstractFilterTest
final class ActivityReasonFilterTest extends AbstractFilterTest
{
/**
* @var \Chill\PersonBundle\Export\Filter\GenderFilter
@@ -25,9 +34,9 @@ class ActivityReasonFilterTest extends AbstractFilterTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
$container = static::$kernel->getContainer();
$container = self::$kernel->getContainer();
$this->filter = $container->get('chill.activity.export.reason_filter');
@@ -48,11 +57,11 @@ class ActivityReasonFilterTest extends AbstractFilterTest
public function getFormData()
{
if (null === static::$kernel) {
static::bootKernel();
if (null === self::$kernel) {
self::bootKernel();
}
$em = static::$kernel->getContainer()
$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
$reasons = $em->createQuery('SELECT reason '
@@ -69,11 +78,11 @@ class ActivityReasonFilterTest extends AbstractFilterTest
public function getQueryBuilders()
{
if (null === static::$kernel) {
static::bootKernel();
if (null === self::$kernel) {
self::bootKernel();
}
$em = static::$kernel->getContainer()
$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
return [

View File

@@ -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\ActivityBundle\Tests\Filter;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
@@ -17,7 +26,7 @@ use function array_slice;
* @internal
* @coversNothing
*/
class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
{
/**
* @var \Chill\PersonBundle\Export\Filter\PersonHavingActivityBetweenDateFilter
@@ -26,9 +35,9 @@ class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
public function setUp()
{
static::bootKernel();
self::bootKernel();
$container = static::$kernel->getContainer();
$container = self::$kernel->getContainer();
$this->filter = $container->get('chill.activity.export.'
. 'person_having_an_activity_between_date_filter');
@@ -69,11 +78,11 @@ class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
public function getQueryBuilders()
{
if (null === static::$kernel) {
static::bootKernel();
if (null === self::$kernel) {
self::bootKernel();
}
$em = static::$kernel->getContainer()
$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
return [
@@ -98,11 +107,11 @@ class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
*/
private function getActivityReasons()
{
if (null === static::$kernel) {
static::bootKernel();
if (null === self::$kernel) {
self::bootKernel();
}
return static::$kernel->getContainer()
return self::$kernel->getContainer()
->get('chill_activity.repository.reason')
->findAll();
}