Skip to content
Permalink
Browse files

Few small improvements

  • Loading branch information
muglug committed Jan 5, 2020
1 parent d4ef5c2 commit 2fb5a9d3264b6c32a8e1e4c71090ec5245acbf99
@@ -673,7 +673,8 @@ public static function analyzeInstance(

$declaring_property_class = (string) $codebase->properties->getDeclaringClassForProperty(
$property_id,
true
true,
$statements_analyzer
);

if ($codebase->properties_to_rename) {
@@ -1131,7 +1132,8 @@ public static function analyzeStatic(

$declaring_property_class = $codebase->properties->getDeclaringClassForProperty(
$fq_class_name . '::$' . $prop_name,
true
true,
$statements_analyzer
);

$declaring_property_id = strtolower((string) $declaring_property_class) . '::$' . $prop_name;
@@ -141,7 +141,7 @@ public function propertyExists(
*
* @return string|null
*/
public function getDeclaringClassForProperty($property_id, bool $read_mode)
public function getDeclaringClassForProperty($property_id, bool $read_mode, StatementsSource $source = null)
{
list($fq_class_name, $property_name) = explode('::$', $property_id);

@@ -150,7 +150,7 @@ public function getDeclaringClassForProperty($property_id, bool $read_mode)
$fq_class_name,
$property_name,
$read_mode,
null,
$source,
null
)) {
return $fq_class_name;
@@ -171,7 +171,7 @@ public function getDeclaringClassForProperty($property_id, bool $read_mode)
*
* @return string|null
*/
public function getAppearingClassForProperty($property_id, bool $read_mode)
public function getAppearingClassForProperty($property_id, bool $read_mode, StatementsSource $source = null)
{
list($fq_class_name, $property_name) = explode('::$', $property_id);

@@ -180,7 +180,7 @@ public function getAppearingClassForProperty($property_id, bool $read_mode)
$fq_class_name,
$property_name,
$read_mode,
null,
$source,
null
)) {
return $fq_class_name;
@@ -1008,6 +1008,7 @@ private function registerClassLike(PhpParser\Node\Stmt\ClassLike $node)
$storage->populated = false;
$storage->class_implements = []; // we do this because reflection reports
$storage->parent_interfaces = [];
$storage->aliases = $this->aliases;

foreach ($storage->dependent_classlikes as $dependent_name_lc => $_) {
$dependent_storage = $this->codebase->classlike_storage_provider->get($dependent_name_lc);

0 comments on commit 2fb5a9d

Please sign in to comment.
You can’t perform that action at this time.