| 1 | <?php |
||
| 14 | class Attribute |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var Attribute |
||
| 18 | */ |
||
| 19 | protected $property; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * PropertyFactory constructor. |
||
| 23 | * @param Property $property |
||
| 24 | */ |
||
| 25 | public function __construct(Property $property) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * |
||
| 32 | */ |
||
| 33 | public function required(): self |
||
| 38 | |||
| 39 | /** |
||
| 40 | * |
||
| 41 | */ |
||
| 42 | public function optional(): self |
||
| 47 | |||
| 48 | /** |
||
| 49 | * |
||
| 50 | */ |
||
| 51 | public function rule($rules): self |
||
| 56 | |||
| 57 | public function nullable(): self |
||
| 62 | |||
| 63 | public function default($value): self |
||
| 68 | |||
| 69 | /** |
||
| 70 | * |
||
| 71 | */ |
||
| 72 | public function constraint(Closure $callback): self |
||
| 77 | |||
| 78 | public function getProperty(): Property |
||
| 82 | |||
| 83 | |||
| 84 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..