Skip to content

Commit eb74e2a

Browse files
CS Fixer
1 parent ee0611b commit eb74e2a

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

src/Maker/MakeAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,13 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
257257

258258
if ($this->supportsLogoutRouteLoader()) {
259259
$yamlData = [];
260-
if (\file_exists($path = 'config/routes/security.yaml')) {
260+
if (file_exists($path = 'config/routes/security.yaml')) {
261261
$yamlData = Yaml::parse($this->fileManager->getFileContents($path)) ?? [];
262262
}
263263
if (!(\array_key_exists('_symfony_logout', $yamlData) && 'security.route_loader.logout' !== $yamlData['_symfony_logout']['ressource'] ?? null)) {
264264
$yamlData['_symfony_logout'] = [
265265
'resource' => 'security.route_loader.logout',
266-
'type' => 'service'
266+
'type' => 'service',
267267
];
268268
}
269269
$generator->dumpFile($path, Yaml::dump($yamlData));

src/Util/FeatureSupportTrait.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Util;
13+
414
/**
515
* @internal
616
*/

tests/Maker/MakeAuthenticatorTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,13 @@ public function getTestDetails(): \Generator
282282
->run(function (MakerTestRunner $runner) {
283283
$this->makeUser($runner, 'userEmail');
284284
// We pretend that the LogoutRouteLoader is registered
285-
$runner->addToAutoloader('Symfony\\Bundle\\SecurityBundle\\Routing\\', \dirname(__DIR__) . '/fixtures/security-bundle/routing/');
285+
$runner->addToAutoloader('Symfony\\Bundle\\SecurityBundle\\Routing\\', \dirname(__DIR__).'/fixtures/security-bundle/routing/');
286286
$runner->modifyYamlFile('config/services.yaml', function (array $config) {
287287
$config['services']['security.route_loader.logout'] = [
288288
'class' => 'Symfony\Bundle\SecurityBundle\\Routing\\LogoutRouteLoader',
289289
'tags' => ['routing.route_loader'],
290290
];
291+
291292
return $config;
292293
});
293294
$output = $runner->runMaker([
@@ -308,7 +309,7 @@ public function getTestDetails(): \Generator
308309
$this->assertStringContainsString('Success', $output);
309310

310311
$this->assertFileExists($runner->getPath('src/Controller/SecurityController.php'));
311-
$this->assertFileEquals(\dirname(__DIR__) . '/fixtures/make-auth/SecurityController-no-logout.php', $runner->getPath('src/Controller/SecurityController.php'));
312+
$this->assertFileEquals(\dirname(__DIR__).'/fixtures/make-auth/SecurityController-no-logout.php', $runner->getPath('src/Controller/SecurityController.php'));
312313
$this->assertFileExists($runner->getPath('templates/security/login.html.twig'));
313314
$this->assertFileExists($runner->getPath('src/Security/AppCustomAuthenticator.php'));
314315

tests/Maker/Security/MakeFormLoginTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getTestDetails(): \Generator
7676
$this->assertFalse(isset($securityConfig['security']['firewalls']['main']['logout']['path']));
7777
}),
7878
];
79-
//
79+
8080
yield 'generates_form_login_with_custom_controller_name' => [$this->createMakerTest()
8181
->run(function (MakerTestRunner $runner) {
8282
$this->makeUser($runner);
@@ -103,7 +103,7 @@ public function getTestDetails(): \Generator
103103
yield 'generates_form_login_with_logout_with_route_loader' => [$this->createMakerTest()
104104
->run(function (MakerTestRunner $runner) {
105105
// We pretend that the LogoutRouteLoader is registered
106-
$runner->addToAutoloader('Symfony\\Bundle\\SecurityBundle\\Routing\\', \dirname(__DIR__, 2) . '/fixtures/security-bundle/routing');
106+
$runner->addToAutoloader('Symfony\\Bundle\\SecurityBundle\\Routing\\', \dirname(__DIR__, 2).'/fixtures/security-bundle/routing');
107107
$this->makeUser($runner);
108108
$output = $runner->runMaker([
109109
'SecurityController', // Controller Name

tests/Security/SecurityConfigUpdaterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function testUpdateForAuthenticator(string $firewallName, $entryPoint, st
109109
$this->createLogger();
110110

111111
$updater = new SecurityConfigUpdater($this->ysmLogger);
112-
if($useLogoutRouteLoader) {
112+
if ($useLogoutRouteLoader) {
113113
$updater->forceSupportLogoutRouteLoader();
114114
}
115115
$source = file_get_contents(__DIR__.'/yaml_fixtures/source/'.$startingSourceFilename);
@@ -209,7 +209,7 @@ public function getAuthenticatorTests(): \Generator
209209
true,
210210
false,
211211
false,
212-
true
212+
true,
213213
];
214214
}
215215

0 commit comments

Comments
 (0)