Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a0483d

Browse files
committed
Fix tests and comments
1 parent 82c37d7 commit 4a0483d

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/Symfony/Component/PropertyInfo/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CHANGELOG
44
4.2.0
55
-----
66

7-
* added `PropertyInitializableExtractorInterface` to test if a property can be initialized through the constructor and an implementation is `ReflectionExtractor`
7+
* added `PropertyInitializableExtractorInterface` to test if a property can be initialized through the constructor (implemented by ReflectionExtractor`)
88

99
3.3.0
1010
-----

src/Symfony/Component/PropertyInfo/PropertyInitializableExtractorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
interface PropertyInitializableExtractorInterface
2020
{
2121
/**
22-
* Is the property initializable?
22+
* Is the property initializable? Returns true if a constructor's parameter matches the given property name.
2323
*/
2424
public function isInitializable(string $class, string $property, array $context = array()): ?bool;
2525
}

src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\Component\PropertyInfo\Tests\Fixtures\AdderRemoverDummy;
1717
use Symfony\Component\PropertyInfo\Tests\Fixtures\NotInstantiable;
1818
use Symfony\Component\PropertyInfo\Tests\Fixtures\Php71Dummy;
19-
use Symfony\Component\PropertyInfo\Tests\Fixtures\Php71DummyExtended;
2019
use Symfony\Component\PropertyInfo\Tests\Fixtures\Php71DummyExtended2;
2120
use Symfony\Component\PropertyInfo\Type;
2221

@@ -289,7 +288,6 @@ public function getInitializableProperties(): array
289288
array(Php71Dummy::class, 'string', true),
290289
array(Php71Dummy::class, 'intPrivate', true),
291290
array(Php71Dummy::class, 'notExist', false),
292-
array(Php71DummyExtended::class, 'intWithAccessor', true),
293291
array(Php71DummyExtended2::class, 'intWithAccessor', true),
294292
array(Php71DummyExtended2::class, 'intPrivate', false),
295293
array(NotInstantiable::class, 'foo', false),

src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71Dummy.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
*/
1717
class Php71Dummy
1818
{
19+
public function __construct(string $string, int $intPrivate)
20+
{
21+
}
22+
1923
public function getFoo(): ?array
2024
{
2125
}
@@ -42,4 +46,8 @@ class Php71DummyExtended2 extends Php71Dummy
4246
public function __construct(int $intWithAccessor)
4347
{
4448
}
49+
50+
public function getIntWithAccessor()
51+
{
52+
}
4553
}

0 commit comments

Comments
 (0)