| 1 | <?php declare(strict_types = 1); |
||
| 16 | abstract class AbstractMetadataCollector |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Metadata collector constructor. |
||
| 20 | * |
||
| 21 | * @param ResolverInterface $resolver |
||
| 22 | */ |
||
| 23 | 4 | public function __construct(ResolverInterface $resolver) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Collect class metadata from source. |
||
| 30 | * |
||
| 31 | * @param mixed $source Input source for collecting class metadata |
||
| 32 | * |
||
| 33 | * @return ClassMetadata[] Collected class metadata collection |
||
| 34 | */ |
||
| 35 | abstract public function collect($source) : array; |
||
| 36 | } |
||
| 37 |
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: