8000 Fixed coding standards · symfony/symfony@531be07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 531be07

Browse files
Fixed coding standards
1 parent f42a377 commit 531be07

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,19 @@ protected function processValue($value, $isRoot = false)
150150
}
151151

152152
foreach ($reflectionMethod->getParameters() as $key => $parameter) {
153-
if (array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
153+
if (\array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
154154
continue;
155155
}
156156

157157
$typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter);
158158

159-
if (array_key_exists($k = ltrim($typeHint, '\\').' $'.$parameter->name, $bindings)) {
159+
if (\array_key_exists($k = ltrim($typeHint, '\\').' $'.$parameter->name, $bindings)) {
160160
$arguments[$key] = $this->getBindingValue($bindings[$k]);
161161

162162
continue;
163163
}
164164

165-
if (array_key_exists('$'.$parameter->name, $bindings)) {
165+
if (\array_key_exists('$'.$parameter->name, $bindings)) {
166166
$arguments[$key] = $this->getBindingValue($bindings['$'.$parameter->name]);
167167

168168
continue;

src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
1616
use Symfony\Component\DependencyInjection\Loader\Configurator\DefaultsConfigurator;
1717
use Symfony\Component\DependencyInjection\Loader\Configurator\InstanceofConfigurator;
18-
use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
1918
use Symfony\Component\DependencyInjection\Reference;
2019

2120
trait BindTrait

src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
359359
continue;
360360
}
361361

362-
if (false !== strpos($name, '-') && false === strpos($name, '_') && !array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) {
362+
if (false !== strpos($name, '-') && false === strpos($name, '_') && !\array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) {
363363
$parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue);
364364
}
365365
// keep not normalized key

src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private function parseDefinitions(array $content, string $file)
203203
throw new InvalidArgumentException(sprintf('The "services" key should contain an array in %s. Check your YAML syntax.', $file));
204204
}
205205

206-
if (array_key_exists('_instanceof', $content['services'])) {
206+
if (\array_key_exists('_instanceof', $content['services'])) {
207207
$instanceof = $content['services']['_instanceof'];
208208
unset($content['services']['_instanceof']);
209209

@@ -235,7 +235,7 @@ private function parseDefinitions(array $content, string $file)
235235
*/
236236
private function parseDefaults(array &$content, string $file): array
237237
{
238-
if (!array_key_exists('_defaults', $content['services'])) {
238+
if (!\array_key_exists('_defaults', $content['services'])) {
239239
return [];
240240
}
241241
$defaults = $content['services']['_defaults'];
@@ -344,7 +344,7 @@ private function parseDefinition($id, $service, $file, array $defaults)
344344

345345
if (isset($service['alias'])) {
346346
$this->container->setAlias($id, $alias = new Alias($service['alias']));
347-
if (array_key_exists('public', $service)) {
347+
if (\array_key_exists('public', $service)) {
348348
$alias->setPublic($service['public']);
349349
} elseif (isset($defaults['public'])) {
350350
$alias->setPublic($defaults['public']);
@@ -432,7 +432,7 @@ private function parseDefinition($id, $service, $file, array $defaults)
432432
$definition->setAbstract($service['abstract']);
433433
}
434434

435-
if (array_key_exists('deprecated', $service)) {
435+
if (\array_key_exists('deprecated', $service)) {
436436
$definition->setDeprecated(true, $service['deprecated']);
437437
}
438438

@@ -553,11 +553,11 @@ private function parseDefinition($id, $service, $file, array $defaults)
553553
}
554554
}
555555

556-
if (array_key_exists('namespace', $service) && !array_key_exists('resource', $service)) {
556+
if (\array_key_exists('namespace', $service) && !\array_key_exists('resource', $service)) {
557557
throw new InvalidArgumentException(sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in %s. Check your YAML syntax.', $id, $file));
558558
}
559559

560-
if (array_key_exists('resource', $service)) {
560+
if (\array_key_exists('resource', $service)) {
561561
if (!\is_string($service['resource'])) {
562562
throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in %s. Check your YAML syntax.', $id, $file));
563563
}

src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\HttpKernel\DependencyInjection;
1313

1414
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
15-
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
1615
use Symfony\Component\DependencyInjection\ChildDefinition;
1716
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1817
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;

0 commit comments

Comments
 (0)
0