Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e9021b1

Browse filesBrowse files
More return type fixes
1 parent 1d19615 commit e9021b1
Copy full SHA for e9021b1

File tree

15 files changed

+39
-9
lines changed
Filter options

15 files changed

+39
-9
lines changed

‎.github/patch-types.php

Copy file name to clipboardExpand all lines: .github/patch-types.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
switch (true) {
1616
case false !== strpos($file = realpath($file), '/vendor/'):
1717
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
18+
case false !== strpos($file, '/Attribute/'):
1819
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
1920
case false !== strpos($file, '/src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php'):
2021
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadFileName.php'):

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,10 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
856856
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
857857
{
858858
}
859+
860+
public function createToken(Passport $passport, string $firewallName): TokenInterface
861+
{
862+
}
859863
}
860864

861865
class NullAuthenticator implements GuardAuthenticatorInterface

‎src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ class ArrayCache extends CacheProvider
88
{
99
private $data = [];
1010

11+
/**
12+
* @return mixed
13+
*/
1114
protected function doFetch($id)
1215
{
1316
return $this->doContains($id) ? $this->data[$id][0] : false;

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,7 @@ private function validate($content, string $file): ?array
803803
}
804804

805805
/**
806-
* Resolves services.
807-
*
808-
* @return array|string|Reference|ArgumentInterface
806+
* @return mixed
809807
*/
810808
private function resolveServices($value, string $file, bool $isParameter = false)
811809
{

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectWithXsdExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectWithXsdExtension.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class ProjectWithXsdExtension extends ProjectExtension
44
{
5-
public function getXsdValidationBasePath()
5+
public function getXsdValidationBasePath(): string
66
{
77
return __DIR__.'/schema';
88
}

‎src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function __construct(\MongoDB\Client $mongo, array $options)
8282
/**
8383
* @return bool
8484
*/
85+
#[\ReturnTypeWillChange]
8586
public function close()
8687
{
8788
return true;
@@ -135,6 +136,7 @@ protected function doWrite(string $sessionId, string $data)
135136
/**
136137
* @return bool
137138
*/
139+
#[\ReturnTypeWillChange]
138140
public function updateTimestamp($sessionId, $data)
139141
{
140142
$expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000);

‎src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public function gc($maxlifetime)
128128
/**
129129
* @return bool
130130
*/
131+
#[\ReturnTypeWillChange]
131132
public function updateTimestamp($sessionId, $data)
132133
{
133134
return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ($this->ttl ?? ini_get('session.gc_maxlifetime')));

‎src/Symfony/Component/HttpKernel/Tests/KernelTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/KernelTest.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,17 +516,20 @@ public function load(array $configs, ContainerBuilder $container)
516516
$container->setParameter('test.extension-registered', true);
517517
}
518518

519-
public function getNamespace()
519+
public function getNamespace(): string
520520
{
521521
return '';
522522
}
523523

524+
/**
525+
* @return false
526+
*/
524527
public function getXsdValidationBasePath()
525528
{
526529
return false;
527530
}
528531

529-
public function getAlias()
532+
public function getAlias(): string
530533
{
531534
return 'test-extension';
532535
}

‎src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function count()
6565
/**
6666
* @return \Traversable
6767
*/
68+
#[\ReturnTypeWillChange]
6869
public function getIterator()
6970
{
7071
if (0 === $this->count()) {
@@ -91,6 +92,7 @@ public function getIterator()
9192
/**
9293
* @return bool
9394
*/
95+
#[\ReturnTypeWillChange]
9496
public function offsetExists($offset)
9597
{
9698
$this->toArray();
@@ -101,6 +103,7 @@ public function offsetExists($offset)
101103
/**
102104
* @return mixed
103105
*/
106+
#[\ReturnTypeWillChange]
104107
public function offsetGet($offset)
105108
{
106109
$this->toArray();
@@ -111,6 +114,7 @@ public function offsetGet($offset)
111114
/**
112115
* @return void
113116
*/
117+
#[\ReturnTypeWillChange]
114118
public function offsetSet($offset, $value)
115119
{
116120
$this->toArray();
@@ -121,6 +125,7 @@ public function offsetSet($offset, $value)
121125
/**
122126
* @return void
123127
*/
128+
#[\ReturnTypeWillChange]
124129
public function offsetUnset($offset)
125130
{
126131
$this->toArray();

‎src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,9 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
228228
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
229229
{
230230
}
231+
232+
public function createToken(Passport $passport, string $firewallName): TokenInterface
233+
{
234+
}
231235
}
232236
}

‎src/Symfony/Component/Lock/Tests/LockTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/LockTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public function delete(Key $key)
456456
unset($this->keys[spl_object_hash($key)]);
457457
}
458458

459-
public function exists(Key $key)
459+
public function exists(Key $key): bool
460460
{
461461
return isset($this->keys[spl_object_hash($key)]);
462462
}
@@ -502,7 +502,7 @@ public function delete(Key $key)
502502
unset($this->keys[spl_object_hash($key)]);
503503
}
504504

505-
public function exists(Key $key)
505+
public function exists(Key $key): bool
506506
{
507507
return isset($this->keys[spl_object_hash($key)]);
508508
}

‎src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public function isAuthenticated(): bool
5252
return true;
5353
}
5454

55+
/**
56+
* @return mixed
57+
*/
5558
public function getCredentials()
5659
{
5760
}

‎src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,9 @@ public function setSerializer(SerializerInterface $serializer)
619619

620620
class NotSerializable
621621
{
622+
/**
623+
* @return array
624+
*/
622625
public function __sleep()
623626
{
624627
if (class_exists(\Error::class)) {

‎src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,11 @@ public function testNormalizeNotSerializableContext()
601601
public function testDefaultExcludeFromCacheKey()
602602
{
603603
$normalizer = new class(null, null, null, null, null, null, [ObjectNormalizer::EXCLUDE_FROM_CACHE_KEY => ['foo']]) extends ObjectNormalizer {
604-
protected function isCircularReference($object, &$context)
604+
protected function isCircularReference($object, &$context): bool
605605
{
606606
ObjectNormalizerTest::assertContains('foo', $this->defaultContext[ObjectNormalizer::EXCLUDE_FROM_CACHE_KEY]);
607+
608+
return false;
607609
}
608610
};
609611
$normalizer->normalize(new ObjectDummy());

‎src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class TestNormalizer implements NormalizerInterface
2525
*/
2626
public function normalize($object, string $format = null, array $context = [])
2727
{
28+
return null;
2829
}
2930

3031
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.