Skip to content

Commit a7f39b8

Browse files
wouterjnicolas-grekas
authored andcommitted
Add void return types
1 parent 40a289b commit a7f39b8

16 files changed

+75
-6
lines changed

ContainerAwareEventManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function removeEventSubscriber(EventSubscriber $subscriber): void
167167
parent::removeEventSubscriber($subscriber);
168168
}
169169

170-
private function initializeListeners(string $eventName)
170+
private function initializeListeners(string $eventName): void
171171
{
172172
$this->initialized[$eventName] = true;
173173
foreach ($this->listeners[$eventName] as $hash => $listener) {
@@ -179,7 +179,7 @@ private function initializeListeners(string $eventName)
179179
}
180180
}
181181

182-
private function initializeSubscribers()
182+
private function initializeSubscribers(): void
183183
{
184184
$this->initializedSubscribers = true;
185185
foreach ($this->subscribers as $subscriber) {

DataCollector/DoctrineDataCollector.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,17 @@ public function __construct(
4747

4848
/**
4949
* Adds the stack logger for a connection.
50+
*
51+
* @return void
5052
*/
5153
public function addLogger(string $name, DebugStack $logger)
5254
{
5355
$this->loggers[$name] = $logger;
5456
}
5557

58+
/**
59+
* @return void
60+
*/
5661
public function collect(Request $request, Response $response, \Throwable $exception = null)
5762
{
5863
$this->data = [
@@ -81,6 +86,9 @@ private function collectQueries(): array
8186
return $queries;
8287
}
8388

89+
/**
90+
* @return void
91+
*/
8492
public function reset()
8593
{
8694
$this->data = [];

DataFixtures/ContainerAwareLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public function __construct(ContainerInterface $container)
3232
$this->container = $container;
3333
}
3434

35+
/**
36+
* @return void
37+
*/
3538
public function addFixture(FixtureInterface $fixture)
3639
{
3740
if ($fixture instanceof ContainerAwareInterface) {

DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ abstract class AbstractDoctrineExtension extends Extension
3838
/**
3939
* @param array $objectManager A configured object manager
4040
*
41+
* @return void
42+
*
4143
* @throws \InvalidArgumentException
4244
*/
4345
protected function loadMappingInformation(array $objectManager, ContainerBuilder $container)
@@ -105,6 +107,8 @@ protected function loadMappingInformation(array $objectManager, ContainerBuilder
105107
* Register the alias for this mapping driver.
106108
*
107109
* Aliases can be used in the Query languages of all the Doctrine object managers to simplify writing tasks.
110+
*
111+
* @return void
108112
*/
109113
protected function setMappingDriverAlias(array $mappingConfig, string $mappingName)
110114
{
@@ -118,6 +122,8 @@ protected function setMappingDriverAlias(array $mappingConfig, string $mappingNa
118122
/**
119123
* Register the mapping driver configuration for later use with the object managers metadata driver chain.
120124
*
125+
* @return void
126+
*
121127
* @throws \InvalidArgumentException
122128
*/
123129
protected function setMappingDriverConfig(array $mappingConfig, string $mappingName)
@@ -172,6 +178,8 @@ protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \Re
172178

173179
/**
174180
* Register all the collected mapping information with the object manager by registering the appropriate mapping drivers.
181+
*
182+
* @return void
175183
*/
176184
protected function registerMappingDrivers(array $objectManager, ContainerBuilder $container)
177185
{
@@ -227,6 +235,8 @@ protected function registerMappingDrivers(array $objectManager, ContainerBuilder
227235
/**
228236
* Assertion if the specified mapping information is valid.
229237
*
238+
* @return void
239+
*
230240
* @throws \InvalidArgumentException
231241
*/
232242
protected function assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName)
@@ -315,6 +325,8 @@ private function detectMappingType(string $directory, ContainerBuilder $containe
315325
/**
316326
* Loads a configured object manager metadata, query or result cache driver.
317327
*
328+
* @return void
329+
*
318330
* @throws \InvalidArgumentException in case of unknown driver type
319331
*/
320332
protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName)

DependencyInjection/CompilerPass/DoctrineValidationPass.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public function __construct(string $managerType)
2828
$this->managerType = $managerType;
2929
}
3030

31+
/**
32+
* @return void
33+
*/
3134
public function process(ContainerBuilder $container)
3235
{
3336
$this->updateValidatorMappingFiles($container, 'xml', 'xml');
@@ -38,7 +41,7 @@ public function process(ContainerBuilder $container)
3841
* Gets the validation mapping files for the format and extends them with
3942
* files matching a doctrine search pattern (Resources/config/validation.orm.xml).
4043
*/
41-
private function updateValidatorMappingFiles(ContainerBuilder $container, string $mapping, string $extension)
44+
private function updateValidatorMappingFiles(ContainerBuilder $container, string $mapping, string $extension): void
4245
{
4346
if (!$container->hasParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files')) {
4447
return;

DependencyInjection/CompilerPass/RegisterMappingsPass.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ public function __construct(Definition|Reference $driver, array $namespaces, arr
130130

131131
/**
132132
* Register mappings and alias with the metadata drivers.
133+
*
134+
* @return void
133135
*/
134136
public function process(ContainerBuilder $container)
135137
{

DependencyInjection/CompilerPass/RegisterUidTypePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
final class RegisterUidTypePass implements CompilerPassInterface
2121
{
22-
public function process(ContainerBuilder $container)
22+
public function process(ContainerBuilder $container): void
2323
{
2424
if (!class_exists(AbstractUid::class)) {
2525
return;

DependencyInjection/Security/UserProvider/EntityFactory.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public function __construct(string $key, string $providerId)
3333
$this->providerId = $providerId;
3434
}
3535

36+
/**
37+
* @return void
38+
*/
3639
public function create(ContainerBuilder $container, string $id, array $config)
3740
{
3841
$container
@@ -51,6 +54,9 @@ public function getKey()
5154
return $this->key;
5255
}
5356

57+
/**
58+
* @return void
59+
*/
5460
public function addConfiguration(NodeDefinition $node)
5561
{
5662
$node

Form/EventListener/MergeDoctrineCollectionListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public static function getSubscribedEvents(): array
3838
];
3939
}
4040

41+
/**
42+
* @return void
43+
*/
4144
public function onSubmit(FormEvent $event)
4245
{
4346
$collection = $event->getForm()->getData();

Form/Type/DoctrineType.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public function __construct(ManagerRegistry $registry)
9797
$this->registry = $registry;
9898
}
9999

100+
/**
101+
* @return void
102+
*/
100103
public function buildForm(FormBuilderInterface $builder, array $options)
101104
{
102105
if ($options['multiple'] && interface_exists(Collection::class)) {
@@ -107,6 +110,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
107110
}
108111
}
109112

113+
/**
114+
* @return void
115+
*/
110116
public function configureOptions(OptionsResolver $resolver)
111117
{
112118
$choiceLoader = function (Options $options) {
@@ -232,6 +238,9 @@ public function getParent(): string
232238
return ChoiceType::class;
233239
}
234240

241+
/**
242+
* @return void
243+
*/
235244
public function reset()
236245
{
237246
$this->idReaders = [];

0 commit comments

Comments
 (0)