Skip to content

Commit e033cd0

Browse files
committed
fabbot
1 parent b25aa61 commit e033cd0

File tree

2 files changed

+72
-72
lines changed

2 files changed

+72
-72
lines changed

src/Command/MakeAuthenticatorCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ protected function getParameters(): array
3939
$className = Str::asClassName($this->input->getArgument('authenticator-class'));
4040
Validator::validateClassName($className);
4141

42-
return [
42+
return array(
4343
'class_name' => $className,
44-
];
44+
);
4545
}
4646

4747
protected function getFiles(array $params): array
4848
{
49-
return [
49+
return array(
5050
__DIR__.'/../Resources/skeleton/authenticator/Empty.php.txt' => 'src/Security/'.$params['class_name'].'.php',
51-
];
51+
);
5252
}
5353

5454
protected function writeNextStepsMessage(array $params, ConsoleStyle $io)
5555
{
56-
$io->text([
56+
$io->text(array(
5757
'Next: Customize your new authenticator.',
58-
'Then, configure the "guard" key on your firewall to use it.'
59-
]);
58+
'Then, configure the "guard" key on your firewall to use it.',
59+
));
6060
}
6161

6262
protected function configureDependencies(DependencyBuilder $dependencies)

tests/Command/FunctionalTest.php

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function tearDown()
4848
*/
4949
public function testCommands(AbstractCommand $command, array $inputs)
5050
{
51-
/** @var AbstractCommand $command */
51+
/* @var AbstractCommand $command */
5252
$command->setCheckDependencies(false);
5353
$command->setGenerator($this->createGenerator());
5454

@@ -71,126 +71,126 @@ public function testCommands(AbstractCommand $command, array $inputs)
7171
public function getCommandTests()
7272
{
7373
$generator = $this->createGenerator();
74-
$commands = [];
74+
$commands = array();
7575

76-
$commands['command'] = [
76+
$commands['command'] = array(
7777
new MakeCommandCommand($generator),
78-
[
78+
array(
7979
// command name
80-
'app:foo'
81-
]
82-
];
80+
'app:foo',
81+
),
82+
);
8383

8484
$router = $this->createMock(RouterInterface::class);
8585
$router->expects($this->once())
8686
->method('getRouteCollection')
8787
->willReturn(new RouteCollection());
88-
$commands['controller'] = [
88+
$commands['controller'] = array(
8989
new MakeControllerCommand($generator, $router),
90-
[
90+
array(
9191
// controller class name
92-
'FooBar'
93-
]
94-
];
92+
'FooBar',
93+
),
94+
);
9595

96-
$commands['entity'] = [
96+
$commands['entity'] = array(
9797
new MakeEntityCommand($generator),
98-
[
98+
array(
9999
// entity class name
100-
'FooBar'
101-
]
102-
];
100+
'FooBar',
101+
),
102+
);
103103

104-
$commands['form'] = [
104+
$commands['form'] = array(
105105
new MakeFormCommand($generator),
106-
[
106+
array(
107107
// form name
108-
'FooBar'
109-
]
110-
];
108+
'FooBar',
109+
),
110+
);
111111

112-
$commands['functional'] = [
112+
$commands['functional'] = array(
113113
new MakeFunctionalTestCommand($generator),
114-
[
114+
array(
115115
// functional test class
116-
'FooBar'
117-
]
118-
];
116+
'FooBar',
117+
),
118+
);
119119

120120
$eventRegistry = $this->createMock(EventRegistry::class);
121121
$eventRegistry->expects($this->any())
122122
->method('getAllActiveEvents')
123-
->willReturn(['foo.bar']);
123+
->willReturn(array('foo.bar'));
124124
$eventRegistry->expects($this->once())
125125
->method('getEventClassName')
126126
->with('kernel.request')
127127
->willReturn(GetResponseEvent::class);
128-
$commands['subscriber'] = [
128+
$commands['subscriber'] = array(
129129
new MakeSubscriberCommand($generator, $eventRegistry),
130-
[
130+
array(
131131
// subscriber name
132132
'FooBar',
133133
// event name
134-
'kernel.request'
135-
],
136-
];
134+
'kernel.request',
135+
),
136+
);
137137

138138
$eventRegistry2 = $this->createMock(EventRegistry::class);
139139
$eventRegistry2->expects($this->any())
140140
->method('getAllActiveEvents')
141-
->willReturn([]);
141+
->willReturn(array());
142142
$eventRegistry2->expects($this->once())
143143
->method('getEventClassName')
144144
->willReturn(null);
145-
$commands['subscriber_unknown_event_class'] = [
145+
$commands['subscriber_unknown_event_class'] = array(
146146
new MakeSubscriberCommand($generator, $eventRegistry2),
147-
[
147+
array(
148148
// subscriber name
149149
'FooBar',
150150
// event name
151-
'foo.unknown_event'
152-
],
153-
];
151+
'foo.unknown_event',
152+
),
153+
);
154154

155-
$commands['twig_extension'] = [
155+
$commands['twig_extension'] = array(
156156
new MakeTwigExtensionCommand($generator),
157-
[
157+
array(
158158
// extension class name
159-
'FooBar'
160-
]
161-
];
159+
'FooBar',
160+
),
161+
);
162162

163-
$commands['unit_test'] = [
163+
$commands['unit_test'] = array(
164164
new MakeUnitTestCommand($generator),
165-
[
165+
array(
166166
// class name
167-
'FooBar'
168-
]
169-
];
167+
'FooBar',
168+
),
169+
);
170170

171-
$commands['validator'] = [
171+
$commands['validator'] = array(
172172
new MakeValidatorCommand($generator),
173-
[
173+
array(
174174
// validator name
175-
'FooBar'
176-
]
177-
];
175+
'FooBar',
176+
),
177+
);
178178

179-
$commands['voter'] = [
179+
$commands['voter'] = array(
180180
new MakeVoterCommand($generator),
181-
[
181+
array(
182182
// voter class name
183-
'FooBar'
184-
]
185-
];
183+
'FooBar',
184+
),
185+
);
186186

187-
$commands['auth_empty'] = [
187+
$commands['auth_empty'] = array(
188188
new MakeAuthenticatorCommand($generator),
189-
[
189+
array(
190190
// class name
191-
'AppCustomAuthenticator'
192-
]
193-
];
191+
'AppCustomAuthenticator',
192+
),
193+
);
194194

195195
return $commands;
196196
}
@@ -202,7 +202,7 @@ private function createGenerator()
202202

203203
private function parsePHPFiles($output)
204204
{
205-
$files = [];
205+
$files = array();
206206
foreach (explode("\n", $output) as $line) {
207207
if (false === strpos($line, 'created:')) {
208208
continue;

0 commit comments

Comments
 (0)