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

Commit069da20

Browse files
derrabusnicolas-grekas
authored andcommitted
[DependencyInjection] Add types to private properties
1 parentf111c94 commit069da20

File tree

76 files changed

+297
-400
lines changed

Some content is hidden

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

76 files changed

+297
-400
lines changed

‎src/Symfony/Component/DependencyInjection/Alias.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class Alias
1717
{
1818
privateconstDEFAULT_DEPRECATION_TEMPLATE ='The "%alias_id%" service alias is deprecated. You should stop using it, as it will be removed in the future.';
1919

20-
private$id;
21-
private$public;
22-
private$deprecation = [];
20+
privatestring$id;
21+
privatebool$public;
22+
privatearray$deprecation = [];
2323

2424
publicfunction__construct(string$id,bool$public =false)
2525
{

‎src/Symfony/Component/DependencyInjection/Argument/AbstractArgument.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
*/
1717
finalclass AbstractArgument
1818
{
19-
private$text;
20-
private$context;
19+
privatestring$text;
20+
privatestring$context ='';
2121

2222
publicfunction__construct(string$text ='')
2323
{

‎src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ final class BoundArgument implements ArgumentInterface
2020
publicconstDEFAULTS_BINDING =1;
2121
publicconstINSTANCEOF_BINDING =2;
2222

23-
privatestatic$sequence =0;
23+
privatestaticint$sequence =0;
2424

25-
private$value;
26-
private$identifier;
27-
private$used;
28-
private$type;
29-
private$file;
25+
privatemixed$value;
26+
private?int$identifier =null;
27+
private?bool$used =null;
28+
privateint$type;
29+
private?string$file;
3030

3131
publicfunction__construct(mixed$value,bool$trackUsage =true,int$type =0,string$file =null)
3232
{

‎src/Symfony/Component/DependencyInjection/Argument/ReferenceSetArgumentTrait.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
trait ReferenceSetArgumentTrait
2222
{
23-
private$values;
23+
privatearray$values;
2424

2525
/**
2626
* @param Reference[] $values

‎src/Symfony/Component/DependencyInjection/Argument/RewindableGenerator.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
*/
1717
class RewindableGeneratorimplements \IteratorAggregate, \Countable
1818
{
19-
private$generator;
20-
private$count;
19+
private\Closure$generator;
20+
private\Closure|int$count;
2121

2222
publicfunction__construct(callable$generator,int|callable$count)
2323
{
24-
$this->generator =$generator;
25-
$this->count =$count;
24+
$this->generator =$generatorinstanceof \Closure ?$generator : \Closure::fromCallable($generator);
25+
$this->count =is_callable($count) && !$countinstanceof \Closure ? \Closure::fromCallable($count) :$count;
2626
}
2727

2828
publicfunctiongetIterator():\Traversable

‎src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class ServiceClosureArgumentimplements ArgumentInterface
2323
{
24-
private$values;
24+
privatearray$values;
2525

2626
publicfunction__construct(Reference$reference)
2727
{

‎src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
*/
2121
class ServiceLocatorextends BaseServiceLocator
2222
{
23-
private$factory;
24-
private$serviceMap;
25-
private$serviceTypes;
23+
private\Closure$factory;
24+
privatearray$serviceMap;
25+
private?array$serviceTypes;
2626

2727
publicfunction__construct(\Closure$factory,array$serviceMap,array$serviceTypes =null)
2828
{

‎src/Symfony/Component/DependencyInjection/Argument/ServiceLocatorArgument.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ServiceLocatorArgument implements ArgumentInterface
2222
{
2323
use ReferenceSetArgumentTrait;
2424

25-
private$taggedIteratorArgument;
25+
private?TaggedIteratorArgument$taggedIteratorArgument =null;
2626

2727
/**
2828
* @param Reference[]|TaggedIteratorArgument $values

‎src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
*/
1919
class TaggedIteratorArgumentextends IteratorArgument
2020
{
21-
private$tag;
22-
private$indexAttribute;
23-
private$defaultIndexMethod;
24-
private$defaultPriorityMethod;
25-
private$needsIndexes =false;
21+
privatestring$tag;
22+
privatemixed$indexAttribute;
23+
private?string$defaultIndexMethod;
24+
private?string$defaultPriorityMethod;
25+
privatebool$needsIndexes;
2626

2727
/**
2828
* @param string $tag The name of the tag identifying the target services

‎src/Symfony/Component/DependencyInjection/ChildDefinition.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class ChildDefinitionextends Definition
2323
{
24-
private$parent;
24+
privatestring$parent;
2525

2626
/**
2727
* @param string $parent The id of Definition instance to decorate

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp