apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -11,10 +11,9 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Tests\Controller;
//ini_set('memory_limit', '-1');
// ini_set('memory_limit', '-1');
use Chill\PersonBundle\Entity\Person;
use Closure;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
@@ -23,6 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
* As I am logged in as "center a_social"
*
* @internal
*
* @coversNothing
*/
final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
@@ -63,8 +63,8 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
$this->em->persist($this->person);
$this->em->flush();
$this->editUrl = '/en/person/' . $this->person->getId() . '/general/edit';
$this->viewUrl = '/en/person/' . $this->person->getId() . '/general';
$this->editUrl = '/en/person/'.$this->person->getId().'/general/edit';
$this->viewUrl = '/en/person/'.$this->person->getId().'/general';
$this->client = self::createClient(
[
@@ -109,13 +109,13 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
* @param string $field
* @param string $value
*/
public function testEditTextField($field, $value, Closure $callback)
public function testEditTextField($field, $value, \Closure $callback)
{
$crawler = $this->client->request('GET', $this->editUrl);
$form = $crawler->selectButton('Submit')
->form();
//transform countries into value if needed
// transform countries into value if needed
switch ($field) {
case 'nationality':
case 'countryOfBirth':
@@ -133,7 +133,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
$transformedValue = $value;
}
$form->get('chill_personbundle_person[' . $field . ']')
$form->get('chill_personbundle_person['.$field.']')
->setValue($transformedValue);
$this->client->submit($form);
@@ -146,7 +146,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
$this->assertEquals(
$value,
$callback($this->person),
'the value ' . $field . ' is updated in db'
'the value '.$field.' is updated in db'
);
$crawler = $this->client->followRedirect();
@@ -160,7 +160,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
|| 'gender' === $field) {
// we do not perform test on the web page contents.
} else {
$this->assertGreaterThan(0, $crawler->filter('html:contains("' . $value . '")')->count());
$this->assertGreaterThan(0, $crawler->filter('html:contains("'.$value.'")')->count());
}
}
@@ -175,10 +175,10 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
$configurables = ['placeOfBirth', 'phonenumber', 'email',
'countryOfBirth', 'nationality', 'spokenLanguages', 'maritalStatus', ];
$form = $crawler->selectButton('Submit')->form(); //;
$form = $crawler->selectButton('Submit')->form(); // ;
foreach ($configurables as $key) {
$this->assertFalse($form->has('chill_personbundle_person[' . $key . ']'));
$this->assertFalse($form->has('chill_personbundle_person['.$key.']'));
}
}