The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
Loading history...
39
3
: $this->createAlias();
40
}
41
42
32
return $this->alias;
43
}
44
45
/**
46
* @param string|null $pattern
47
* @return string
48
*/
49
32
private function createAlias(string $pattern = null): string
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: