Fix CS
This commit is contained in:
parent
294cffea25
commit
53f7f5f27e
@ -449,7 +449,7 @@ class SecurityExtension extends Extension implements PrependExtensionInterface
|
|||||||
|
|
||||||
// Authentication listeners
|
// Authentication listeners
|
||||||
$firewallAuthenticationProviders = [];
|
$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) {
|
if (!$this->authenticatorManagerEnabled) {
|
||||||
$authenticationProviders = array_merge($authenticationProviders, $firewallAuthenticationProviders);
|
$authenticationProviders = array_merge($authenticationProviders, $firewallAuthenticationProviders);
|
||||||
@ -567,7 +567,7 @@ class SecurityExtension extends Extension implements PrependExtensionInterface
|
|||||||
$entryPoints[$key] = $entryPoint;
|
$entryPoints[$key] = $entryPoint;
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
$listeners[] = new Reference($listenerId);
|
||||||
$authenticationProviders[] = $provider;
|
$authenticationProviders[] = $provider;
|
||||||
|
@ -134,7 +134,7 @@ class CouchbaseBucketAdapter extends AbstractAdapter
|
|||||||
$optionsInArray = explode('&', $options);
|
$optionsInArray = explode('&', $options);
|
||||||
|
|
||||||
foreach ($optionsInArray as $option) {
|
foreach ($optionsInArray as $option) {
|
||||||
list($key, $value) = explode('=', $option);
|
[$key, $value] = explode('=', $option);
|
||||||
|
|
||||||
if (\in_array($key, static::VALID_DSN_OPTIONS, true)) {
|
if (\in_array($key, static::VALID_DSN_OPTIONS, true)) {
|
||||||
$results[$key] = $value;
|
$results[$key] = $value;
|
||||||
|
@ -123,7 +123,7 @@ This conversation was marked as resolved by lstrojny
|
|||||||
}
|
}
|
||||||
$params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) {
|
$params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) {
|
||||||
if (!empty($m[2])) {
|
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] ?? '');
|
return 'file:'.($m[1] ?? '');
|
||||||
|
@ -401,7 +401,7 @@ EOF;
|
|||||||
if (2 !== \count($values) || !isset($values[0], $values[1])) {
|
if (2 !== \count($values) || !isset($values[0], $values[1])) {
|
||||||
$this->keys = $this->values = [];
|
$this->keys = $this->values = [];
|
||||||
} else {
|
} else {
|
||||||
list($this->keys, $this->values) = $values;
|
[$this->keys, $this->values] = $values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1094,7 +1094,7 @@ EOTXT
|
|||||||
$definitions = $this->container->getDefinitions();
|
$definitions = $this->container->getDefinitions();
|
||||||
ksort($definitions);
|
ksort($definitions);
|
||||||
foreach ($definitions as $id => $definition) {
|
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()];
|
yield $file => [$code, $definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1]) && !$definition->isDeprecated() && !$definition->hasErrors()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,7 @@ class XmlFileLoader extends FileLoader
|
|||||||
|
|
||||||
// resolve definitions
|
// resolve definitions
|
||||||
uksort($definitions, 'strnatcmp');
|
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())) {
|
if (null !== $definition = $this->parseDefinition($domElement, $file, new Definition())) {
|
||||||
$this->setDefinition($id, $definition);
|
$this->setDefinition($id, $definition);
|
||||||
}
|
}
|
||||||
|
@ -590,7 +590,7 @@ class Filesystem
|
|||||||
public function tempnam(string $dir, string $prefix/*, string $suffix = ''*/)
|
public function tempnam(string $dir, string $prefix/*, string $suffix = ''*/)
|
||||||
{
|
{
|
||||||
$suffix = \func_num_args() > 2 ? func_get_arg(2) : '';
|
$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 no scheme or scheme is "file" or "gs" (Google Cloud) create temp file in local filesystem
|
||||||
if ((null === $scheme || 'file' === $scheme || 'gs' === $scheme) && '' === $suffix) {
|
if ((null === $scheme || 'file' === $scheme || 'gs' === $scheme) && '' === $suffix) {
|
||||||
|
@ -42,7 +42,7 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface
|
|||||||
} else {
|
} else {
|
||||||
// any methods listed for call-at-instantiation cannot be actions
|
// any methods listed for call-at-instantiation cannot be actions
|
||||||
$reason = false;
|
$reason = false;
|
||||||
list($id, $action) = explode('::', $controller);
|
[$id, $action] = explode('::', $controller);
|
||||||
|
|
||||||
if ($container->hasAlias($id)) {
|
if ($container->hasAlias($id)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -404,7 +404,7 @@ class PropertyAccessor implements PropertyAccessorInterface
|
|||||||
try {
|
try {
|
||||||
$result[self::VALUE] = $object->$name();
|
$result[self::VALUE] = $object->$name();
|
||||||
} catch (\TypeError $e) {
|
} catch (\TypeError $e) {
|
||||||
list($trace) = $e->getTrace();
|
[$trace] = $e->getTrace();
|
||||||
|
|
||||||
// handle uninitialized properties in PHP >= 7
|
// handle uninitialized properties in PHP >= 7
|
||||||
if (__FILE__ === $trace['file']
|
if (__FILE__ === $trace['file']
|
||||||
|
@ -118,7 +118,7 @@ class XmlFileLoader extends FileLoader
|
|||||||
$schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY);
|
$schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY);
|
||||||
$methods = preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -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')) {
|
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));
|
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;
|
$trailingSlashOnRoot = $node->hasAttribute('trailing-slash-on-root') ? XmlUtils::phpize($node->getAttribute('trailing-slash-on-root')) : true;
|
||||||
$namePrefix = $node->getAttribute('name-prefix') ?: null;
|
$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) {
|
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));
|
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must not have both a "prefix" attribute and <prefix> child nodes.', $path));
|
||||||
|
@ -28,7 +28,7 @@ class LogoutListenerTest extends TestCase
|
|||||||
public function testHandleUnmatchedPath()
|
public function testHandleUnmatchedPath()
|
||||||
{
|
{
|
||||||
$dispatcher = $this->getEventDispatcher();
|
$dispatcher = $this->getEventDispatcher();
|
||||||
list($listener, , $httpUtils, $options) = $this->getListener($dispatcher);
|
[$listener, , $httpUtils, $options] = $this->getListener($dispatcher);
|
||||||
|
|
||||||
[$event, $request] = $this->getGetResponseEvent();
|
[$event, $request] = $this->getGetResponseEvent();
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ class LogoutListenerTest extends TestCase
|
|||||||
$tokenManager = $this->getTokenManager();
|
$tokenManager = $this->getTokenManager();
|
||||||
$dispatcher = $this->getEventDispatcher();
|
$dispatcher = $this->getEventDispatcher();
|
||||||
|
|
||||||
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($dispatcher, $tokenManager);
|
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($dispatcher, $tokenManager);
|
||||||
|
|
||||||
[$event, $request] = $this->getGetResponseEvent();
|
[$event, $request] = $this->getGetResponseEvent();
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ class LogoutListenerTest extends TestCase
|
|||||||
public function testHandleMatchedPathWithoutCsrfValidation()
|
public function testHandleMatchedPathWithoutCsrfValidation()
|
||||||
{
|
{
|
||||||
$dispatcher = $this->getEventDispatcher();
|
$dispatcher = $this->getEventDispatcher();
|
||||||
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($dispatcher);
|
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($dispatcher);
|
||||||
|
|
||||||
[$event, $request] = $this->getGetResponseEvent();
|
[$event, $request] = $this->getGetResponseEvent();
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ class LogoutListenerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->expectException('RuntimeException');
|
$this->expectException('RuntimeException');
|
||||||
|
|
||||||
list($listener, , $httpUtils, $options) = $this->getListener();
|
[$listener, , $httpUtils, $options] = $this->getListener();
|
||||||
|
|
||||||
[$event, $request] = $this->getGetResponseEvent();
|
[$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.');
|
$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);
|
$logoutSuccessHandler = $this->createMock(LogoutSuccessHandlerInterface::class);
|
||||||
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($logoutSuccessHandler);
|
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($logoutSuccessHandler);
|
||||||
|
|
||||||
$token = $this->getToken();
|
$token = $this->getToken();
|
||||||
$tokenStorage->expects($this->any())->method('getToken')->willReturn($token);
|
$tokenStorage->expects($this->any())->method('getToken')->willReturn($token);
|
||||||
|
|
||||||
list($event, $request) = $this->getGetResponseEvent();
|
[$event, $request] = $this->getGetResponseEvent();
|
||||||
|
|
||||||
$httpUtils->expects($this->once())
|
$httpUtils->expects($this->once())
|
||||||
->method('checkRequestPath')
|
->method('checkRequestPath')
|
||||||
|
@ -142,7 +142,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface
|
|||||||
$headerCount = [];
|
$headerCount = [];
|
||||||
$result = [];
|
$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))) {
|
while (false !== ($cols = fgetcsv($handle, 0, $delimiter, $enclosure, $escapeChar))) {
|
||||||
$nbCols = \count($cols);
|
$nbCols = \count($cols);
|
||||||
|
@ -473,7 +473,7 @@ class AssertingContextualValidator implements ContextualValidatorInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
list($expectedValue, $expectedGroup, $expectedConstraints, $violation) = $this->expectedValidate[$this->validateCalls];
|
[$expectedValue, $expectedGroup, $expectedConstraints, $violation] = $this->expectedValidate[$this->validateCalls];
|
||||||
|
|
||||||
Assert::assertSame($expectedValue, $value);
|
Assert::assertSame($expectedValue, $value);
|
||||||
$expectedConstraints($constraints);
|
$expectedConstraints($constraints);
|
||||||
|
@ -29,7 +29,7 @@ class Registry
|
|||||||
|
|
||||||
public function has(object $subject, string $workflowName = null): bool
|
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)) {
|
if ($this->supports($workflow, $supportStrategy, $subject, $workflowName)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user