[PropertyInfo] Exclude static methods form properties guessing

This commit is contained in:
Kévin Dunglas 2017-01-18 13:05:57 +01:00
parent e18281eef6
commit 190c736d3c
No known key found for this signature in database
GPG Key ID: 4D04EBEF06AAF3A6
2 changed files with 8 additions and 0 deletions

View File

@ -68,6 +68,10 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
}
foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) {
if ($reflectionMethod->isStatic()) {
continue;
}
$propertyName = $this->getPropertyName($reflectionMethod->name);
if (!$propertyName || isset($properties[$propertyName])) {
continue;

View File

@ -51,6 +51,10 @@ class Dummy extends ParentDummy
*/
public $B;
public static function getStatic()
{
}
/**
* A.
*