revert private properties handling
This commit is contained in:
parent
828ba66d4a
commit
9bad90578a
@ -49,19 +49,13 @@ class Stub
|
|||||||
$properties = [];
|
$properties = [];
|
||||||
|
|
||||||
if (!isset(self::$defaultProperties[$c = \get_class($this)])) {
|
if (!isset(self::$defaultProperties[$c = \get_class($this)])) {
|
||||||
$defaultProperties = get_class_vars($c);
|
self::$defaultProperties[$c] = get_class_vars($c);
|
||||||
|
|
||||||
foreach ((new \ReflectionClass($c))->getProperties(\ReflectionProperty::IS_PUBLIC) as $v) {
|
foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) {
|
||||||
if ($v->isStatic()) {
|
unset(self::$defaultProperties[$c][$k]);
|
||||||
unset($defaultProperties[$v->name]);
|
|
||||||
} elseif (!isset($defaultProperties[$v->name])) {
|
|
||||||
$defaultProperties[$v->name] = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$defaultProperties[$c] = $defaultProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (self::$defaultProperties[$c] as $k => $v) {
|
foreach (self::$defaultProperties[$c] as $k => $v) {
|
||||||
if ($this->$k !== $v) {
|
if ($this->$k !== $v) {
|
||||||
$properties[] = $k;
|
$properties[] = $k;
|
||||||
|
Reference in New Issue
Block a user