Skip to content

Commit a0b6d3d

Browse files
committed
minor symfony#32020 CS fixes native functions (fabpot)
This PR was merged into the 3.4 branch. Discussion ---------- CS fixes native functions | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch. --> Commits ------- 106b348 fixed CS
2 parents 7a6ce5f + 106b348 commit a0b6d3d

36 files changed

+75
-75
lines changed

.php_cs.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ return PhpCsFixer\Config::create()
1515
'ordered_imports' => true,
1616
'protected_to_private' => false,
1717
// Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
18-
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],
18+
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced', 'strict' => true],
1919
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
2020
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
2121
])

src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function createTestConfiguration()
5858
$config = new Configuration();
5959
$config->setEntityNamespaces(['SymfonyTestsDoctrine' => 'Symfony\Bridge\Doctrine\Tests\Fixtures']);
6060
$config->setAutoGenerateProxyClasses(true);
61-
$config->setProxyDir(\sys_get_temp_dir());
61+
$config->setProxyDir(sys_get_temp_dir());
6262
$config->setProxyNamespace('SymfonyTests\Doctrine');
6363
$config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
6464
$config->setQueryCacheImpl(new ArrayCache());

src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private function formatWithIdentifiers(ObjectManager $em, ClassMetadata $class,
186186
return $this->formatValue($value, self::PRETTY_DATE);
187187
}
188188

189-
if (\method_exists($value, '__toString')) {
189+
if (method_exists($value, '__toString')) {
190190
return (string) $value;
191191
}
192192

src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getProxyFactoryCode(Definition $definition, $id, $factoryCode =
5858
$instantiation = 'return';
5959

6060
if ($definition->isShared()) {
61-
$instantiation .= sprintf(' $this->%s[%s] =', \method_exists(ContainerBuilder::class, 'addClassResource') || ($definition->isPublic() && !$definition->isPrivate()) ? 'services' : 'privates', var_export($id, true));
61+
$instantiation .= sprintf(' $this->%s[%s] =', method_exists(ContainerBuilder::class, 'addClassResource') || ($definition->isPublic() && !$definition->isPrivate()) ? 'services' : 'privates', var_export($id, true));
6262
}
6363

6464
if (null === $factoryCode) {
@@ -120,7 +120,7 @@ public function getProxyCode(Definition $definition)
120120
*/
121121
private static function getProxyManagerVersion()
122122
{
123-
if (!\class_exists(Version::class)) {
123+
if (!class_exists(Version::class)) {
124124
return '0.0.1';
125125
}
126126

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function getPrivatePublicDefinitions()
103103
[
104104
(new Definition(__CLASS__))
105105
->setPublic(false),
106-
\method_exists(ContainerBuilder::class, 'addClassResource') ? 'services' : 'privates',
106+
method_exists(ContainerBuilder::class, 'addClassResource') ? 'services' : 'privates',
107107
],
108108
[
109109
(new Definition(__CLASS__))

src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testWithGlobals()
7070

7171
$display = $tester->getDisplay();
7272

73-
$this->assertContains(\json_encode($message), $display);
73+
$this->assertContains(json_encode($message), $display);
7474
}
7575

7676
public function testWithGlobalsJson()
@@ -81,7 +81,7 @@ public function testWithGlobalsJson()
8181
$tester->execute(['--format' => 'json'], ['decorated' => true]);
8282

8383
$display = $tester->getDisplay();
84-
$display = \json_decode($display, true);
84+
$display = json_decode($display, true);
8585

8686
$this->assertSame($globals, $display['globals']);
8787
}
@@ -91,11 +91,11 @@ public function testWithFilter()
9191
$tester = $this->createCommandTester([]);
9292
$tester->execute(['--format' => 'json'], ['decorated' => false]);
9393
$display = $tester->getDisplay();
94-
$display1 = \json_decode($display, true);
94+
$display1 = json_decode($display, true);
9595

9696
$tester->execute(['filter' => 'date', '--format' => 'json'], ['decorated' => false]);
9797
$display = $tester->getDisplay();
98-
$display2 = \json_decode($display, true);
98+
$display2 = json_decode($display, true);
9999

100100
$this->assertNotSame($display1, $display2);
101101
}

src/Symfony/Bridge/Twig/UndefinedCallableHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function onUndefinedFunction($name)
8484

8585
private static function onUndefined($name, $type, $component)
8686
{
87-
if (\class_exists(FullStack::class) && isset(self::$fullStackEnable[$component])) {
87+
if (class_exists(FullStack::class) && isset(self::$fullStackEnable[$component])) {
8888
throw new SyntaxError(sprintf('Did you forget to %s? Unknown %s "%s".', self::$fullStackEnable[$component], $type, $name));
8989
}
9090

src/Symfony/Component/Cache/Traits/PhpArrayTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function warmUp(array $values)
9090
if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) {
9191
$value = serialize($value);
9292
}
93-
} elseif (!\is_scalar($value)) {
93+
} elseif (!is_scalar($value)) {
9494
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
9595
}
9696

src/Symfony/Component/Cache/Traits/PhpFilesTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected function doSave(array $values, $lifetime)
136136
if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) {
137137
$value = serialize($value);
138138
}
139-
} elseif (!\is_scalar($value)) {
139+
} elseif (!is_scalar($value)) {
140140
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
141141
}
142142

src/Symfony/Component/Debug/DebugClassLoader.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function loadClass($class)
168168

169169
private function checkClass($class, $file = null)
170170
{
171-
$exists = null === $file || \class_exists($class, false) || \interface_exists($class, false) || \trait_exists($class, false);
171+
$exists = null === $file || class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false);
172172

173173
if (null !== $file && $class && '\\' === $class[0]) {
174174
$class = substr($class, 1);
@@ -186,13 +186,13 @@ private function checkClass($class, $file = null)
186186
}
187187
$name = $refl->getName();
188188

189-
if ($name !== $class && 0 === \strcasecmp($name, $class)) {
189+
if ($name !== $class && 0 === strcasecmp($name, $class)) {
190190
throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: "%s" vs "%s".', $class, $name));
191191
}
192192

193193
$deprecations = $this->checkAnnotations($refl, $name);
194194

195-
if (isset(self::$php7Reserved[\strtolower($refl->getShortName())])) {
195+
if (isset(self::$php7Reserved[strtolower($refl->getShortName())])) {
196196
$deprecations[] = sprintf('The "%s" class uses the reserved name "%s", it will break on PHP 7 and higher', $name, $refl->getShortName());
197197
}
198198

@@ -223,23 +223,23 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
223223
$deprecations = [];
224224

225225
// Don't trigger deprecations for classes in the same vendor
226-
if (2 > $len = 1 + (\strpos($class, '\\') ?: \strpos($class, '_'))) {
226+
if (2 > $len = 1 + (strpos($class, '\\') ?: strpos($class, '_'))) {
227227
$len = 0;
228228
$ns = '';
229229
} else {
230-
$ns = \str_replace('_', '\\', \substr($class, 0, $len));
230+
$ns = str_replace('_', '\\', substr($class, 0, $len));
231231
}
232232

233233
// Detect annotations on the class
234234
if (false !== $doc = $refl->getDocComment()) {
235235
foreach (['final', 'deprecated', 'internal'] as $annotation) {
236-
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) {
236+
if (false !== strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) {
237237
self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
238238
}
239239
}
240240
}
241241

242-
$parent = \get_parent_class($class);
242+
$parent = get_parent_class($class);
243243
$parentAndOwnInterfaces = $this->getOwnInterfaces($class, $parent);
244244
if ($parent) {
245245
$parentAndOwnInterfaces[$parent] = $parent;
@@ -254,22 +254,22 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
254254
}
255255

256256
// Detect if the parent is annotated
257-
foreach ($parentAndOwnInterfaces + \class_uses($class, false) as $use) {
257+
foreach ($parentAndOwnInterfaces + class_uses($class, false) as $use) {
258258
if (!isset(self::$checkedClasses[$use])) {
259259
$this->checkClass($use);
260260
}
261-
if (isset(self::$deprecated[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len) && !isset(self::$deprecated[$class])) {
261+
if (isset(self::$deprecated[$use]) && strncmp($ns, str_replace('_', '\\', $use), $len) && !isset(self::$deprecated[$class])) {
262262
$type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait');
263263
$verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses');
264264

265265
$deprecations[] = sprintf('The "%s" %s %s "%s" that is deprecated%s.', $class, $type, $verb, $use, self::$deprecated[$use]);
266266
}
267-
if (isset(self::$internal[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len)) {
267+
if (isset(self::$internal[$use]) && strncmp($ns, str_replace('_', '\\', $use), $len)) {
268268
$deprecations[] = sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $class);
269269
}
270270
}
271271

272-
if (\trait_exists($class)) {
272+
if (trait_exists($class)) {
273273
return $deprecations;
274274
}
275275

@@ -296,7 +296,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
296296

297297
if (isset(self::$internalMethods[$class][$method->name])) {
298298
list($declaringClass, $message) = self::$internalMethods[$class][$method->name];
299-
if (\strncmp($ns, $declaringClass, $len)) {
299+
if (strncmp($ns, $declaringClass, $len)) {
300300
$deprecations[] = sprintf('The "%s::%s()" method is considered internal%s. It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $class);
301301
}
302302
}
@@ -307,7 +307,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
307307
}
308308

309309
foreach (['final', 'internal'] as $annotation) {
310-
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) {
310+
if (false !== strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) {
311311
$message = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
312312
self::${$annotation.'Methods'}[$class][$method->name] = [$class, $message];
313313
}

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,16 +746,16 @@ private function getSchemeAndHierarchy($filename)
746746
private static function box($func)
747747
{
748748
self::$lastError = null;
749-
\set_error_handler(__CLASS__.'::handleError');
749+
set_error_handler(__CLASS__.'::handleError');
750750
try {
751751
$result = \call_user_func_array($func, \array_slice(\func_get_args(), 1));
752-
\restore_error_handler();
752+
restore_error_handler();
753753

754754
return $result;
755755
} catch (\Throwable $e) {
756756
} catch (\Exception $e) {
757757
}
758-
\restore_error_handler();
758+
restore_error_handler();
759759

760760
throw $e;
761761
}

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ private function doAdvisoryLock($sessionId)
683683
switch ($this->driver) {
684684
case 'mysql':
685685
// MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced.
686-
$lockId = \substr($sessionId, 0, 64);
686+
$lockId = substr($sessionId, 0, 64);
687687
// should we handle the return value? 0 on timeout, null on error
688688
// we use a timeout of 50 seconds which is also the default for innodb_lock_wait_timeout
689689
$stmt = $this->pdo->prepare('SELECT GET_LOCK(:key, 50)');

src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function collect(Request $request, Response $response, \Exception $except
4747
'token' => $response->headers->get('X-Debug-Token'),
4848
'start_time' => $startTime * 1000,
4949
'events' => [],
50-
'stopwatch_installed' => \class_exists(Stopwatch::class, false),
50+
'stopwatch_installed' => class_exists(Stopwatch::class, false),
5151
];
5252
}
5353

src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,20 @@ public function update(Response $response)
132132
$maxAge = null;
133133
$sMaxage = null;
134134

135-
if (\is_numeric($this->ageDirectives['max-age'])) {
135+
if (is_numeric($this->ageDirectives['max-age'])) {
136136
$maxAge = $this->ageDirectives['max-age'] + $this->age;
137137
$response->headers->addCacheControlDirective('max-age', $maxAge);
138138
}
139139

140-
if (\is_numeric($this->ageDirectives['s-maxage'])) {
140+
if (is_numeric($this->ageDirectives['s-maxage'])) {
141141
$sMaxage = $this->ageDirectives['s-maxage'] + $this->age;
142142

143143
if ($maxAge !== $sMaxage) {
144144
$response->headers->addCacheControlDirective('s-maxage', $sMaxage);
145145
}
146146
}
147147

148-
if (\is_numeric($this->ageDirectives['expires'])) {
148+
if (is_numeric($this->ageDirectives['expires'])) {
149149
$date = clone $response->getDate();
150150
$date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds');
151151
$response->setExpires($date);

src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function handle(HttpKernelInterface $kernel, Request $request, $ty
3131
// save global state related to trusted headers and proxies
3232
$trustedProxies = Request::getTrustedProxies();
3333
$trustedHeaderSet = Request::getTrustedHeaderSet();
34-
if (\method_exists(Request::class, 'getTrustedHeaderName')) {
34+
if (method_exists(Request::class, 'getTrustedHeaderName')) {
3535
Request::setTrustedProxies($trustedProxies, -1);
3636
$trustedHeaders = [
3737
Request::HEADER_FORWARDED => Request::getTrustedHeaderName(Request::HEADER_FORWARDED, false),

src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ public function testCollect()
5252

5353
$c->collect($request, new Response());
5454
$this->assertEquals(123456000, $c->getStartTime());
55-
$this->assertSame(\class_exists(Stopwatch::class, false), $c->isStopwatchInstalled());
55+
$this->assertSame(class_exists(Stopwatch::class, false), $c->isStopwatchInstalled());
5656
}
5757
}

src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function serialize()
139139
{
140140
$serialized = [$this->user, $this->authenticated, $this->roles, $this->attributes];
141141

142-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
142+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
143143
}
144144

145145
/**

src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function serialize()
6161
{
6262
$serialized = [$this->secret, parent::serialize(true)];
6363

64-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
64+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
6565
}
6666

6767
/**

src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function serialize()
8181
{
8282
$serialized = [$this->credentials, $this->providerKey, parent::serialize(true)];
8383

84-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
84+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
8585
}
8686

8787
/**

src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function serialize()
9696
{
9797
$serialized = [$this->secret, $this->providerKey, parent::serialize(true)];
9898

99-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
99+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
100100
}
101101

102102
/**

src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function serialize()
9393
{
9494
$serialized = [$this->credentials, $this->providerKey, parent::serialize(true)];
9595

96-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
96+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
9797
}
9898

9999
/**

src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static function isSupported()
2626
return true;
2727
}
2828

29-
if (\class_exists('ParagonIE_Sodium_Compat') && \method_exists('ParagonIE_Sodium_Compat', 'crypto_pwhash_is_available')) {
29+
if (class_exists('ParagonIE_Sodium_Compat') && method_exists('ParagonIE_Sodium_Compat', 'crypto_pwhash_is_available')) {
3030
return \ParagonIE_Sodium_Compat::crypto_pwhash_is_available();
3131
}
3232

@@ -66,8 +66,8 @@ public function isPasswordValid($encoded, $raw, $salt)
6666
return !$this->isPasswordTooLong($raw) && password_verify($raw, $encoded);
6767
}
6868
if (\function_exists('sodium_crypto_pwhash_str_verify')) {
69-
$valid = !$this->isPasswordTooLong($raw) && \sodium_crypto_pwhash_str_verify($encoded, $raw);
70-
\sodium_memzero($raw);
69+
$valid = !$this->isPasswordTooLong($raw) && sodium_crypto_pwhash_str_verify($encoded, $raw);
70+
sodium_memzero($raw);
7171

7272
return $valid;
7373
}
@@ -88,12 +88,12 @@ private function encodePasswordNative($raw)
8888

8989
private function encodePasswordSodiumFunction($raw)
9090
{
91-
$hash = \sodium_crypto_pwhash_str(
91+
$hash = sodium_crypto_pwhash_str(
9292
$raw,
9393
\SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE,
9494
\SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
9595
);
96-
\sodium_memzero($raw);
96+
sodium_memzero($raw);
9797

9898
return $hash;
9999
}

src/Symfony/Component/Security/Core/Exception/AccountStatusException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function serialize()
4646
{
4747
$serialized = [$this->user, parent::serialize(true)];
4848

49-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
49+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
5050
}
5151

5252
/**

src/Symfony/Component/Security/Core/Exception/AuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function serialize()
5151
$this->line,
5252
];
5353

54-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
54+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
5555
}
5656

5757
/**

src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function serialize()
6262
{
6363
$serialized = [parent::serialize(true), $this->messageKey, $this->messageData];
6464

65-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
65+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
6666
}
6767

6868
/**

0 commit comments

Comments
 (0)