| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | interface MetadataInterface extends InternalMetadataInterface |
||
| 30 | { |
||
| 31 | public function getTitle(): string; |
||
| 32 | |||
| 33 | public function getDescription(): ?string; |
||
| 34 | |||
| 35 | public function getImage(): ?string; |
||
| 36 | |||
| 37 | public function getDomain(): ?string; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return array<string, mixed> |
||
| 41 | */ |
||
| 42 | public function getOptions(): array; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $name The option key |
||
| 46 | * @param mixed $default The default value if option not found |
||
| 47 | * |
||
| 48 | * @return mixed |
||
| 49 | */ |
||
| 50 | public function getOption($name, $default = null); |
||
| 51 | } |
||
| 52 |
This check looks for classes that have been defined more than once in the same file.
If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.