Help wantedbugtraits
Repository metrics
- Stars
- (5,369 stars)
- PR merge metrics
- (Avg merge 3d 12h) (5 merged PRs in 30d)
Description
<?php
trait CreatedAt {
protected DateTimeImmutable $createdAt;
private function onCreated(): void {
$this->createdAt = new DateTimeImmutable();
}
}
class Foo {
use CreatedAt;
public function __construct() {
$this->onCreated();
}
}
class Bar extends Foo {}
Property $createdAt was initialized it Foo constructor. But psalm knows nothing about it in Bar.