getDeclaringClass()->getDefaultProperties(); $type = new FakeType(); if ($reflection->hasType()) { $type = FakeType::from($reflection->getType()->getName()); // @phpstan-ignore-line } return new PropertyDefinition( $reflection->name, 'Signature::' . $reflection->name, $type, isset($defaultProperties[$reflection->name]), $defaultProperties[$reflection->name] ?? null, $reflection->isPublic(), new FakeAttributes() ); } public static function withType(Type $type): PropertyDefinition { return new PropertyDefinition( 'someProperty', 'someProperty', $type, false, null, false, new FakeAttributes() ); } }