Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc27f96a

Browse files
Add more scalar type-hints
1 parentda0b075 commitc27f96a

File tree

538 files changed

+865
-2920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

538 files changed

+865
-2920
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,8 @@ private function sanitizeQuery($connectionName, $query)
165165
* The return value is an array with the sanitized value and a boolean
166166
* indicating if the original value was kept (allowing to use the sanitized
167167
* value to explain the query).
168-
*
169-
* @param mixed $var
170-
*
171-
* @return array
172168
*/
173-
privatefunctionsanitizeParam($var)
169+
privatefunctionsanitizeParam($var):array
174170
{
175171
if (is_object($var)) {
176172
$className =get_class($var);

‎src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ class DoctrineValidationPass implements CompilerPassInterface
2323
{
2424
private$managerType;
2525

26-
/**
27-
* @param string $managerType
28-
*/
29-
publicfunction__construct($managerType)
26+
publicfunction__construct(string$managerType)
3027
{
3128
$this->managerType =$managerType;
3229
}
@@ -43,12 +40,8 @@ public function process(ContainerBuilder $container)
4340
/**
4441
* Gets the validation mapping files for the format and extends them with
4542
* files matching a doctrine search pattern (Resources/config/validation.orm.xml).
46-
*
47-
* @param ContainerBuilder $container
48-
* @param string $mapping
49-
* @param string $extension
5043
*/
51-
privatefunctionupdateValidatorMappingFiles(ContainerBuilder$container,$mapping,$extension)
44+
privatefunctionupdateValidatorMappingFiles(ContainerBuilder$container,string$mapping,string$extension)
5245
{
5346
if (!$container->hasParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files')) {
5447
return;

‎src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
3737
* manager's service ID for a connection name
3838
* @param string $tagPrefix Tag prefix for listeners and subscribers
3939
*/
40-
publicfunction__construct($connections,$managerTemplate,$tagPrefix)
40+
publicfunction__construct(string$connections,string$managerTemplate,string$tagPrefix)
4141
{
4242
$this->connections =$connections;
4343
$this->managerTemplate =$managerTemplate;

‎src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
117117
* register alias
118118
* @param string[] $aliasMap Map of alias to namespace
119119
*/
120-
publicfunction__construct($driver,array$namespaces,array$managerParameters,$driverPattern,$enabledParameter =false,$configurationPattern ='',$registerAliasMethodName ='',array$aliasMap =array())
120+
publicfunction__construct($driver,array$namespaces,array$managerParameters,string$driverPattern,$enabledParameter =false,string$configurationPattern ='',string$registerAliasMethodName ='',array$aliasMap =array())
121121
{
122122
$this->driver =$driver;
123123
$this->namespaces =$namespaces;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class EntityFactory implements UserProviderFactoryInterface
2727
private$key;
2828
private$providerId;
2929

30-
publicfunction__construct($key,$providerId)
30+
publicfunction__construct(string$key,string$providerId)
3131
{
3232
$this->key =$key;
3333
$this->providerId =$providerId;

‎src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
useDoctrine\Common\Persistence\ObjectManager;
1515
useSymfony\Component\Form\ChoiceList\ArrayChoiceList;
1616
useSymfony\Component\Form\ChoiceList\ChoiceListInterface;
17-
useSymfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
1817
useSymfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
1918

2019
/**
@@ -45,9 +44,8 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
4544
* @param string $class The class name of the loaded objects
4645
* @param IdReader $idReader The reader for the object IDs
4746
* @param null|EntityLoaderInterface $objectLoader The objects loader
48-
* @param ChoiceListFactoryInterface $factory The factory for creating the loaded choice list
4947
*/
50-
publicfunction__construct(ObjectManager$manager,$class,$idReader =null,$objectLoader =null,$factory =null)
48+
publicfunction__construct(ObjectManager$manager,string$class,IdReader$idReader =null,EntityLoaderInterface$objectLoader =null)
5149
{
5250
$classMetadata =$manager->getClassMetadata($class);
5351

‎src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,9 @@ public function getTypes($class, $property, array $context = array())
157157
/**
158158
* Determines whether an association is nullable.
159159
*
160-
* @param array $associationMapping
161-
*
162-
* @return bool
163-
*
164160
* @see https://github.com/doctrine/doctrine2/blob/v2.5.4/lib/Doctrine/ORM/Tools/EntityGenerator.php#L1221-L1246
165161
*/
166-
privatefunctionisAssociationNullable(array$associationMapping)
162+
privatefunctionisAssociationNullable(array$associationMapping):bool
167163
{
168164
if (isset($associationMapping['id']) &&$associationMapping['id']) {
169165
returnfalse;
@@ -185,12 +181,8 @@ private function isAssociationNullable(array $associationMapping)
185181

186182
/**
187183
* Gets the corresponding built-in PHP type.
188-
*
189-
* @param string $doctrineType
190-
*
191-
* @return string|null
192184
*/
193-
privatefunctiongetPhpType($doctrineType)
185+
privatefunctiongetPhpType(string$doctrineType): ?string
194186
{
195187
switch ($doctrineType) {
196188
case DBALType::SMALLINT:
@@ -217,5 +209,7 @@ private function getPhpType($doctrineType)
217209
case DBALType::OBJECT:
218210
return Type::BUILTIN_TYPE_OBJECT;
219211
}
212+
213+
returnnull;
220214
}
221215
}

‎src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class EntityUserProvider implements UserProviderInterface
3333
private$class;
3434
private$property;
3535

36-
publicfunction__construct(ManagerRegistry$registry,$classOrAlias,$property =null,$managerName =null)
36+
publicfunction__construct(ManagerRegistry$registry,string$classOrAlias,string$property =null,string$managerName =null)
3737
{
3838
$this->registry =$registry;
3939
$this->managerName =$managerName;

‎src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,9 @@ public function providerBasicDrivers()
187187
}
188188

189189
/**
190-
* @param string $class
191-
* @param array $config
192-
*
193190
* @dataProvider providerBasicDrivers
194191
*/
195-
publicfunctiontestLoadBasicCacheDriver($class,array$config,array$expectedCalls =array())
192+
publicfunctiontestLoadBasicCacheDriver(string$class,array$config,array$expectedCalls =array())
196193
{
197194
$container =$this->createContainer();
198195
$cacheName ='metadata_cache';

‎src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapper.php‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@
1313

1414
class StringWrapper
1515
{
16-
/**
17-
* @var string
18-
*/
1916
private$string;
2017

21-
/**
22-
* @param string $string
23-
*/
24-
publicfunction__construct($string =null)
18+
publicfunction__construct(string$string =null)
2519
{
2620
$this->string =$string;
2721
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp