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\EventBundle\Tests\Search;
use Chill\EventBundle\Entity\Event;
@@ -21,7 +30,7 @@ use function in_array;
* @internal
* @coversNothing
*/
class EventSearchTest extends WebTestCase
final class EventSearchTest extends WebTestCase
{
/**
* The center A.
@@ -72,7 +81,7 @@ class EventSearchTest extends WebTestCase
/** @var \Symfony\Component\HttpKernel\KernelInterface $kernel */
$kernel = self::$kernel;
$this->client = static::createClient([], [
$this->client = self::createClient([], [
'PHP_AUTH_USER' => 'center a_social',
'PHP_AUTH_PW' => 'password',
'HTTP_ACCEPT_LANGUAGE' => 'fr_FR',
@@ -124,7 +133,7 @@ class EventSearchTest extends WebTestCase
*/
public function testDisplayAllWrongUser()
{
$client = static::createClient([], [
$client = self::createClient([], [
'PHP_AUTH_USER' => 'center b_social',
'PHP_AUTH_PW' => 'password',
'HTTP_ACCEPT_LANGUAGE' => 'fr_FR',
@@ -162,7 +171,7 @@ class EventSearchTest extends WebTestCase
// there should not have any other results, but if any other bundle
// add some other event, we go on next pages
if ($crawler->selectLink('Voir tous les résultats')->count() == 0) {
if ($crawler->selectLink('Voir tous les résultats')->count() === 0) {
return;
}
@@ -239,7 +248,7 @@ class EventSearchTest extends WebTestCase
$this->assertLessThanOrEqual($dateTo, $date);
}
if ($crawler->selectLink('Voir tous les résultats')->count() == 0) {
if ($crawler->selectLink('Voir tous les résultats')->count() === 0) {
return;
}
@@ -336,7 +345,7 @@ class EventSearchTest extends WebTestCase
/** @var \Chill\MainBundle\Entity\Scope $circle */
foreach ($circles as $circle) {
if (in_array($name, $circle->getName())) {
if (in_array($name, $circle->getName(), true)) {
return $circle;
}
}