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\AsideActivityBundle\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;

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\AsideActivityBundle\DataFixtures\ORM;
use Chill\AsideActivityBundle\Entity\AsideActivity;

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\AsideActivityBundle\DataFixtures\ORM;
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;

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\AsideActivityBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;

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\AsideActivityBundle\Form;
use Chill\AsideActivityBundle\Entity\AsideActivity;
@@ -143,7 +152,7 @@ final class AsideActivityFormType extends AbstractType
// test if the timestamp is in the choices.
// If not, recreate the field with the new timestamp
if (!in_array($data->getTimestamp(), $timeChoices)) {
if (!in_array($data->getTimestamp(), $timeChoices, true)) {
// the data are not in the possible values. add them
$timeChoices[$data->format('H:i')] = $data->getTimestamp();
$form = $builder->create($fieldName, ChoiceType::class, array_merge(

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\AsideActivityBundle\Menu;
use Knp\Menu\MenuItem;
@@ -29,7 +38,7 @@ final class AdminMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuild
return;
}
if (in_array($menuId, ['admin_index', 'admin_section'])) {
if (in_array($menuId, ['admin_index', 'admin_section'], true)) {
$menu->addChild('Aside activities', [
'route' => 'chill_crud_aside_activity_category_index',
])

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\AsideActivityBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;

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\AsideActivityBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;

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\AsideActivityBundle\Templating\Entity;
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;

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\AsideActivityBundle\Tests\Controller;
use Chill\AsideActivityBundle\Entity\AsideActivity;
@@ -20,7 +29,7 @@ use function shuffle;
* @internal
* @coversNothing
*/
class AsideActivityControllerTest extends WebTestCase
final class AsideActivityControllerTest extends WebTestCase
{
use PrepareClientTrait;