This commit is contained in:
Alexander M. Turek 2020-10-28 22:33:29 +01:00
parent 294cffea25
commit 53f7f5f27e
14 changed files with 21 additions and 21 deletions

View File

@ -449,7 +449,7 @@ class SecurityExtension extends Extension implements PrependExtensionInterface
// Authentication listeners
$firewallAuthenticationProviders = [];
list($authListeners, $defaultEntryPoint) = $this->createAuthenticationListeners($container, $id, $firewall, $firewallAuthenticationProviders, $defaultProvider, $providerIds, $configuredEntryPoint, $contextListenerId);
[$authListeners, $defaultEntryPoint] = $this->createAuthenticationListeners($container, $id, $firewall, $firewallAuthenticationProviders, $defaultProvider, $providerIds, $configuredEntryPoint, $contextListenerId);
if (!$this->authenticatorManagerEnabled) {
$authenticationProviders = array_merge($authenticationProviders, $firewallAuthenticationProviders);
@ -567,7 +567,7 @@ class SecurityExtension extends Extension implements PrependExtensionInterface
$entryPoints[$key] = $entryPoint;
}
} else {
list($provider, $listenerId, $defaultEntryPoint) = $factory->create($container, $id, $firewall[$key], $userProvider, $defaultEntryPoint);
[$provider, $listenerId, $defaultEntryPoint] = $factory->create($container, $id, $firewall[$key], $userProvider, $defaultEntryPoint);
$listeners[] = new Reference($listenerId);
$authenticationProviders[] = $provider;

View File

@ -134,7 +134,7 @@ class CouchbaseBucketAdapter extends AbstractAdapter
$optionsInArray = explode('&', $options);
foreach ($optionsInArray as $option) {
list($key, $value) = explode('=', $option);
[$key, $value] = explode('=', $option);
if (\in_array($key, static::VALID_DSN_OPTIONS, true)) {
$results[$key] = $value;

View File

@ -123,7 +123,7 @@ This conversation was marked as resolved by lstrojny
}
$params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) {
if (!empty($m[2])) {
list($username, $password) = explode(':', $m[2], 2) + [1 => null];
[$username, $password] = explode(':', $m[2], 2) + [1 => null];
}
return 'file:'.($m[1] ?? '');

View File

@ -401,7 +401,7 @@ EOF;
if (2 !== \count($values) || !isset($values[0], $values[1])) {
$this->keys = $this->values = [];
} else {
list($this->keys, $this->values) = $values;
[$this->keys, $this->values] = $values;
}
}

View File

@ -1094,7 +1094,7 @@ EOTXT
$definitions = $this->container->getDefinitions();
ksort($definitions);
foreach ($definitions as $id => $definition) {
if ((list($file, $code) = $services[$id]) && null !== $file && ($definition->isPublic() || !$this->isTrivialInstance($definition) || isset($this->locatedIds[$id]))) {
if (([$file, $code] = $services[$id]) && null !== $file && ($definition->isPublic() || !$this->isTrivialInstance($definition) || isset($this->locatedIds[$id]))) {
yield $file => [$code, $definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1]) && !$definition->isDeprecated() && !$definition->hasErrors()];
}
}

View File

@ -430,7 +430,7 @@ class XmlFileLoader extends FileLoader
// resolve definitions
uksort($definitions, 'strnatcmp');
foreach (array_reverse($definitions) as $id => list($domElement, $file)) {
foreach (array_reverse($definitions) as $id => [$domElement, $file]) {
if (null !== $definition = $this->parseDefinition($domElement, $file, new Definition())) {
$this->setDefinition($id, $definition);
}

View File

@ -590,7 +590,7 @@ class Filesystem
public function tempnam(string $dir, string $prefix/*, string $suffix = ''*/)
{
$suffix = \func_num_args() > 2 ? func_get_arg(2) : '';
list($scheme, $hierarchy) = $this->getSchemeAndHierarchy($dir);
[$scheme, $hierarchy] = $this->getSchemeAndHierarchy($dir);
// If no scheme or scheme is "file" or "gs" (Google Cloud) create temp file in local filesystem
if ((null === $scheme || 'file' === $scheme || 'gs' === $scheme) && '' === $suffix) {

View File

@ -42,7 +42,7 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface
} else {
// any methods listed for call-at-instantiation cannot be actions
$reason = false;
list($id, $action) = explode('::', $controller);
[$id, $action] = explode('::', $controller);
if ($container->hasAlias($id)) {
continue;

View File

@ -404,7 +404,7 @@ class PropertyAccessor implements PropertyAccessorInterface
try {
$result[self::VALUE] = $object->$name();
} catch (\TypeError $e) {
list($trace) = $e->getTrace();
[$trace] = $e->getTrace();
// handle uninitialized properties in PHP >= 7
if (__FILE__ === $trace['file']

View File

@ -118,7 +118,7 @@ class XmlFileLoader extends FileLoader
$schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY);
$methods = preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, \PREG_SPLIT_NO_EMPTY);
list($defaults, $requirements, $options, $condition, $paths, /* $prefixes */, $hosts) = $this->parseConfigs($node, $path);
[$defaults, $requirements, $options, $condition, $paths, /* $prefixes */, $hosts] = $this->parseConfigs($node, $path);
if (!$paths && '' === $node->getAttribute('path')) {
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must have a "path" attribute or <path> child nodes.', $path));
@ -163,7 +163,7 @@ class XmlFileLoader extends FileLoader
$trailingSlashOnRoot = $node->hasAttribute('trailing-slash-on-root') ? XmlUtils::phpize($node->getAttribute('trailing-slash-on-root')) : true;
$namePrefix = $node->getAttribute('name-prefix') ?: null;
list($defaults, $requirements, $options, $condition, /* $paths */, $prefixes, $hosts) = $this->parseConfigs($node, $path);
[$defaults, $requirements, $options, $condition, /* $paths */, $prefixes, $hosts] = $this->parseConfigs($node, $path);
if ('' !== $prefix && $prefixes) {
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must not have both a "prefix" attribute and <prefix> child nodes.', $path));

View File

@ -28,7 +28,7 @@ class LogoutListenerTest extends TestCase
public function testHandleUnmatchedPath()
{
$dispatcher = $this->getEventDispatcher();
list($listener, , $httpUtils, $options) = $this->getListener($dispatcher);
[$listener, , $httpUtils, $options] = $this->getListener($dispatcher);
[$event, $request] = $this->getGetResponseEvent();
@ -52,7 +52,7 @@ class LogoutListenerTest extends TestCase
$tokenManager = $this->getTokenManager();
$dispatcher = $this->getEventDispatcher();
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($dispatcher, $tokenManager);
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($dispatcher, $tokenManager);
[$event, $request] = $this->getGetResponseEvent();
@ -90,7 +90,7 @@ class LogoutListenerTest extends TestCase
public function testHandleMatchedPathWithoutCsrfValidation()
{
$dispatcher = $this->getEventDispatcher();
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($dispatcher);
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($dispatcher);
[$event, $request] = $this->getGetResponseEvent();
@ -123,7 +123,7 @@ class LogoutListenerTest extends TestCase
{
$this->expectException('RuntimeException');
list($listener, , $httpUtils, $options) = $this->getListener();
[$listener, , $httpUtils, $options] = $this->getListener();
[$event, $request] = $this->getGetResponseEvent();
@ -168,12 +168,12 @@ class LogoutListenerTest extends TestCase
$this->expectDeprecation('Since symfony/security-http 5.1: Calling "%s::addHandler" is deprecated, register a listener on the "%s" event instead.');
$logoutSuccessHandler = $this->createMock(LogoutSuccessHandlerInterface::class);
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($logoutSuccessHandler);
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($logoutSuccessHandler);
$token = $this->getToken();
$tokenStorage->expects($this->any())->method('getToken')->willReturn($token);
list($event, $request) = $this->getGetResponseEvent();
[$event, $request] = $this->getGetResponseEvent();
$httpUtils->expects($this->once())
->method('checkRequestPath')

View File

@ -142,7 +142,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface
$headerCount = [];
$result = [];
list($delimiter, $enclosure, $escapeChar, $keySeparator, , , , $asCollection) = $this->getCsvOptions($context);
[$delimiter, $enclosure, $escapeChar, $keySeparator, , , , $asCollection] = $this->getCsvOptions($context);
while (false !== ($cols = fgetcsv($handle, 0, $delimiter, $enclosure, $escapeChar))) {
$nbCols = \count($cols);

View File

@ -473,7 +473,7 @@ class AssertingContextualValidator implements ContextualValidatorInterface
return $this;
}
list($expectedValue, $expectedGroup, $expectedConstraints, $violation) = $this->expectedValidate[$this->validateCalls];
[$expectedValue, $expectedGroup, $expectedConstraints, $violation] = $this->expectedValidate[$this->validateCalls];
Assert::assertSame($expectedValue, $value);
$expectedConstraints($constraints);

View File

@ -29,7 +29,7 @@ class Registry
public function has(object $subject, string $workflowName = null): bool
{
foreach ($this->workflows as list($workflow, $supportStrategy)) {
foreach ($this->workflows as [$workflow, $supportStrategy]) {
if ($this->supports($workflow, $supportStrategy, $subject, $workflowName)) {
return true;
}