Skip to content

Commit 4dcd928

Browse files
Apply php-cs-fixer rule for array_key_exists()
1 parent 204efa2 commit 4dcd928

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

Command/ConfigDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private function getConfigForPath(array $config, $path, $alias)
139139
$steps = explode('.', $path);
140140

141141
foreach ($steps as $step) {
142-
if (!array_key_exists($step, $config)) {
142+
if (!\array_key_exists($step, $config)) {
143143
throw new LogicException(sprintf('Unable to find configuration for "%s.%s"', $alias, $path));
144144
}
145145

Console/Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ protected function describeContainerAlias(Alias $alias, array $options = [], Con
156156
*/
157157
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
158158
{
159-
$this->writeData($this->getEventDispatcherListenersData($eventDispatcher, array_key_exists('event', $options) ? $options['event'] : null), $options);
159+
$this->writeData($this->getEventDispatcherListenersData($eventDispatcher, \array_key_exists('event', $options) ? $options['event'] : null), $options);
160160
}
161161

162162
/**

Console/Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ protected function describeContainerParameter($parameter, array $options = [])
275275
*/
276276
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
277277
{
278-
$event = array_key_exists('event', $options) ? $options['event'] : null;
278+
$event = \array_key_exists('event', $options) ? $options['event'] : null;
279279

280280
$title = 'Registered listeners';
281281
if (null !== $event) {

Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ protected function describeContainerParameter($parameter, array $options = [])
385385
*/
386386
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
387387
{
388-
$event = array_key_exists('event', $options) ? $options['event'] : null;
388+
$event = \array_key_exists('event', $options) ? $options['event'] : null;
389389

390390
if (null !== $event) {
391391
$title = sprintf('Registered Listeners for "%s" Event', $event);

Console/Descriptor/XmlDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function describeContainerAlias(Alias $alias, array $options = [], Con
111111
*/
112112
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
113113
{
114-
$this->writeDocument($this->getEventDispatcherListenersDocument($eventDispatcher, array_key_exists('event', $options) ? $options['event'] : null));
114+
$this->writeDocument($this->getEventDispatcherListenersDocument($eventDispatcher, \array_key_exists('event', $options) ? $options['event'] : null));
115115
}
116116

117117
/**

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
371371
}
372372

373373
foreach ($transitions as $name => $transition) {
374-
if (array_key_exists('name', $transition)) {
374+
if (\array_key_exists('name', $transition)) {
375375
continue;
376376
}
377377
$transition['name'] = $name;

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
602602
$registryDefinition = $container->getDefinition('workflow.registry');
603603

604604
foreach ($config['workflows'] as $name => $workflow) {
605-
if (!array_key_exists('type', $workflow)) {
605+
if (!\array_key_exists('type', $workflow)) {
606606
$workflow['type'] = 'workflow';
607607
@trigger_error(sprintf('The "type" option of the "framework.workflows.%s" configuration entry must be defined since Symfony 3.3. The default value will be "state_machine" in Symfony 4.0.', $name), E_USER_DEPRECATED);
608608
}
@@ -1052,7 +1052,7 @@ private function registerAssetsConfiguration(array $config, ContainerBuilder $co
10521052
foreach ($config['packages'] as $name => $package) {
10531053
if (null !== $package['version_strategy']) {
10541054
$version = new Reference($package['version_strategy']);
1055-
} elseif (!array_key_exists('version', $package) && null === $package['json_manifest_path']) {
1055+
} elseif (!\array_key_exists('version', $package) && null === $package['json_manifest_path']) {
10561056
// if neither version nor json_manifest_path are specified, use the default
10571057
$version = $defaultVersion;
10581058
} else {
@@ -1273,15 +1273,15 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
12731273
$definition = $container->findDefinition('validator.email');
12741274
$definition->replaceArgument(0, $config['strict_email']);
12751275

1276-
if (array_key_exists('enable_annotations', $config) && $config['enable_annotations']) {
1276+
if (\array_key_exists('enable_annotations', $config) && $config['enable_annotations']) {
12771277
if (!$this->annotationsConfigEnabled) {
12781278
throw new \LogicException('"enable_annotations" on the validator cannot be set as Annotations support is disabled.');
12791279
}
12801280

12811281
$validatorBuilder->addMethodCall('enableAnnotationMapping', [new Reference('annotation_reader')]);
12821282
}
12831283

1284-
if (array_key_exists('static_method', $config) && $config['static_method']) {
1284+
if (\array_key_exists('static_method', $config) && $config['static_method']) {
12851285
foreach ($config['static_method'] as $methodName) {
12861286
$validatorBuilder->addMethodCall('addMethodMapping', [$methodName]);
12871287
}

0 commit comments

Comments
 (0)