generated from chevere/package-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Milestone
Description
The concept of CastInterface is misleading as what this package does is type checking against dynamic variables. Cast is often understood as type casting/conversion, which is not what is happening here. The name was poorly chosen.
What Cast does is that it takes a variable and it offers methods to access that variable typed:
public function int(): int {
return $this->var;
}^ This is what Cast does, it uses this trick to enable you to dynamic typed access.
As this is not converting anything, we need a new name for the next major.
I suggest TypedInterface.
$typed->int();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels