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 e23d8be

Browse filesBrowse files
wouterjnicolas-grekas
authored andcommitted
Add missing PHPdoc return types
1 parent 5a52dd8 commit e23d8be
Copy full SHA for e23d8be

File tree

Expand file treeCollapse file tree

96 files changed

+2886
-24
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

96 files changed

+2886
-24
lines changed

‎.github/expected-missing-return-types.diff

Copy file name to clipboardExpand all lines: .github/expected-missing-return-types.diff
+2,092-22Lines changed: 2092 additions & 22 deletions
Large diffs are not rendered by default.

‎.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
@@ -53,6 +53,7 @@
5353
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'):
5454
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/ReflectionIntersectionTypeFixture.php'):
5555
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/ReflectionUnionTypeWithIntersectionFixture.php'):
56+
case false !== strpos($file, '/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ReadOnlyClass.php'):
5657
case false !== strpos($file, '/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/ReadOnlyClass.php'):
5758
case false !== strpos($file, '/src/Symfony/Component/Cache/Traits/RelayProxy.php'):
5859
continue 2;

‎src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ public function getConnections()
107107
return $this->data['connections'];
108108
}
109109

110+
/**
111+
* @return int
112+
*/
110113
public function getQueryCount()
111114
{
112115
return array_sum(array_map('count', $this->data['queries']));

‎src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public function create(ContainerBuilder $container, string $id, array $config)
4343
;
4444
}
4545

46+
/**
47+
* @return string
48+
*/
4649
public function getKey()
4750
{
4851
return $this->key;

‎src/Symfony/Bridge/PhpUnit/ClassExistsMock.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/ClassExistsMock.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,39 @@ public static function withMockedEnums(array $enums)
4141
self::$classes += $enums;
4242
}
4343

44+
/**
45+
* @return bool
46+
*/
4447
public static function class_exists($name, $autoload = true)
4548
{
4649
$name = ltrim($name, '\\');
4750

4851
return isset(self::$classes[$name]) ? (bool) self::$classes[$name] : \class_exists($name, $autoload);
4952
}
5053

54+
/**
55+
* @return bool
56+
*/
5157
public static function interface_exists($name, $autoload = true)
5258
{
5359
$name = ltrim($name, '\\');
5460

5561
return isset(self::$classes[$name]) ? (bool) self::$classes[$name] : \interface_exists($name, $autoload);
5662
}
5763

64+
/**
65+
* @return bool
66+
*/
5867
public static function trait_exists($name, $autoload = true)
5968
{
6069
$name = ltrim($name, '\\');
6170

6271
return isset(self::$classes[$name]) ? (bool) self::$classes[$name] : \trait_exists($name, $autoload);
6372
}
6473

74+
/**
75+
* @return bool
76+
*/
6577
public static function enum_exists($name, $autoload = true)
6678
{
6779
$name = ltrim($name, '\\');

‎src/Symfony/Bridge/PhpUnit/ClockMock.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/ClockMock.php
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ class ClockMock
1919
{
2020
private static $now;
2121

22+
/**
23+
* @return bool|null
24+
*/
2225
public static function withClockMock($enable = null)
2326
{
2427
if (null === $enable) {
@@ -30,6 +33,9 @@ public static function withClockMock($enable = null)
3033
return null;
3134
}
3235

36+
/**
37+
* @return int
38+
*/
3339
public static function time()
3440
{
3541
if (null === self::$now) {
@@ -39,6 +45,9 @@ public static function time()
3945
return (int) self::$now;
4046
}
4147

48+
/**
49+
* @return int
50+
*/
4251
public static function sleep($s)
4352
{
4453
if (null === self::$now) {
@@ -72,6 +81,9 @@ public static function microtime($asFloat = false)
7281
return sprintf('%0.6f00 %d', self::$now - (int) self::$now, (int) self::$now);
7382
}
7483

84+
/**
85+
* @return string
86+
*/
7587
public static function date($format, $timestamp = null)
7688
{
7789
if (null === $timestamp) {
@@ -81,6 +93,9 @@ public static function date($format, $timestamp = null)
8193
return \date($format, $timestamp);
8294
}
8395

96+
/**
97+
* @return string
98+
*/
8499
public static function gmdate($format, $timestamp = null)
85100
{
86101
if (null === $timestamp) {
@@ -90,6 +105,9 @@ public static function gmdate($format, $timestamp = null)
90105
return \gmdate($format, $timestamp);
91106
}
92107

108+
/**
109+
* @return array|int|float
110+
*/
93111
public static function hrtime($asNumber = false)
94112
{
95113
$ns = (self::$now - (int) self::$now) * 1000000000;

‎src/Symfony/Bridge/PhpUnit/DnsMock.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/DnsMock.php
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public static function withMockedHosts(array $hosts)
4242
self::$hosts = $hosts;
4343
}
4444

45+
/**
46+
* @return bool
47+
*/
4548
public static function checkdnsrr($hostname, $type = 'MX')
4649
{
4750
if (!self::$hosts) {
@@ -63,6 +66,9 @@ public static function checkdnsrr($hostname, $type = 'MX')
6366
return false;
6467
}
6568

69+
/**
70+
* @return bool
71+
*/
6672
public static function getmxrr($hostname, &$mxhosts, &$weight = null)
6773
{
6874
if (!self::$hosts) {

‎src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ protected function validateName(string $name): void
4040
}
4141
}
4242

43+
/**
44+
* @return string
45+
*/
4346
protected function getPrettyPath(string $path)
4447
{
4548
return str_replace(getcwd().\DIRECTORY_SEPARATOR, '', $path);

‎src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ final class TraceableFirewallListener extends FirewallListener
2828
private array $wrappedListeners = [];
2929
private array $authenticatorsInfo = [];
3030

31+
/**
32+
* @return array
33+
*/
3134
public function getWrappedListeners()
3235
{
3336
return $this->wrappedListeners;

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
1515
use Symfony\Component\DependencyInjection\ChildDefinition;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
17-
use Symfony\Component\DependencyInjection\Reference;
1817

1918
/**
2019
* AbstractFactory is the base class for all classes inheriting from
@@ -73,6 +72,9 @@ public function addConfiguration(NodeDefinition $node)
7372
}
7473
}
7574

75+
/**
76+
* @return string
77+
*/
7678
protected function createAuthenticationSuccessHandler(ContainerBuilder $container, string $id, array $config)
7779
{
7880
$successHandlerId = $this->getSuccessHandlerId($id);
@@ -92,6 +94,9 @@ protected function createAuthenticationSuccessHandler(ContainerBuilder $containe
9294
return $successHandlerId;
9395
}
9496

97+
/**
98+
* @return string
99+
*/
95100
protected function createAuthenticationFailureHandler(ContainerBuilder $container, string $id, array $config)
96101
{
97102
$id = $this->getFailureHandlerId($id);
@@ -109,11 +114,17 @@ protected function createAuthenticationFailureHandler(ContainerBuilder $containe
109114
return $id;
110115
}
111116

117+
/**
118+
* @return string
119+
*/
112120
protected function getSuccessHandlerId(string $id)
113121
{
114122
return 'security.authentication.success_handler.'.$id.'.'.str_replace('-', '_', $this->getKey());
115123
}
116124

125+
/**
126+
* @return string
127+
*/
117128
protected function getFailureHandlerId(string $id)
118129
{
119130
return 'security.authentication.failure_handler.'.$id.'.'.str_replace('-', '_', $this->getKey());

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function create(ContainerBuilder $container, string $id, array $config)
3737
$definition->addArgument($users);
3838
}
3939

40+
/**
41+
* @return string
42+
*/
4043
public function getKey()
4144
{
4245
return 'memory';

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function create(ContainerBuilder $container, string $id, array $config)
4040
;
4141
}
4242

43+
/**
44+
* @return string
45+
*/
4346
public function getKey()
4447
{
4548
return 'ldap';

‎src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public function __construct(iterable $listeners, ExceptionListener $exceptionLis
3838
$this->config = $config;
3939
}
4040

41+
/**
42+
* @return FirewallConfig|null
43+
*/
4144
public function getConfig()
4245
{
4346
return $this->config;
@@ -51,11 +54,17 @@ public function getListeners(): iterable
5154
return $this->listeners;
5255
}
5356

57+
/**
58+
* @return ExceptionListener|null
59+
*/
5460
public function getExceptionListener()
5561
{
5662
return $this->exceptionListener;
5763
}
5864

65+
/**
66+
* @return LogoutListener|null
67+
*/
5968
public function getLogoutListener()
6069
{
6170
return $this->logoutListener;

‎src/Symfony/Component/Cache/Adapter/ApcuAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/ApcuAdapter.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public function __construct(string $namespace = '', int $defaultLifetime = 0, st
4747
$this->marshaller = $marshaller;
4848
}
4949

50+
/**
51+
* @return bool
52+
*/
5053
public static function isSupported()
5154
{
5255
return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL);

‎src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ public function __construct(\Memcached $client, string $namespace = '', int $def
7474
$this->marshaller = $marshaller ?? new DefaultMarshaller();
7575
}
7676

77+
/**
78+
* @return bool
79+
*/
7780
public static function isSupported()
7881
{
7982
return \extension_loaded('memcached') && version_compare(phpversion('memcached'), '3.1.6', '>=');

‎src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function __construct(string $namespace = '', int $defaultLifetime = 0, st
5454
};
5555
}
5656

57+
/**
58+
* @return bool
59+
*/
5760
public static function isSupported()
5861
{
5962
self::$startTime ??= $_SERVER['REQUEST_TIME'] ?? time();
@@ -274,6 +277,9 @@ protected function doDelete(array $ids): bool
274277
return $this->doCommonDelete($ids);
275278
}
276279

280+
/**
281+
* @return bool
282+
*/
277283
protected function doUnlink(string $file)
278284
{
279285
unset(self::$valuesCache[$file]);

‎src/Symfony/Component/Cache/Adapter/TraceableAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/TraceableAdapter.php
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ public function delete(string $key): bool
211211
}
212212
}
213213

214+
/**
215+
* @return array
216+
*/
214217
public function getCalls()
215218
{
216219
return $this->calls;
@@ -226,6 +229,9 @@ public function getPool(): AdapterInterface
226229
return $this->pool;
227230
}
228231

232+
/**
233+
* @return TraceableAdapterEvent
234+
*/
229235
protected function start(string $name)
230236
{
231237
$this->calls[] = $event = new TraceableAdapterEvent();

‎src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public function dump(ConfigurationInterface $configuration, string $namespace =
3636
return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace);
3737
}
3838

39+
/**
40+
* @return string
41+
*/
3942
public function dumpNode(NodeInterface $node, string $namespace = null)
4043
{
4144
$this->reference = '';

‎src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public function dumpAtPath(ConfigurationInterface $configuration, string $path)
6161
return $this->dumpNode($node);
6262
}
6363

64+
/**
65+
* @return string
66+
*/
6467
public function dumpNode(NodeInterface $node)
6568
{
6669
$this->reference = '';

‎src/Symfony/Component/Config/Definition/EnumNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/EnumNode.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public function __construct(?string $name, NodeInterface $parent = null, array $
4646
$this->values = $values;
4747
}
4848

49+
/**
50+
* @return array
51+
*/
4952
public function getValues()
5053
{
5154
return $this->values;

‎src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function __construct(string $message = '', int $code = 0, \Throwable $pre
2727
$this->paths = $paths;
2828
}
2929

30+
/**
31+
* @return array
32+
*/
3033
public function getPaths()
3134
{
3235
return $this->paths;

‎src/Symfony/Component/Config/Exception/LoaderLoadException.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Exception/LoaderLoadException.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public function __construct(mixed $resource, string $sourceResource = null, int
7676
parent::__construct($message, $code, $previous);
7777
}
7878

79+
/**
80+
* @return string
81+
*/
7982
protected function varToString(mixed $var)
8083
{
8184
if (\is_object($var)) {

‎src/Symfony/Component/Config/Util/XmlUtils.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Util/XmlUtils.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ public static function phpize(string|\Stringable $value): mixed
238238
}
239239
}
240240

241+
/**
242+
* @return array
243+
*/
241244
protected static function getXmlErrors(bool $internalErrors)
242245
{
243246
$errors = [];

0 commit comments

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